[all] Python 3.12 issues and classes of bugs, helping me fixing them all...
Hi there! Since a few days, we have Python 3.12 as available interpreter version in Debian Unstable. All Debian packages were rebuilt by Lucas Neusbaumm, and about 60 Debian RC bugs were filled against the OpenStack related packages. You may have seen it in some of your projects, I was able to fix lots of bugs (so far: 28 bugs fixed since Wednesday morning, and counting...), and forwarded them to upstream OpenStack whenever possible: https://review.opendev.org/c/openstack/os-ken/+/903521 https://review.opendev.org/c/openstack/sahara-plugin-spark/+/903656 https://review.opendev.org/c/openstack/keystonemiddleware/+/903640 https://review.opendev.org/c/openstack/os-ken/+/903521 https://review.opendev.org/c/openstack/sahara-plugin-spark/+/903656 https://review.opendev.org/c/openstack/keystonemiddleware/+/903640 I'd appreciate reviews and merge for these, of course... Many reported issues were problems in a single package (like Eventlet, or taskflow not able to load asyncore), so some bugs were closed without any further action but an attempt of rebuilding the said package to check everything is as expected. However, for a lot of bugs, I do not know how to fix, which leads me to this message. Of course, mostly the hardest bugs are remaining now, as I fixes the most easy ones. Here's a few examples. In Barbican: https://bugs.debian.org/1058183 What is this "KeyError: slice(0, -1, None)" about? Many packages have the same issue (like networking-sfc, neutron-dynamic-routing, neutron-vpnaas, manila, rally and many others), so if I understand this class of bug, I'll be able to fix them all. Help would be very much appreciated on that one. In openstackclient: https://bugs.debian.org/1058097 The stackdump is: 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>", line 1176, in exec_module File "<frozen codecs>", line 58, in <module> AttributeError: module 'sys' has no attribute 'byteorder' I don't really understand what's going on, but this smells like an issue in Python 3.12 itself. watcher: https://bugs.debian.org/1058377 looks like the interpreter segfauls when importing some modules in watcher.tests.api ?!? Mistral: https://bugs.debian.org/1058182 Manila: https://bugs.debian.org/1058182 AssertionError: Failed to wait for expected result: Execution f2a97f87-7b08-4171-819a-47e30a0a1840 must have reached state SUCCESS state but it is in RUNNING What's going on here? diskimage-builder: I was able to fix the "ModuleNotFoundError: No module named 'imp'" (that's trivial to fix, really...), but now I get: File "/usr/lib/python3/dist-packages/mock/mock.py", line 1245, in _importer thing = __import__(import_path) ^^^^^^^^^^^^^^^^^^^^^^^ ModuleNotFoundError: No module named 'growvols' looks like what I attempted to fix with rewriting a load_source (which is removed from Python 3.12) didn't work. python-pykmip: https://bugs.debian.org/1058411 That one feels tricky. wrap_socket is gone from the standard ssl module, though the example given in here: https://docs.python.org/3/library/ssl.html#ssl.SSLContext.wrap_socket is to use something like this: with context.wrap_socket(sock, server_hostname=hostname) as ssock: but that wont work with the way pykmip is written. So probably it needs some kind of rewrite? Looks like there's some commits upstream to address it, but no new release, unfortunately. I probably should attempt packaging the last Git commit. oslotest: https://bugs.debian.org/1058373 The broken test case attemps to disable the 'sys' module, but it looks like its failing to do so. Is there a change of behavior in the interpreter? wsgi-intercept: https://bugs.debian.org/1058378 TypeError: HTTPSConnection.__init__() got an unexpected keyword argument 'cert_file' No idea how to fix that one... :/ There's more which I probably didn't classify above. The full list of bugs is here: https://bugs.debian.org/cgi-bin/pkgreport.cgi?which=maint&data=team%2Bopenstack%40tracker.debian.org&archive=no&raw=yes&bug-rev=yes&pend-exc=fixed&pend-exc=done Please ignore the first 5 though, which I don't really maintain and don't really care about (these aren't Py 3.12 issues). Many thanks to anyone that will help. Cheers, Thomas Goirand (zigo)
On Fri, Dec 15, 2023 at 9:01 PM Thomas Goirand <zigo@debian.org> wrote:
diskimage-builder: I was able to fix the "ModuleNotFoundError: No module named 'imp'" (that's trivial to fix, really...), but now I get:
File "/usr/lib/python3/dist-packages/mock/mock.py", line 1245, in _importer thing = __import__(import_path) ^^^^^^^^^^^^^^^^^^^^^^^ ModuleNotFoundError: No module named 'growvols'
looks like what I attempted to fix with rewriting a load_source (which is removed from Python 3.12) didn't work.
https://review.opendev.org/c/openstack/diskimage-builder/+/903848 works for me with Python 3.12 ... this is kind of a crazy one because we're running unit tests on a file we usually drop into the built-image container as a utility, so the file is being loaded into the unittests as a module manually. -i
On 15/12/23 22:52, Thomas Goirand wrote:
In Barbican: https://bugs.debian.org/1058183
What is this "KeyError: slice(0, -1, None)" about?
https://github.com/sqlalchemy/sqlalchemy/issues/9819
Many packages have the same issue (like networking-sfc, neutron-dynamic-routing, neutron-vpnaas, manila, rally and many others), so if I understand this class of bug, I'll be able to fix them all. Help would be very much appreciated on that one.
Hello, I just fixed the eventlet side https://github.com/eventlet/eventlet/pull/854 Now asyncore and asynchat are only loaded within python versions strictly lower to 3.12. I just created a new release a of eventlet (0.34.1) which contains this fix https://pypi.org/project/eventlet/0.34.1/ Let us know if you still face issue with asyncore and asynchat by reopening https://github.com/eventlet/eventlet/issues/804 Cheers Le mer. 20 déc. 2023 à 09:48, Zane Bitter <zbitter@redhat.com> a écrit :
On 15/12/23 22:52, Thomas Goirand wrote:
In Barbican: https://bugs.debian.org/1058183
What is this "KeyError: slice(0, -1, None)" about?
https://github.com/sqlalchemy/sqlalchemy/issues/9819
Many packages have the same issue (like networking-sfc, neutron-dynamic-routing, neutron-vpnaas, manila, rally and many others), so if I understand this class of bug, I'll be able to fix them all. Help would be very much appreciated on that one.
-- Hervé Beraud Senior Software Engineer at Red Hat irc: hberaud https://github.com/4383/
participants (4)
-
Herve Beraud
-
Ian Wienand
-
Thomas Goirand
-
Zane Bitter