Skip to content

PEP 703 -- Making the Global Interpreter Lock Optional in CPython #188

Closed

Description

@colesbury

Please consider PEP 703 -- Making the Global Interpreter Lock Optional in CPython
https://peps.python.org/pep-0703/

  • The PEP has been discussed in threads listed in its Post-History header
  • The PEP was announced on Discuss (link in Post-History)
  • The PEP includes all relevant Suggested Sections
  • The PEP includes endorsements from the projects/groups/people it helps
  • The PEP has a CODEOWNERS entry

Activity

  1. added
    PEP
    on May 12, 2023
  2. gvanrossum commented on May 22, 2023

    @gvanrossum
    Member

    FWIW I don't think there has been enough public discussion on this PEP to leave it to the SC to decide yes or no. I know for a fact that in the Faster CPython team we have some concerns that we are planning to post on Discourse. (We've been swamped with 3.12 stuff so we haven't posted yet.)

  3. colesbury commented on May 22, 2023

    @colesbury
    Author

    The PEP has been posted for over four months and is one of the most discussed PEPs on discuss.python.org.

  4. gvanrossum commented on May 22, 2023

    @gvanrossum
    Member

    Not much was said in response to the 3.12 update though, which felt substantial from your summary.

  5. gpshead commented on Jun 3, 2023

    @gpshead
    Member

    The steering council is going to take its time on this. A huge thank you for working to keep it up to date! We're not ready to simply pronounce on 703 as it has a HUGE blast radius.

    Software isn't ready for the decades of Python assumptions such a change turns on its head, even when it appears to work fine it's a statistical qualm of "but does it really? how do we actually know? when might it not and how often?" asked for every transitive dep of code. For some things that Q&A could be easy, but for others it becomes a can of worms.

    From a steering council perspective we effectively view a 703 threading enabled interpreter at a high level as a fork of the CPython VM. In the sense that extension modules are unlikely to work without noteworthy modifications and even some pure Python libraries may even need to start considering locking where it had not in the past.

    That does not mean "no" to this. There is demand for it. (personally, I've wanted this since forever!) It's just that it won't be easy and we'll need to consider the entire ecosystem and how to smoothly allow such a change to happen without breaking the world.

    I'm glad to see the continued discuss thread with faster-cpython folks in particular piping up. The intersection between this work and ongoing single threaded performance improvements will always be high and we don't want to hamper that in the near term.

    -- me with a steering council hat on

  6. gvanrossum commented on Jun 5, 2023

    @gvanrossum
    Member

    Maybe you could add that to the Discourse thread, where others may find it? (Or just link here.)

  7. colesbury commented on Jun 7, 2023

    @colesbury
    Author

    Hi Gregory and the Steering Council,

    Thanks for reviewing the PEP. The PEP was posted five months ago, and it has been 20 months since an end-to-end working implementation (that works with a large number of extensions) was discussed on python-dev. I appreciate everyone who has taken the time to review the PEP and offer comments and suggestions.

    You wrote that the Steering Council's decision does not mean "no," but the steering council has not set a bar for acceptance, stated what evidence is actually needed, nor said when a final decision will be made. Given the expressed demand for PEP 703, it makes sense to me for the steering committee to develop a timeline for identifying the factors it may need to consider and for determining the steps that would be required for the change to happen smoothly.

    Without these timelines and milestones in place, I would like to explain that the effect of the Steering Council's answer is a "no" in practice. I have been funded to work on this for the past few years with the milestone of submitting the PEP along with a comprehensive implementation to convince the Python community. Without specific concerns or a clear bar for acceptance, I (and my funding organization) will have to treat the current decision-in-limbo as a “no” and will be unable to pursue the PEP further.

  8. gpshead commented on Jun 7, 2023

    @gpshead
    Member

    Your work on this has been extremely valuable, thanks for all you've done!

  9. ctismer commented on Jun 8, 2023

    @ctismer

    I have tested this patch intensively and was even able to use it with PySide6 - a pretty huge CPython extension!
    If this NoGil variant is optional and by default switched off: What is then the problem to include it as a, say, optional test version? Does the SC fear that it cannot revert a possibly wrong decision and therefore needs to leave it in infinite limbo?
    Or are there just too many things going on and to few people available who work on it...

    My personal wish is that it gets into 3.13 as an option which is by default off. I am convinced that people will really hurry to support this gem and enhance their extensions.
    I started that already for PySide6.

  10. gpshead commented on Jun 9, 2023

    @gpshead
    Member

    Lets please have discussion over on the discuss thread.

  11. ytrezq commented on Aug 16, 2023

    @ytrezq

    Lets please have discussion over on the discuss thread.

    Thread is locked so that s not possible.

    Either way, what I say might be complete garbage but since a lot of the tasks to ensure thread safety would if be possible to create a tool in a similar flashing than https://www.codeconvert.ai/?

  12. brettcannon commented on Aug 16, 2023

    @brettcannon
    Member

    @ytrezq please start a separate discussion at discuss.python.org.

  13. davidfstr commented on Nov 5, 2023

    @davidfstr

    Given that PEP 703 - which this thread is about - has been accepted, should this issue be closed?

  14. gpshead commented on Nov 5, 2023

    @gpshead
    Member

    LOL yes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    PEP

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions