Skip to content

PYTHON-3745 Add support for multiphase initialization #1434

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

Closed
wants to merge 3 commits into from

Conversation

blink1073
Copy link
Member

No description provided.

@blink1073 blink1073 requested a review from a team as a code owner November 16, 2023 15:32
@blink1073 blink1073 requested review from NoahStapp and removed request for a team November 16, 2023 15:32
@blink1073
Copy link
Member Author

I scheduled all of the mod_wsgi tests to exercise subinterpreters.

Copy link
Member

@ShaneHarvey ShaneHarvey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we set https://docs.python.org/3/c-api/module.html#c.Py_MOD_MULTIPLE_INTERPRETERS_SUPPORTED on 3.12+? IIUC that's what we support. The new work would be to set Py_MOD_PER_INTERPRETER_GIL_SUPPORTED.

Without Py_MOD_MULTIPLE_INTERPRETERS_SUPPORTED I think this change could break some users.

@blink1073
Copy link
Member Author

Without Py_MOD_MULTIPLE_INTERPRETERS_SUPPORTED I think this change could break some users.

Fixed

@blink1073
Copy link
Member Author

mod_wsgi 4.x Python 3.7 Ubuntu 22.04 is failing intermittently, both with and without the Py_MOD_MULTIPLE_INTERPRETERS_SUPPORTED block. mod_wsgi is a bit of a black box, should we skip that particular configuration and wait until we can more directly test multiple interpreters?

@ShaneHarvey
Copy link
Member

mod_wsgi 4.x Python 3.7 Ubuntu 22.04 is failing intermittently

Is it also failing on main or only after the multiphase changes?

@blink1073
Copy link
Member Author

After the multiphase changes

@ShaneHarvey
Copy link
Member

I suggest we open a mod_wsgi issue to ask if multiphase init modules are supported: https://github.com/GrahamDumpleton/mod_wsgi

@blink1073
Copy link
Member Author

blink1073 commented Nov 21, 2023

It's the interpreter itself that defines compat as I understand it, the feature should be usable from Python 3.5. I propose we close this PR and restart when we can test directly against subinterpreters to see if there is an actual bug.

@ShaneHarvey
Copy link
Member

I think it could be a bug in mod_wsgi because it has custom code to create subinterpreters. We'll also still need to keep the mod_wsgi tests even once we can test subinterpreters directly so I think we should try investigating the mod_wsgi bug now to avoid delaying this change.

@blink1073
Copy link
Member Author

I'm going to have to backlog this for now until I finish OIDC work.

@blink1073 blink1073 marked this pull request as draft November 28, 2023 20:02
@ShaneHarvey
Copy link
Member

Closing in favor of #1499

@ShaneHarvey ShaneHarvey closed this Feb 2, 2024
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.

3 participants