dataclasses and python > 3.7
Maintainers usually reply within 1 day
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 65/100
Research direction
The issue points to the generic dependencies requirements and a compatibility package that conflicts with Python 3.7 and newer. Start by locating where dataclasses is declared and how the project handles Python version markers. Done when installation on Python 3.7+ no longer brings in the backport, while older Python versions can still install it.
Written by the indexing model from the issue text.
Description
Module
generic dependencies
Describe the bug
The requirements provide "dataclasses" for compatibility with python<3.7, but for recent version it failed with dependencies that expect a recent version of dataclasses.
Our use case : having debugpy installed, and then the error arise:
File "/blabla/app/python-env/lib/python3.11/site-packages/debugpy/adapter/__main__.py", line 230, in <module>
__import__("debugpy")
File "/blabla/app/python-env/lib/python3.11/site-packages/debugpy/adapter/../../debugpy/__init__.py", line 37, in <module>
from debugpy.public_api import * # noqa
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/blabla/app/python-env/lib/python3.11/site-packages/debugpy/adapter/../../debugpy/public_api.py", line 25, in <module>
@dataclasses.dataclass(frozen=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/blabla/app/python-env/lib/python3.11/site-packages/debugpy/adapter/../../dataclasses.py", line 950, in wrap
return _process_class(cls, init, repr, eq, order, unsafe_hash, frozen)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/blabla/app/python-env/lib/python3.11/site-packages/debugpy/adapter/../../dataclasses.py", line 800, in _process_class
cls_fields = [_get_field(cls, name, type)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/blabla/app/python-env/lib/python3.11/site-packages/debugpy/adapter/../../dataclasses.py", line 800, in <listcomp>
cls_fields = [_get_field(cls, name, type)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/blabla/app/python-env/lib/python3.11/site-packages/debugpy/adapter/../../dataclasses.py", line 659, in _get_field
if (_is_classvar(a_type, typing)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/blabla/app/python-env/lib/python3.11/site-packages/debugpy/adapter/../../dataclasses.py", line 550, in _is_classvar
return type(a_type) is typing._ClassVar
^^^^^^^^^^^^^^^^
AttributeError: module 'typing' has no attribute '_ClassVar'. Did you mean: 'ClassVar'?
To Reproduce
Affected versions: everything that is python >= 3.7
Expected behavior
Should not install dataclasse module for python >= 3.7
Uninstalling dataclasses simply resolve the error, since it load the module from standard lib and not virtual env.
- Dominant language
- Python
- Stars
- 960
- Forks
- 1.7k
- Avg merge
- 5d 23h
- Merged PRs (30d)
- 15
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from OCA/server-tools
-
When tracking Json fields an error pops in v19Possibly taken @xecanto claimed this 23 days ago. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
OCA/server-tools#3796 ·
Maintainers usually reply within 1 day
-
[18.0] base_exception: swallow_base_exception_error never runs the decorated testPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
OCA/server-tools#3784 · 1 comment ·
Maintainers usually reply within 1 day
-
[17.0] auto_backup: Cron: Database backup failed, UnicodeDecodeError: utf-8 codec can't decode byte 0x8b in position 690: invalid start bytePossibly taken @xecanto claimed this 33 days ago. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
OCA/server-tools#3768 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 65/100
OCA/server-tools#3368 · 1 comment ·
Maintainers usually reply within 1 day
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 72/100
OCA/server-tools#3139 · 1 comment ·
Maintainers usually reply within 1 day
All issues in OCA/server-tools
Similar issues
-
add entry to blockOpen
Difficulty 1/5 Under an hour Newbie friendliness 65/100
StevenBlack/hosts#3299 ·
-
`garak --report` overwrites the input report when its name has no ".report"Possibly taken @0z5a claimed this today. Openneeds-triage
Difficulty 2/5 Half a day Newbie friendliness 72/100
Maintainers usually reply within 2 days
-
plot_graph crashes when a mesh node has no m2m edgePossibly taken @tygvi claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
mllam/neural-lam#883 · 1 comment ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
future-agi/future-agi#4092 · 1 comment ·
Maintainers usually reply within 1 day
-
transcript analytics: a text whose only protected spans the prose pass redacts is withheld wholeOpen
Difficulty 1/5 Under an hour Newbie friendliness 82/100
WingedGuardian/GENesis-AGI#4641 ·
Maintainers usually reply within 1 day