-
Notifications
You must be signed in to change notification settings - Fork 274
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
common/reloader: import reload from importlib (Python 3.12 compatibility) #2093
common/reloader: import reload from importlib (Python 3.12 compatibility) #2093
Conversation
The imp module is deprecated since Python 3.4 [1]. The import was added even after it was deprecated in [2]. In Python 3.12 the imp module will be removed. Use the reload function from importlib, which is the designated replacement [1]. With crossbario#2091 and this change, crossbar can be installed and run on Python 3.12 with: - numpy>=1.26.0b1 - wsaccel @ git+https://github.com/methane/wsaccel@v0.6.4 (assuming cython>=3.0.0 is installed, tarball from pypi won't work [3]) [1] https://docs.python.org/3.11/library/imp.html [2] crossbario@21910b0 [3] methane/wsaccel#30
thanks a lot for the detailed infos in the PR! so just to be sure: crossbar supports python 3.7+ ( Line 107 in 03d7057
if so, I'd just merge it - the CI won't run on GH because of #2092 |
Right,
Alright. |
@oberstet do you know if there will be a new release soon containing these changes? Fedora 39 is having issues, as will any other distros that start shipping Python 3.12. |
@threexc here is the long explanation: there definitely will be a new release, and Python 3.12 will definitely be fully supported of course. as will be PyPy. and ARM64. and development will continue (e.g. I'm also involved in WAMP spec level work and new and polished things there). the main work tbd here isn't in the unmerged PRs, but in again fixing the CI. the reason why this has turned out to be a significant source of work over the years is: the amount and breadth of dependencies this package includes, the fact that it is quite a non-trivial package, and the deficiencies in Python dependency management in general (which is IMO one of the biggest language/run-time level issues remaining after the move to Unicode and async) in the ecosystem, but that's only a personal opinion and side note. the latter has over the years quite disillusioned myself in any hope that someone (eg myself) would be able to fix all this once and for all in whatever big effort required. once and for all. If I would believe in such a possibility, I might get my act and motivation together and just do it. contrary I do know it is significant, nerve wrecking work and it will remain so. sadly I am not paid for it and unfortunately I am living in a world where I have to pay bills, so I am busy with other things that do in fact earn bucks. at some point I will personally feel the pain and get fed up by lack of Python 3.12, and then I will fix it no matter what. |
crossbar is not compatible with Python 3.12, yet: [1] and [2] are not part of a release. A release will probably take some more time [3][4]. Since this is the last remaining issue before we can advertise Python 3.12 support, let's mark these tests as XFAIL for now. [1] crossbario/crossbar#2091 [2] crossbario/crossbar#2093 [3] crossbario/crossbar#2093 (comment) [4] crossbario/crossbar#2091 (comment) Signed-off-by: Bastian Krause <basti@randomprojects.de>
crossbar is not compatible with Python 3.12, yet: [1] and [2] are not part of a release. A release will probably take some more time [3][4]. We shouldn't advertise Python 3.12 support until that happens. But we can make sure that everything else keeps working fine with Python 3.12 by running the test suite. A previous commit marked the failing crossbar tests as XFAIL for 3.12. [1] crossbario/crossbar#2091 [2] crossbario/crossbar#2093 [3] crossbario/crossbar#2093 (comment) [4] crossbario/crossbar#2091 (comment) Signed-off-by: Bastian Krause <bst@pengutronix.de>
crossbar is not compatible with Python 3.12, yet: [1] and [2] are not part of a release. A release will probably take some more time [3][4]. Since this is the last remaining issue before we can advertise Python 3.12 support, let's mark these tests as XFAIL for now. [1] crossbario/crossbar#2091 [2] crossbario/crossbar#2093 [3] crossbario/crossbar#2093 (comment) [4] crossbario/crossbar#2091 (comment) Signed-off-by: Bastian Krause <basti@randomprojects.de>
crossbar is not compatible with Python 3.12, yet: [1] and [2] are not part of a release. A release will probably take some more time [3][4]. We shouldn't advertise Python 3.12 support until that happens. But we can make sure that everything else keeps working fine with Python 3.12 by running the test suite. A previous commit marked the failing crossbar tests as XFAIL for 3.12. [1] crossbario/crossbar#2091 [2] crossbario/crossbar#2093 [3] crossbario/crossbar#2093 (comment) [4] crossbario/crossbar#2091 (comment) Signed-off-by: Bastian Krause <bst@pengutronix.de>
crossbar is not compatible with Python 3.12, yet: [1] and [2] are not part of a release. A release will probably take some more time [3][4]. Since this is the last remaining issue before we can advertise Python 3.12 support, let's mark these tests as XFAIL for now. [1] crossbario/crossbar#2091 [2] crossbario/crossbar#2093 [3] crossbario/crossbar#2093 (comment) [4] crossbario/crossbar#2091 (comment) Signed-off-by: Bastian Krause <bst@pengutronix.de>
crossbar is not compatible with Python 3.12, yet: [1] and [2] are not part of a release. A release will probably take some more time [3][4]. We shouldn't advertise Python 3.12 support until that happens. But we can make sure that everything else keeps working fine with Python 3.12 by running the test suite. A previous commit marked the failing crossbar tests as XFAIL for 3.12. [1] crossbario/crossbar#2091 [2] crossbario/crossbar#2093 [3] crossbario/crossbar#2093 (comment) [4] crossbario/crossbar#2091 (comment) Signed-off-by: Bastian Krause <bst@pengutronix.de>
No worries, thank you for the summary! |
The imp module is deprecated since Python 3.4 [1]. The import was added even after it was deprecated in [2]. In Python 3.12 the imp module will be removed.
Use the reload function from importlib, which is the designated replacement [1].
With #2091 and this change, crossbar master can be installed and run on Python 3.12 with:
AIOHTTP_NO_EXTENSIONS=1
provided for pip install, needed until aiohttp 4.0.0 is released to pypi.[1] https://docs.python.org/3.11/library/imp.html
[2] 21910b0
[3] methane/wsaccel#30