Skip to content

Mention PyUnicode_EncodeFSDefault in PyConfig.filesystem_encoding docs - #159297

Merged
encukou merged 2 commits into
python:mainfrom
encukou:note-PyUnicode_EncodeFSDefault
Oct 16, 2026
Merged

encukou merged 2 commits into
python:mainfrom
encukou:note-PyUnicode_EncodeFSDefault

Conversation

@encukou

@encukou encukou commented Oct 13, 2026

Copy link
Copy Markdown
Member

I came across pygame-community/pygame-ce#2315 and realized that we didn't leave enough breadcrumbs to guide people who were checking the (undocumented) Py_FileSystemDefaultEncoding variable toward using PyUnicode_EncodeFSDefault.

Add the missing link.

@read-the-docs-community

read-the-docs-community Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Comment thread Doc/c-api/init_config.rst Outdated

See also the :c:member:`~PyConfig.filesystem_errors` member.

See also :c:func:`PyUnicode_EncodeFSDefault` for encoding paths

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can also mention PyUnicode_DecodeFSDefault().

@encukou

encukou commented Oct 14, 2026

Copy link
Copy Markdown
Member Author

I linked the entire section.
(I left PyUnicode_EncodeFSDefault in as well: IMO, for someone familiar with our naming conventions, the name describes the function better than the text.)

@encukou
encukou requested a review from vstinner October 16, 2026 14:17

@vstinner vstinner left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM even I would still prefer adding PyUnicode_DecodeFSDefault() :-)

@encukou

encukou commented Oct 16, 2026

Copy link
Copy Markdown
Member Author

IMO, the note makes it easy to find; it doesn't need a direct link.

@encukou
encukou merged commit 49fc7ed into python:main Oct 16, 2026
35 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in Docs PRs Oct 16, 2026
@encukou encukou added awaiting merge needs backport to 3.14 bugs and security fixes needs backport to 3.15 bugs and security fixes labels Oct 16, 2026
@miss-islington-app

Copy link
Copy Markdown

Thanks @encukou for the PR 🌮🎉.. I'm working now to backport this PR to: 3.15.
🐍🍒⛏🤖

@miss-islington-app

Copy link
Copy Markdown

Thanks @encukou for the PR 🌮🎉.. I'm working now to backport this PR to: 3.14.
🐍🍒⛏🤖

@bedevere-app

bedevere-app Bot commented Oct 16, 2026

Copy link
Copy Markdown

GH-159541 is a backport of this pull request to the 3.15 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.15 bugs and security fixes label Oct 16, 2026
@bedevere-app

bedevere-app Bot commented Oct 16, 2026

Copy link
Copy Markdown

GH-159542 is a backport of this pull request to the 3.14 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.14 bugs and security fixes label Oct 16, 2026
encukou added a commit that referenced this pull request Oct 19, 2026
…coding` docs (GH-159297) (GH-159541)

Mention `PyUnicode_EncodeFSDefault` in `PyConfig.filesystem_encoding` docs (GH-159297)
(cherry picked from commit 49fc7ed)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
encukou added a commit that referenced this pull request Oct 19, 2026
…coding` docs (GH-159297) (GH-159542)

Mention `PyUnicode_EncodeFSDefault` in `PyConfig.filesystem_encoding` docs (GH-159297)
(cherry picked from commit 49fc7ed)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants