-
-
Notifications
You must be signed in to change notification settings - Fork 30.5k
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
gh-101819: Isolate _io #101948
gh-101819: Isolate _io #101948
Conversation
When you're done making the requested changes, leave the comment: |
Also remove calls to _PyIOBase_finalize from dealloc funcs
🤖 New build scheduled with the buildbot fleet by @kumaraditya303 for commit ab1baf4 🤖 If you want to schedule another build, you need to add the 🔨 test-with-buildbots label again. |
Hm, Serhiy's general fix (gh-22870) was committed just before the _csv extension module was adapted (gh-23224). When I try pickling with protocols 0 and 1 in the REPL, I get a correct TypeError for the _io types. It's strange that this is not the behaviour we're also seeing in |
Did you remove the |
Probably not; I tried again yesterday, and it also pickled without error. I'm not an expert on pickle either, but it seems to me we've found a corner case where Serhiy's fix of 2020 does not apply. One option can be to fix |
Agreed, I'll make a final review and merge by later today. |
root@codespaces-62bef3 /w/cpython (isolate-io/poc) [SIGINT]# ./python -m test -R 3:3 test_io
0:00:00 load avg: 7.01 Run tests sequentially
0:00:00 load avg: 7.01 [1/1] test_io
beginning 6 repetitions
123456
......
test_io passed in 3 min 31 sec
== Tests result: SUCCESS ==
1 test OK.
Total duration: 3 min 31 sec
Tests result: SUCCESS
|
Finally! |
* main: (29 commits) pythongh-101819: Fix _io clinic input for unused base class method stubs (python#104418) pythongh-101819: Isolate `_io` (python#101948) Bump mypy from 1.2.0 to 1.3.0 in /Tools/clinic (python#104501) pythongh-104494: Update certain Tkinter pack/place tests for Tk 8.7 errors (python#104495) pythongh-104050: Run mypy on `clinic.py` in CI (python#104421) pythongh-104490: Consistently define phony make targets (python#104491) pythongh-67056: document that registering/unregistering an atexit func from within an atexit func is undefined (python#104473) pythongh-104487: PYTHON_FOR_REGEN must be minimum Python 3.10 (python#104488) pythongh-101282: move BOLT config after PGO (pythongh-104493) pythongh-104469 Convert _testcapi/float.c to use AC (pythongh-104470) pythongh-104456: Fix ref leak in _ctypes.COMError (python#104457) pythongh-98539: Make _SSLTransportProtocol.abort() safe to call when closed (python#104474) pythongh-104337: Clarify random.gammavariate doc entry (python#104410) Minor improvements to typing docs (python#104465) pythongh-87092: avoid gcc warning on uninitialized struct field in assemble.c (python#104460) pythonGH-71383: IDLE - Document testing subsets of modules (python#104463) pythongh-104454: Fix refleak in AttributeError_reduce (python#104455) pythongh-75710: IDLE - add docstrings and comments to editor module (python#104446) pythongh-91896: Revert some very noisy DeprecationWarnings for `ByteString` (python#104424) Add a mention of PYTHONBREAKPOINT to breakpoint() docs (python#104430) ...
* main: (204 commits) pythongh-101819: Fix _io clinic input for unused base class method stubs (python#104418) pythongh-101819: Isolate `_io` (python#101948) Bump mypy from 1.2.0 to 1.3.0 in /Tools/clinic (python#104501) pythongh-104494: Update certain Tkinter pack/place tests for Tk 8.7 errors (python#104495) pythongh-104050: Run mypy on `clinic.py` in CI (python#104421) pythongh-104490: Consistently define phony make targets (python#104491) pythongh-67056: document that registering/unregistering an atexit func from within an atexit func is undefined (python#104473) pythongh-104487: PYTHON_FOR_REGEN must be minimum Python 3.10 (python#104488) pythongh-101282: move BOLT config after PGO (pythongh-104493) pythongh-104469 Convert _testcapi/float.c to use AC (pythongh-104470) pythongh-104456: Fix ref leak in _ctypes.COMError (python#104457) pythongh-98539: Make _SSLTransportProtocol.abort() safe to call when closed (python#104474) pythongh-104337: Clarify random.gammavariate doc entry (python#104410) Minor improvements to typing docs (python#104465) pythongh-87092: avoid gcc warning on uninitialized struct field in assemble.c (python#104460) pythonGH-71383: IDLE - Document testing subsets of modules (python#104463) pythongh-104454: Fix refleak in AttributeError_reduce (python#104455) pythongh-75710: IDLE - add docstrings and comments to editor module (python#104446) pythongh-91896: Revert some very noisy DeprecationWarnings for `ByteString` (python#104424) Add a mention of PYTHONBREAKPOINT to breakpoint() docs (python#104430) ...
It's good to see I'm happy that these changes were merged as a long list of changes (see PR list in issue #101819): if something will go wrong, it will be easier to identify which sub-part of these changes is causing troubles. I expect troubles, but that's fine. We already have to go trough turbulences to modernize Python ;-) Thanks @erlend-aasland and @kumaraditya303 for your hard work on this complicated _io extension. |
🤖 New build scheduled with the buildbot fleet by @sunmy2019 for commit fe2db1b 🤖 If you want to schedule another build, you need to add the 🔨 test-with-refleak-buildbots label again. |
@sunmy2019, why did you engage the refleak bots on a closed PR? Did you check the results of the refleak run that Kumar did for the same commit (fe2db1b) yesterday first? (All 31 checks passed.) |
It should not pass the ref leaks tests. #104510 Just rerun to check what's going on. Also, I should not trigger builtbot on a merged PR. It seems nothing will be tested. That's my bad. |
Yes. And you can examine the refleak run Kumar did post merge. I did yesterday. I'm not sure why that passed, though. |
Your PR was created in February. Maybe the code evolved in the meanwhile and the final "squash + rebase" commit is different than the PR branch ran on buildbots. For such PR which is in the works for a long time, I prefer to manually squash+rebase time to time to workaround this workflow limitation. There are services like https://mergify.com/ which prevent this workflow flaw. I heard that GitHub automerge can do something similar (run GHA jobs on the "final" commit), but buildbots are not handled and use the old way (run the jobs on the PR branch which is not merged into main / rebased). |
Restores “pickle-ability” of IndexedGzipFile in Python 3.12, which was broken due to python/cpython#101948.
Restores “pickle-ability” of IndexedGzipFile in Python 3.12, which was broken due to python/cpython#101948. Fixes pauldmccarthy#125.
Proof-of-concept. We will split this change up in multiple PRs
_io
extension module #101819