FYI gevent PRs are now merged, so we are now able to continue the work about Python 3.13 on the eventlet side

Le lun. 26 août 2024 à 20:56, Cyril Roelandt <cyril@redhat.com> a écrit :
Hello,

On 2024-06-07 16:18, Herve Beraud wrote:
> Do you have some visibility concerning the adoption of Python 3.13 into
> Openstack?

I have just tried running unit tests for the various Glance-related
projects with Python 3.13, using a container[1] that allows me to use
manually built wheels for some dependencies. I used the following
patches:

- for evenlet, PR#965[2] and PR#966[3]
- for greenlet, PR#396[4]

I got the following results:
- glance_store runs all unit tests just fine;
- glance can install the dependencies and start running the unit tests,
  but they hang. As the name of the failing test is not printed on
  stdout/stderr, I have no clue what is going wrong;
- python-glanceclient does not depend on eventlet/greenlet, and all
  tests pass after applying a patch currently under review[5]. We also
  need to keep urllib3 <2.0.0 (but this is also an issue on Python3.12).

Some interesting lessons learnt here:
- the glanceclient patch[5] fixes issues caused by changes in
  implementation details for mock_open (on which we should have never
  relied). This might happen in other projects;
- the cgi module has been removed in 3.13, and webob depends on it, so
  we will need to help webob move away from cgi, or install the
  legacy-cgi package (which is what I had to do for glance &
  glance_store).

I could run some tests on other projects this week, feel free to ping
me.


[1] https://github.com/CyrilRoelandteNovance/py3-next-openstack
[2] https://github.com/eventlet/eventlet/pull/965
[3] https://github.com/eventlet/eventlet/pull/966
[4] https://github.com/python-greenlet/greenlet/pull/396
[5] https://review.opendev.org/c/openstack/python-glanceclient/+/924620


Cyril



--
Hervé Beraud
Senior Software Engineer at Red Hat
irc: hberaud