Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(Debian Sid) ImportError: cannot import name 'provides' from 'attr.validators' #537

Closed
ParzivalWolfram opened this issue Aug 27, 2024 · 2 comments

Comments

@ParzivalWolfram
Copy link

ParzivalWolfram commented Aug 27, 2024

On any attempt to use magic-wormhole from current state of Debian Sid branch, the following occurs:

Traceback (most recent call last):
  File "/usr/bin/wormhole", line 33, in <module>
    sys.exit(load_entry_point('magic-wormhole==0.14.0', 'console_scripts', 'wormhole')())
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/bin/wormhole", line 25, in importlib_load_entry_point
    return next(matches).load()
           ^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/importlib/metadata/__init__.py", line 205, in load
    module = import_module(match.group('module'))
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/importlib/__init__.py", line 90, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1310, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1310, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 995, in exec_module
  File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
  File "/usr/lib/python3/dist-packages/wormhole/__init__.py", line 2, in <module>
    from .wormhole import create
  File "/usr/lib/python3/dist-packages/wormhole/wormhole.py", line 11, in <module>
    from ._boss import Boss
  File "/usr/lib/python3/dist-packages/wormhole/_boss.py", line 4, in <module>
    from attr.validators import instance_of, optional, provides
ImportError: cannot import name 'provides' from 'attr.validators' (/usr/lib/python3/dist-packages/attr/validators.py)

Packages installed from Debian repos. Package list (including versions) at time of error can be found at https://linux-hardware.org/?probe=d90917bcac&log=debs (site is having issues at time of writing, archived version is here.)

@meejah
Copy link
Member

meejah commented Aug 27, 2024

Related to python-attrs/attrs#1265

One straightforward fix is to just copy-paste the code into magic-wormhole codebase. A slightly better way might be to integrate into a "public" place in Twisted and use that .. I would approve either kind of PR :) but the first one is easy and doesn't need co-ordinated releases

@meejah
Copy link
Member

meejah commented Aug 29, 2024

Ah, this is already fixed in 947bb85 ... it is in release 0.15.0 from earlier this month: https://pypi.org/project/magic-wormhole/0.15.0/

@meejah meejah closed this as completed Aug 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
@meejah @ParzivalWolfram and others