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 the getpath module by serhiy-storchaka · Pull Request #158132 · python/cpython

Conversation

@serhiy-storchaka

@serhiy-storchaka serhiy-storchaka commented Sep 24, 2026

Copy link
Copy Markdown
Member

Convert the 11 helper functions of the internal getpath module (abspath, basename, dirname, hassuffix, isabs, isdir, isfile, isxfile, joinpath, readlines, realpath) from PyArg_ParseTuple() to Argument Clinic, so they use the METH_FASTCALL or METH_O calling convention and the argument types are checked by the generated code.

  • 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 the getpath module
f30fd64
@serhiy-storchaka
serhiy-storchaka requested a review from FFY00 as a code owner September 24, 2026 20:16
@bedevere-app bedevere-app Bot mentioned this pull request Sep 24, 2026
Use Argument Clinic for more functions and methods #155496
Closed
@bedevere-app bedevere-app Bot added the awaiting core review label Sep 24, 2026
@serhiy-storchaka
pythongh-155496: Use the Py_UNICODE converter in the getpath module
c7a7b19
Argument Clinic now converts the path argument of abspath(), isabs() and
isdir() to a wide character string, and isabs() and isdir() use the bool
return converter.
@serhiy-storchaka serhiy-storchaka added the skip news label Sep 27, 2026
@serhiy-storchaka
pythongh-155496: Use the bool return converter in the getpath module
eb6990c
hassuffix(), isfile() and isxfile() now use the bool return converter,
as isabs() and isdir() already did.

This also fixes a use after free in isxfile() on Windows: the path was
freed before being passed to CompareStringOrdinal().
@serhiy-storchaka
serhiy-storchaka merged commit 964535a into python:main Sep 27, 2026
52 checks passed

Uh oh!

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

@bedevere-app bedevere-app Bot removed the awaiting core review label Sep 27, 2026
@serhiy-storchaka
serhiy-storchaka deleted the getpath-clinic branch September 27, 2026 15:56
@serhiy-storchaka serhiy-storchaka mentioned this pull request Sep 27, 2026
Use after free in getpath_isxfile() on Windows #158288
Closed
@bedevere-bot

bedevere-bot commented Sep 27, 2026

Copy link
Copy Markdown

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot s390x Fedora Stable 3.x (tier-3) has failed when building commit 964535a.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/#/builders/1636/builds/3558) and take a look at the build logs.
  4. Check if the failure is related to this commit (964535a) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/#/builders/1636/builds/3558

Failed tests:

  • test_dtrace

Failed subtests:

  • test_function_entry_return - test.test_dtrace.SystemTapOptimizedTests.test_function_entry_return
  • test_function_entry_return - test.test_dtrace.SystemTapNormalTests.test_function_entry_return

Summary of the results of the build (if available):

==

Click to see traceback logs
Traceback (most recent call last):
  File "/var/lib/buildbot/worker/cstratak-fedora-stable-s390x/3.x.cstratak-fedora-stable-s390x/build/Lib/test/test_dtrace.py", line 466, in test_function_entry_return
    self.run_case("call_stack")
    ~~~~~~~~~~~~~^^^^^^^^^^^^^^
  File "/var/lib/buildbot/worker/cstratak-fedora-stable-s390x/3.x.cstratak-fedora-stable-s390x/build/Lib/test/test_dtrace.py", line 463, in run_case
    self.assertEqual(actual_output, expected_output)
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: 'func[21 chars]k.py:function_1:1\nfunction__entry:call_stack.[642 chars]5:21' != 'func[21 chars]k.py:start:23\nfunction__entry:call_stack.py:f[723 chars]t:28'
+ function__entry:call_stack.py:start:23
  function__entry:call_stack.py:function_1:1
  function__entry:call_stack.py:function_3:9
  function__return:call_stack.py:function_3:10
  function__return:call_stack.py:function_1:2
  function__entry:call_stack.py:function_2:5
  function__entry:call_stack.py:function_1:1
  function__entry:call_stack.py:function_3:9
  function__return:call_stack.py:function_3:10
  function__return:call_stack.py:function_1:2
  function__return:call_stack.py:function_2:6
  function__entry:call_stack.py:function_3:9
  function__return:call_stack.py:function_3:10
  function__entry:call_stack.py:function_4:13
  function__return:call_stack.py:function_4:14
  function__entry:call_stack.py:function_5:18
  function__return:call_stack.py:function_5:21
+ function__return:call_stack.py:start:28
All reactions

Sorry, something went wrong.

Uh oh!

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@FFY00 FFY00 Awaiting requested review from FFY00 FFY00 is a code owner

Uh oh!

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

Assignees

No one assigned

Labels

skip news

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.

2 participants

@serhiy-storchaka @bedevere-bot
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 01402520 — 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.