Repository navigation
Support for Python 3.11 #891
Copy link
Copy link
Closed
Description
We're using invoke internally and it seems to be the last dependency incompatible with Python 3.11.
Error we're getting is pasted below, probably not the last one.
Traceback (most recent call last):
File ".venv/bin/invoke", line 8, in <module>
sys.exit(program.run())
^^^^^^^^^^^^^
File ".venv/lib/python3.11/site-packages/invoke/program.py", line 373, in run
self.parse_collection()
File ".venv/lib/python3.11/site-packages/invoke/program.py", line 465, in parse_collection
self.load_collection()
File ".venv/lib/python3.11/site-packages/invoke/program.py", line 699, in load_collection
module, parent = loader.load(coll_name)
^^^^^^^^^^^^^^^^^^^^^^
File ".venv/lib/python3.11/site-packages/invoke/loader.py", line 76, in load
module = imp.load_module(name, fd, path, desc)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/imp.py", line 235, in load_module
return load_source(name, filename, file)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/imp.py", line 172, in load_source
module = _load(spec)
^^^^^^^^^^^
File "<frozen importlib._bootstrap>", line 721, in _load
File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 940, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "src/tasks.py", line 29, in <module>
@task(name="migrate")
^^^^^^^^^^^^^^^^^^^^
File ".venv/lib/python3.11/site-packages/invoke/tasks.py", line 357, in inner
obj = klass(
^^^^^^
File ".venv/lib/python3.11/site-packages/invoke/tasks.py", line 76, in __init__
self.positional = self.fill_implicit_positionals(positional)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File ".venv/lib/python3.11/site-packages/invoke/tasks.py", line 167, in fill_implicit_positionals
args, spec_dict = self.argspec(self.body)
^^^^^^^^^^^^^^^^^^^^^^^
File ".venv/lib/python3.11/site-packages/invoke/tasks.py", line 153, in argspec
spec = inspect.getargspec(func)
^^^^^^^^^^^^^^^^^^
AttributeError: module 'inspect' has no attribute 'getargspec'. Did you mean: 'getargs'?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Activity
oznogon commentedon Dec 4, 2022
Similar to/dupe of #833, which contains workarounds (shimming
getargspecor switching to a fork that applies the patch); #458 and #606 would fix this specific error if merged. Maintainers suggest this is blocked by #856 (remove python2 support).blazewicz commentedon Dec 23, 2022
I can confirm that issue was fixed with 8f6c061, we're awaiting for next release.
Snooz82 commentedon Jan 14, 2023
Any ideas when the next release will come?
blazewicz commentedon Jan 17, 2023
Support for 3.11 was brought with release 2.0.0 🎉 thanks @bitprophet!
Update python version to v3.10
fpstudy: Upgrade CherryPy to support Python 3.11