Can SQLAlchemy benefit from PEP 703 (making the GIL optional)? #10002
Replies: 1 comment 12 replies
-
hi yes, had some back and forth on fosstodon about this, have only skimmed the spec but for SQLAlchemy directly, this pep would be a lose for us:
Basically it's one thing to "remove the GIL" from python, OK that would be challenging, but to make it an option, that would be basically really bad for us as far as testing / CI / support (and also might be seen as a bit of a red flag; by being an option only, it's a given that GIL-less mode is free to break existing code, perhaps it would be better to move Python forward first to a fully compliant language first before adding this mode. will there be a warnings mode for code that does non-GIL-less unsafe things? ). We'd have users demanding compatibility for this new mode immediately and it's unknown the extent of changes which would be needed in SQLAlchemy to accommodate them. I see there's a test branch I can "try out" but our test suite has only a relatively small number of thread-related tests, so it's unknown how many issues our current test suite could even find. Basically for the moment the GIL-less idea would likely be burdensome for us and the fact that it's only an "option" seems to strongly imply major compatibility issues that we would not prefer. |
Beta Was this translation helpful? Give feedback.
-
Hi!
I'm Gabriel de Marmiesse and I'm helping Sam Gross to find out if maintainers of selected Python packages would benefit from PEP703.
If you don't know what is PEP 703, it's about making the global interpreter lock (GIL) optional.
Long story short, there would be a ~10% performance impact on single threaded programs, but would allow multithreaded programms to take full advantage of multiple cores.
You can play with it here.
If you have the time, we would like to know is if the maintainers of SQLAlchemy would benefit from PEP 703 or not. There are multiple situation SQLAlchemy could be in.
The Python language could never use multiple cores with multithreading, so it's hard to imagine what the future of the language would look like if we were to enable it. Feel free to tell us if you see new potential use cases with this PEP. Thanks for your time!
If you want to know more about PEP 703:
Beta Was this translation helpful? Give feedback.
All reactions