gh-104389: Add 'unused' keyword to Argument Clinic C converters#104390
gh-104389: Add 'unused' keyword to Argument Clinic C converters#104390erlend-aasland merged 5 commits into
Conversation
Use the unused keyword param in the converter to explicitly
mark an argument as unused:
/*[clinic input]
BaseClass.interface
flag: bool(unused=True)
|
The _io change is to show the feature; we can revert it before landing. |
Sorry, something went wrong.
corona10
left a comment
There was a problem hiding this comment.
lgtm
Sorry, something went wrong.
|
Do you have at least one use case for this addition? |
Sorry, something went wrong.
vstinner
left a comment
There was a problem hiding this comment.
LGTM. It would be nice to have directly an user of this feature, but I'm fine with adding support for it, and later have a separated PR using it. I see where you will use it in the _io extension ;-)
Sorry, something went wrong.
Yes, I'll create PRs for usage quite soon :) Anyway, I got two approvals here, a couple of thumbs up on the PR, five likes on the Discourse topic. I'll land this soon. |
Sorry, something went wrong.
PR for _io usage: |
Sorry, something went wrong.
⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️Hi! The buildbot AMD64 Debian root 3.x has failed when building commit b2c1b4d. What do you need to do:
You can take a look at the buildbot page here: https://buildbot.python.org/all/#builders/345/builds/4762 Failed tests:
Summary of the results of the build (if available): == Click to see traceback logsremote: Enumerating objects: 46, done.
remote: Counting objects: 2% (1/46)
remote: Counting objects: 4% (2/46)
remote: Counting objects: 6% (3/46)
remote: Counting objects: 8% (4/46)
remote: Counting objects: 10% (5/46)
remote: Counting objects: 13% (6/46)
remote: Counting objects: 15% (7/46)
remote: Counting objects: 17% (8/46)
remote: Counting objects: 19% (9/46)
remote: Counting objects: 21% (10/46)
remote: Counting objects: 23% (11/46)
remote: Counting objects: 26% (12/46)
remote: Counting objects: 28% (13/46)
remote: Counting objects: 30% (14/46)
remote: Counting objects: 32% (15/46)
remote: Counting objects: 34% (16/46)
remote: Counting objects: 36% (17/46)
remote: Counting objects: 39% (18/46)
remote: Counting objects: 41% (19/46)
remote: Counting objects: 43% (20/46)
remote: Counting objects: 45% (21/46)
remote: Counting objects: 47% (22/46)
remote: Counting objects: 50% (23/46)
remote: Counting objects: 52% (24/46)
remote: Counting objects: 54% (25/46)
remote: Counting objects: 56% (26/46)
remote: Counting objects: 58% (27/46)
remote: Counting objects: 60% (28/46)
remote: Counting objects: 63% (29/46)
remote: Counting objects: 65% (30/46)
remote: Counting objects: 67% (31/46)
remote: Counting objects: 69% (32/46)
remote: Counting objects: 71% (33/46)
remote: Counting objects: 73% (34/46)
remote: Counting objects: 76% (35/46)
remote: Counting objects: 78% (36/46)
remote: Counting objects: 80% (37/46)
remote: Counting objects: 82% (38/46)
remote: Counting objects: 84% (39/46)
remote: Counting objects: 86% (40/46)
remote: Counting objects: 89% (41/46)
remote: Counting objects: 91% (42/46)
remote: Counting objects: 93% (43/46)
remote: Counting objects: 95% (44/46)
remote: Counting objects: 97% (45/46)
remote: Counting objects: 100% (46/46)
remote: Counting objects: 100% (46/46), done.
remote: Compressing objects: 4% (1/22)
remote: Compressing objects: 9% (2/22)
remote: Compressing objects: 13% (3/22)
remote: Compressing objects: 18% (4/22)
remote: Compressing objects: 22% (5/22)
remote: Compressing objects: 27% (6/22)
remote: Compressing objects: 31% (7/22)
remote: Compressing objects: 36% (8/22)
remote: Compressing objects: 40% (9/22)
remote: Compressing objects: 45% (10/22)
remote: Compressing objects: 50% (11/22)
remote: Compressing objects: 54% (12/22)
remote: Compressing objects: 59% (13/22)
remote: Compressing objects: 63% (14/22)
remote: Compressing objects: 68% (15/22)
remote: Compressing objects: 72% (16/22)
remote: Compressing objects: 77% (17/22)
remote: Compressing objects: 81% (18/22)
remote: Compressing objects: 86% (19/22)
remote: Compressing objects: 90% (20/22)
remote: Compressing objects: 95% (21/22)
remote: Compressing objects: 100% (22/22)
remote: Compressing objects: 100% (22/22), done.
remote: Total 25 (delta 20), reused 7 (delta 3), pack-reused 0
From https://github.com/python/cpython
* branch main -> FETCH_HEAD
Note: switching to 'b2c1b4da1935639cb89fbbad0ce170a1182537bd'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at b2c1b4da19 gh-104389: Add 'unused' keyword to Argument Clinic C converters (#104390)
Switched to and reset branch 'main'
configure: WARNING: pkg-config is missing. Some dependencies may not be detected correctly.
Fatal Python error: Segmentation fault
Thread 0x00007f974f0fa280 (most recent call first):
File "/root/buildarea/3.x.angelico-debian-amd64/build/Lib/unittest/runner.py", line 74 in _write_status
File "/root/buildarea/3.x.angelico-debian-amd64/build/Lib/unittest/runner.py", line 95 in addSuccess
File "/root/buildarea/3.x.angelico-debian-amd64/build/Lib/test/support/testresult.py", line 122 in addSuccess
File "/root/buildarea/3.x.angelico-debian-amd64/build/Lib/unittest/case.py", line 648 in run
File "/root/buildarea/3.x.angelico-debian-amd64/build/Lib/unittest/case.py", line 690 in __call__
File "/root/buildarea/3.x.angelico-debian-amd64/build/Lib/unittest/suite.py", line 122 in run
File "/root/buildarea/3.x.angelico-debian-amd64/build/Lib/unittest/suite.py", line 84 in __call__
File "/root/buildarea/3.x.angelico-debian-amd64/build/Lib/unittest/suite.py", line 122 in run
File "/root/buildarea/3.x.angelico-debian-amd64/build/Lib/unittest/suite.py", line 84 in __call__
File "/root/buildarea/3.x.angelico-debian-amd64/build/Lib/unittest/suite.py", line 122 in run
File "/root/buildarea/3.x.angelico-debian-amd64/build/Lib/unittest/suite.py", line 84 in __call__
File "/root/buildarea/3.x.angelico-debian-amd64/build/Lib/unittest/runner.py", line 240 in run
File "/root/buildarea/3.x.angelico-debian-amd64/build/Lib/test/support/__init__.py", line 1106 in _run_suite
File "/root/buildarea/3.x.angelico-debian-amd64/build/Lib/test/support/__init__.py", line 1232 in run_unittest
File "/root/buildarea/3.x.angelico-debian-amd64/build/Lib/test/libregrtest/runtest.py", line 294 in _test_module
File "/root/buildarea/3.x.angelico-debian-amd64/build/Lib/test/libregrtest/runtest.py", line 330 in _runtest_inner2
File "/root/buildarea/3.x.angelico-debian-amd64/build/Lib/test/libregrtest/runtest.py", line 373 in _runtest_inner
File "/root/buildarea/3.x.angelico-debian-amd64/build/Lib/test/libregrtest/runtest.py", line 248 in _runtest
File "/root/buildarea/3.x.angelico-debian-amd64/build/Lib/test/libregrtest/runtest.py", line 278 in runtest
File "/root/buildarea/3.x.angelico-debian-amd64/build/Lib/test/libregrtest/main.py", line 365 in rerun_failed_tests
File "/root/buildarea/3.x.angelico-debian-amd64/build/Lib/test/libregrtest/main.py", line 783 in _main
File "/root/buildarea/3.x.angelico-debian-amd64/build/Lib/test/libregrtest/main.py", line 738 in main
File "/root/buildarea/3.x.angelico-debian-amd64/build/Lib/test/libregrtest/main.py", line 802 in main
File "/root/buildarea/3.x.angelico-debian-amd64/build/Lib/test/__main__.py", line 2 in <module>
File "/root/buildarea/3.x.angelico-debian-amd64/build/Lib/runpy.py", line 88 in _run_code
File "/root/buildarea/3.x.angelico-debian-amd64/build/Lib/runpy.py", line 198 in _run_module_as_main
Extension modules: _testcapi (total: 1)
Segmentation fault
make: *** [Makefile:1956: buildbottest] Error 139
Cannot open file '/root/buildarea/3.x.angelico-debian-amd64/build/test-results.xml' for upload |
Sorry, something went wrong.
* main: pythongh-91896: Fixup some docs issues following ByteString deprecation (python#104422) pythonGH-104371: check return value of calling `mv.release` (python#104417) pythongh-104415: Fix refleak tests for `typing.ByteString` deprecation (python#104416) pythonGH-86275: Implementation of hypothesis stubs for property-based tests, with zoneinfo tests (python#22863) pythonGH-103082: Filter LINE events in VM, to simplify tool implementation. (pythonGH-104387) pythongh-93649: Split gc- and allocation tests from _testcapimodule.c (pythonGH-104403) pythongh-104389: Add 'unused' keyword to Argument Clinic C converters (python#104390) pythongh-101819: Prepare _io._IOBase for module state (python#104386) pythongh-104413: Fix refleak when super attribute throws AttributeError (python#104414) Fix refleak in `super_descr_get` (python#104408) pythongh-87526: Remove dead initialization from _zoneinfo parse_abbr() (python#24700) pythongh-91896: Improve visibility of `ByteString` deprecation warnings (python#104294) pythongh-104371: Fix calls to `__release_buffer__` while an exception is active (python#104378) pythongh-104377: fix cell in comprehension that is free in outer scope (python#104394) pythongh-104392: Remove _paramspec_tvars from typing (python#104393) pythongh-104396: uuid.py to skip platform check for emscripten and wasi (pythongh-104397) pythongh-99108: Refresh HACL* from upstream (python#104401) pythongh-104301: Allow leading whitespace in disambiguated pdb statements (python#104342)
…erters (python/cpython#104390) Use the unused keyword param in the converter to explicitly mark an argument as unused: /*[clinic input] SomeBaseClass.stubmethod flag: bool(unused=True) [clinic start generated code]*/
…erters (python/cpython#104390) Use the unused keyword param in the converter to explicitly mark an argument as unused: /*[clinic input] SomeBaseClass.stubmethod flag: bool(unused=True) [clinic start generated code]*/
…erters (python/cpython#104390) Use the unused keyword param in the converter to explicitly mark an argument as unused: /*[clinic input] SomeBaseClass.stubmethod flag: bool(unused=True) [clinic start generated code]*/
Use the unused keyword param in the converter to explicitly
mark an argument as unused:
📚 Documentation preview 📚: https://cpython-previews--104390.org.readthedocs.build/