Skip to content

gh-77102: site: try utf-8 and fallback to locale encoding when reading pth file #117802

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Apr 16, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
update docs
  • Loading branch information
methane committed Apr 15, 2024
commit 72985c124bbe5009ccace90691becffeb22d0165
4 changes: 4 additions & 0 deletions Doc/library/site.rst
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,10 @@ with ``import`` (followed by space or tab) are executed.
Limiting a code chunk to a single line is a deliberate measure
to discourage putting anything more complex here.

.. versionchangedd:: 3.13
The :file:`.pth` files are now decoded by UTF-8 at first and then by the
:term:`locale encoding` if it fails.

.. index::
single: package
triple: path; configuration; file
Expand Down
7 changes: 7 additions & 0 deletions Doc/whatsnew/3.13.rst
Original file line number Diff line number Diff line change
Expand Up @@ -634,6 +634,13 @@ re
* Rename :exc:`!re.error` to :exc:`re.PatternError` for improved clarity.
:exc:`!re.error` is kept for backward compatibility.

site
----

* :file:`.pth` files are now decoded by UTF-8 first, and then by the
:term:`locale encoding` if the UTF-8 decoding fails.
(Contributed by Inada Naoki in :gh:`117802`.)

sqlite3
-------

Expand Down
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy