Skip to content

gh-160904: Correct os.path.normcase documentation for POSIX - #161443

Closed
19anveshh wants to merge 3 commits into
python:mainfrom
19anveshh:fix/normcase-docs-cpython
Closed

19anveshh wants to merge 3 commits into
python:mainfrom
19anveshh:fix/normcase-docs-cpython

Conversation

@19anveshh

@19anveshh 19anveshh commented Nov 5, 2026 •

Copy link
Copy Markdown

Fixes #160904.

The docstring and docs for os.path.normcase incorrectly stated that on Posix it "has no effect" or "returns the path unchanged". In reality, it calls os.fspath(s), which converts path-like objects to str or bytes.

Changes:

  • Lib/posixpath.py: updated normcase docstring
  • Doc/library/os.path.rst: updated function documentation

The docstring and docs incorrectly stated that normcase 'has no effect'
or 'returns the path unchanged' on Posix. In reality, it calls
os.fspath(s), which converts path-like objects to str or bytes.
gh-160904: Correct os.path.normcase documentation for POSIX
@bedevere-app

bedevere-app Bot commented Nov 5, 2026

Copy link
Copy Markdown

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

@read-the-docs-community

Copy link
Copy Markdown

Documentation build overview

📚 cpython-previews | 🛠️ Build #35680390 | 📁 Comparing 21f78a7 against main (5346059)

  🔍 Preview build  

2 files changed
± library/os.path.html
± whatsnew/changelog.html

@19anveshh 19anveshh closed this by deleting the head repository Nov 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

os.path.normcase incorrectly claims to do nothing

1 participant