-
Notifications
You must be signed in to change notification settings - Fork 104
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
AttributeError __spec__ on Python 3.11 #273
Comments
This may require a coordinated release of py and apipkg, im not sure if I have the near term capacity If the pending apipkg 2 can work, ill haste the release Else i need to find time/motivation to fix apipkg for python 3.11 |
Well there's no rush of course, as Python 3.11 is not gonna be released soon 🙂 |
First a verification of standalone apipkg is needed, then after fix it has to be included in the vendored items |
The cause of this error I tracked down to this change (commit 0a8ae8a50a0fea3d39ec49b220a5c7a5b70e36f8 in cpython): it introduces the
From the stack in importlib: File /data/media/0/src/python3/src/Lib/importlib/_bootstrap.py, line 1044, in _find_and_load
return _find_and_load_unlocked(name, import_):
File /data/media/0/src/python3/src/Lib/importlib/_bootstrap.py, line 994, in _find_and_load_unlocked
_call_with_frames_removed(import_, parent):
File /data/media/0/src/python3/src/Lib/importlib/_bootstrap.py, line 241, in _call_with_frames_removed
return f(*args, **kwds):
File /data/media/0/src/python3/src/Lib/importlib/_bootstrap.py, line 1044, in _find_and_load
return _find_and_load_unlocked(name, import_):
File /data/media/0/src/python3/src/Lib/importlib/_bootstrap.py, line 1004, in _find_and_load_unlocked
parent_spec = parent_module.__spec__: |
@greyblue9 thansk for the update, so i will update the vendored copy next |
@greyblue9 i finished the upgrade of the vendored copy, it be neat to get a quick verify just in case so we can prepare a release |
I copied the contents of https://github.com/pytest-dev/apipkg/blob/main/src/apipkg/__init__.py into |
@pawamoy awesome, thanks |
Now when Python 3.11.0a1 is out, we (Fedora) got hit by this on our CI. |
Sorry, I didn't see your comment until just now. What should I do to verify? |
@greyblue9 no longer needed, initial verification already happened, we need to release now |
thanks @RonnyPfannschmidt , let me know if I can be of any further help |
@RonnyPfannschmidt Is there anything we can do to expedite the release? We are reporting Python 3.11 test failures to various other open source projects and broken pytest makes it harder to reproduce them for their maintainers. Re-installing py from the master branch works. Let me know if you need to check this py change on all Fedora packages to see if it doesn't break anything else, or if there is anything else we can do. Thanks ;) |
@hroncok release is out, happy testing |
closing as released |
https://bugs.webkit.org/show_bug.cgi?id=249564 Reviewed by Jonathan Bedard. test-webkitpy was failing to run with Python 3.11. AttributeError exception was thrown in apipkg.py of py. The latest py 1.11.0 fixed the problem. <pytest-dev/py#273> Upgraded all pytest related modules to the latest. py 1.11.0 supports Python 2.7 and >3.5. pytest 7.2.0 and pytest-asyncio 0.20.3 support Python >3.7. pytest-timeout 2.1.0 supports Python >3.6. * Tools/Scripts/webkitpy/__init__.py: Canonical link: https://commits.webkit.org/258166@main
This comment was marked as off-topic.
This comment was marked as off-topic.
* Remove relevant usage of `six.moves` in ramble and vendored deps * Update `py` dep to the latest [head](https://github.com/pytest-dev/py/tree/6b219734fcd8d2f6489c2f50585a435b34c029c2/py), due to pytest-dev/py#273.
* Remove relevant usage of `six.moves` in ramble and vendored deps * Update `py` dep to the latest [head](https://github.com/pytest-dev/py/tree/6b219734fcd8d2f6489c2f50585a435b34c029c2/py), due to pytest-dev/py#273.
Running pytest on Python 3.11:
Note: I'm using PDM which uses .pth files in
__pypackages__
that point to actual installed packages in~/.cache/pdm/packages
(it allows dedup of packages across projects, saving space and installation time). Not sure this has to do with the issue, but I hear py/apipkg do some black magic on themselves, so this might conflict. It works well on other Python versions though (3.8, 3.9 and 3.10).The text was updated successfully, but these errors were encountered: