Skip to content
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

Python 3.11rc2 support #1908

Merged
merged 13 commits into from Oct 8, 2022
Merged

Python 3.11rc2 support #1908

merged 13 commits into from Oct 8, 2022

Conversation

jamadden
Copy link
Member

@jamadden jamadden commented Oct 7, 2022

Based on #1872 with the following updates:

  • Resolved the reference leaks. These were the source of the tree format failures as well as the test__threading_2 failure.
  • Resolved the runtime warning from Cython about FrameType changing size.
  • Added the Python 3.11 stdlib tests and got them passing (updates to socket and subprocess were required; all in all, one of the simpler updates as far as those go).
  • Let the gevent threadpool time out idle threads; this was needed during early testing to prevent the thread cleanup function in the stdlib socket tests from complaining about the new threads added for DNS in this threadpool. But it seems like a generally helpful feature.
  • Let gevent.config show help. Because I'd been away from this codebase long enough I forgot some of the environment variables.

I'd like to take a crack at fixing the rest of the warnings from Cython about DEF, but that'll probably be separate.

vstinner and others added 13 commits October 5, 2022 13:24
Co-Authored-By: Petr Viktorin <encukou@gmail.com>
Leaving some notes about needed cleanup.

This first push is just to make sure all the other versions besides 3.11 continue to do their thing.
All tests pass locally on 3.10 except one, reported earlier: test_no_refcycle_through_target (gevent.tests.test__threading_2.ThreadTests)
And a new one that is similar:    test_no_refcycle_through_target (__main__.ThreadTests)

I haven't tried to debug that yet.
…hat we see there.

Haven't tried any of the 3.11-specific tests yet.
Exiting when idle is because 3.11's test_socket.BasicTCPTest.testDetach() was always failing complaining about a leaked thread. Turns out this thread was from the default threadpool used for DNS resolution.
Something must have changed to cause the first DNS resolution to occur during that test, and hence the first thread to be spawned.  This is opt-in for all thread pools, with the default thread pool opting
in by default; but a config setting allows that to be changed.

Most 3.11 tests pass, except for some in test_subprocess where new functionality was added.
This should fix the refleaks in general (it was a frame object that was leaking).
Submitting to CI for broad test, and if it is good then we will try backing out the test__util changes too.

Also make it possible for gevent.config to show help.
…the tree format tests on mac.

subprocess needed a new check added to check_output, and needed process_group implemented.

because all the leakcheck tests finished successfully after the last commit, and because it sure looks like a refcounting issues in the tree formatting tests (leaked greenlets causing the numbering to be off), try enabling them for this run.

fixes #1872
refs #1867
…ize.

By simply not typing it at the Cython level at all. No need since we're directing through functions now.
@jamadden jamadden merged commit 65417fe into master Oct 8, 2022
@jamadden jamadden deleted the jam-py311-wip branch October 8, 2022 12:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants