Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-101819: Isolate _io#101948

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
kumaraditya303 merged 86 commits intopython:mainfromerlend-aasland:isolate-io/poc
May 15, 2023
Merged

Conversation

erlend-aasland
Copy link
Contributor

@erlend-aaslanderlend-aasland commentedFeb 16, 2023
edited by bedevere-bot
Loading

Proof-of-concept. We will split this change up in multiple PRs

@bedevere-bot
Copy link

When you're done making the requested changes, leave the comment:I have made the requested changes; please review again.

@bedevere-bot
Copy link

🤖 New build scheduled with the buildbot fleet by@kumaraditya303 for commitab1baf4 🤖

If you want to schedule another build, you need to add the🔨 test-with-buildbots label again.

@bedevere-botbedevere-bot removed the 🔨 test-with-buildbotsTest PR w/ buildbots; report in status section labelMay 12, 2023
@erlend-aasland
Copy link
ContributorAuthor

I am not sure how it is not needed. I see similar thing done in_csv module.

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 intest_pickling.

@kumaraditya303
Copy link
Contributor

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 test_pickling.

Did you remove the_PyIOBase_cannot_pickle before doing that? I tried and it pickled without error. Anyways I am not really an expert on pickle.

@erlend-aasland
Copy link
ContributorAuthor

Did you remove the_PyIOBase_cannot_pickle before doing that? I tried and it pickled without error. Anyways I am not really an expert on pickle.

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 fixLib/copyreg.py. In any case, I suggest to land this PR with the pickleworkaround in it. If we end up patching Serhiy's general pickle fix, we can revert the workaround introduced here (as Serhiy's patch did with other extension modules back in 2020).

@kumaraditya303
Copy link
Contributor

Agreed, I'll make a final review and merge by later today.

erlend-aasland reacted with thumbs up emoji

@kumaraditya303
Copy link
Contributor

root@codespaces-62bef3 /w/cpython (isolate-io/poc) [SIGINT]# ./python -m test -R 3:3 test_io0:00:00 load avg: 7.01 Run tests sequentially0:00:00 load avg: 7.01 [1/1] test_iobeginning 6 repetitions123456......test_io passed in 3 min 31 sec== Tests result: SUCCESS ==1 test OK.Total duration: 3 min 31 secTests result: SUCCESS
erlend-aasland reacted with rocket emoji

@kumaraditya303kumaraditya303enabled auto-merge (squash)May 15, 2023 09:17
@kumaraditya303kumaraditya303 merged commit186bf39 intopython:mainMay 15, 2023
@kumaraditya303kumaraditya303 deleted the isolate-io/poc branchMay 15, 2023 09:26
@erlend-aasland
Copy link
ContributorAuthor

Finally!

carljm added a commit to carljm/cpython that referenced this pull requestMay 15, 2023
* 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)  ...
carljm added a commit to carljm/cpython that referenced this pull requestMay 15, 2023
* 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)  ...
@vstinner
Copy link
Member

It's good to see_PyIO_get_module_state() going away :-) Also, bye bye mystatic_types and_PyIO_FiniTypes() workarounds!

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.

erlend-aasland, kumaraditya303, and ericsnowcurrently reacted with heart emoji

@sunmy2019sunmy2019 added the 🔨 test-with-refleak-buildbotsTest PR w/ refleak buildbots; report in status section labelMay 15, 2023
@bedevere-bot
Copy link

🤖 New build scheduled with the buildbot fleet by@sunmy2019 for commitfe2db1b 🤖

If you want to schedule another build, you need to add the🔨 test-with-refleak-buildbots label again.

@bedevere-botbedevere-bot removed the 🔨 test-with-refleak-buildbotsTest PR w/ refleak buildbots; report in status section labelMay 15, 2023
@erlend-aasland
Copy link
ContributorAuthor

@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.)

@sunmy2019
Copy link
Member

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.

@erlend-aasland
Copy link
ContributorAuthor

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.

@vstinner
Copy link
Member

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 likehttps://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).

erlend-aasland reacted with thumbs up emoji

musicinmybrain added a commit to musicinmybrain/indexed_gzip that referenced this pull requestJul 11, 2023
Restores “pickle-ability” of IndexedGzipFile in Python 3.12, which wasbroken due topython/cpython#101948.
musicinmybrain added a commit to musicinmybrain/indexed_gzip that referenced this pull requestJul 11, 2023
Restores “pickle-ability” of IndexedGzipFile in Python 3.12, which wasbroken due topython/cpython#101948.Fixespauldmccarthy#125.
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@kumaraditya303kumaraditya303kumaraditya303 approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

6 participants
@erlend-aasland@bedevere-bot@kumaraditya303@vstinner@sunmy2019@hauntsaninja

[8]ページ先頭

©2009-2025 Movatter.jp