GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-155496: Use Argument Clinic for more functions of the _io module by serhiy-storchaka · Pull Request #155511 · python/cpython

Conversation

@serhiy-storchaka

@serhiy-storchaka serhiy-storchaka commented Aug 10, 2026

Copy link
Copy Markdown
Member

Convert the methods of BufferedRWPair, the readinto() and write() methods of _RawIOBase, __enter__(), __exit__() and the _check*() methods of _IOBase, the pickling support and __sizeof__() of BytesIO, and the private methods of FileIO.

BufferedRWPair now forwards the arguments to the reader or the writer without packing them into a tuple.

The __getstate__() methods are left as they are, because a single C function is shared by several types.

  • Issue: Use Argument Clinic for more functions and methods #155496

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@serhiy-storchaka
pythongh-155496: Use Argument Clinic for more functions of the _io mo…
9226d49
…dule
@bedevere-app bedevere-app Bot mentioned this pull request Aug 10, 2026
Use Argument Clinic for more functions and methods #155496
Closed
serhiy-storchaka added 9 commits August 13, 2026 21:05
@serhiy-storchaka
Update test_inspect for the new signatures
7e279ce
@serhiy-storchaka
Use the C API for calling a method
de988ef
PyObject_CallMethodNoArgs() and PyObject_CallMethodOneArg() look up the
method and call it in one step, without creating a bound method object.
@serhiy-storchaka
Use the @critical_section decorator in BytesIO
e650b49
The pickling support and __sizeof__() of BytesIO no longer need separate
"lock held" functions.
@serhiy-storchaka
Use Argument Clinic for getters in the _io module
c7184e4
The getters of _WindowsConsoleIO are left as they are, because Argument
Clinic fails for an accessor in a preprocessor conditional block.
@serhiy-storchaka
Fix the FileIO.closed docstring assertion in test_descr
c7d915e
@serhiy-storchaka
Merge remote-tracking branch 'upstream/main' into io-clinic
0abd8a6
# Conflicts:
#	Modules/_io/clinic/textio.c.h
@serhiy-storchaka
Use Argument Clinic for the getters of _WindowsConsoleIO
44e06bc
They are defined in a preprocessor conditional block, which is now
supported.
@serhiy-storchaka
Merge remote-tracking branch 'upstream/main' into io-clinic
c8e4a69
# Conflicts:
#	Modules/_io/clinic/bufferedio.c.h
#	Modules/_io/clinic/textio.c.h
@serhiy-storchaka
Use return converters and a typed setter value for _io accessors
07dfaaa
The getters which return a boolean or an integer now use the bool, long
and Py_ssize_t return converters, and the TextIOWrapper._CHUNK_SIZE
setter declares its value as Py_ssize_t.

An out of range _CHUNK_SIZE now raises OverflowError instead of
ValueError.
@serhiy-storchaka
serhiy-storchaka marked this pull request as ready for review September 21, 2026 09:44
@bedevere-app bedevere-app Bot added the awaiting core review label Sep 21, 2026
@serhiy-storchaka
serhiy-storchaka merged commit 16292fc into python:main Sep 24, 2026
57 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@serhiy-storchaka
serhiy-storchaka deleted the io-clinic branch September 24, 2026 17:23
@bedevere-app bedevere-app Bot removed the awaiting core review label Sep 24, 2026
@scasella scasella mentioned this pull request Sep 26, 2026
Free-threading: concurrent FileIO close/truncate can double-free stat_atopen #158196
Open
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@serhiy-storchaka
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.