mirror of
https://github.com/python/cpython.git
synced 2025-11-03 03:22:27 +00:00
gh-77102: site: try utf-8 and fallback to locale encoding when reading .pth file (#117802)
This commit is contained in:
parent
3831144f9c
commit
6dc661bc9f
4 changed files with 49 additions and 26 deletions
|
|
@ -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.
|
||||
|
||||
.. versionchanged:: 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
|
||||
|
|
|
|||
|
|
@ -630,6 +630,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
|
||||
-------
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue