cpython/Lib
Miss Islington (bot) f59236b746
[3.14] GH-133789: Fix unpickling of pathlib objects pickled in Python 3.13 (GH-133831) (#140276)
GH-133789: Fix unpickling of pathlib objects pickled in Python 3.13 (GH-133831)

In Python 3.13 (but not 3.12 or 3.14), pathlib classes are defined in
`pathlib._local` rather than `pathlib`. In hindsight this was a mistake,
but it was difficult to predict how the abstract/local split would pan out.

In this patch we re-introduce `pathlib._local` as a stub module that
re-exports the classes from `pathlib`. This allows path objects pickled in
3.13 to be unpicked in 3.14+
(cherry picked from commit f4e51f253a)

Co-authored-by: Barney Gale <barney.gale@gmail.com>
2025-10-17 22:23:01 +00:00
..
__phello__
_pyrepl [3.14] gh-139391: properly handle signal.signal() in UnixConsole when called from a non-main thread (GH-139392) (#139858) 2025-10-09 16:10:51 +00:00
asyncio [3.14] gh-139845: do not print twice in default asyncio REPL (GH-139846) (#139859) 2025-10-09 16:13:11 +00:00
collections Fix outdated reference link in collections module (gh-130349) 2025-02-20 23:58:58 +00:00
compression [3.14] gh-132983: Split `_zstd_set_c_parameters` (GH-133921) (#134838) 2025-05-28 17:25:06 +01:00
concurrent [3.14] gh-135729: Store reference to globals in Interpreter._decref (GH-139104) (GH-139112) 2025-10-07 14:18:15 -04:00
ctypes [3.14] gh-140041: Fix import of ctypes on Android and Cygwin when ABI flags are present (GH-140178) (#140180) 2025-10-15 22:08:35 +00:00
curses
dbm [3.14] gh-135386: Fix "unable to open database file" errors on readonly DB (GH-135566) (GH-138056) 2025-10-08 11:41:09 +03:00
email [3.14] gh-134759: fix UnboundLocalError in email.message.Message.get_payload (GH-136071) (#136579) 2025-07-12 13:56:10 +00:00
encodings [3.14] gh-135069: Fix exception message in encodings.idna module (GH-135071) (#136235) 2025-07-03 10:18:27 +00:00
ensurepip [3.14] gh-137257: Upgrade bundled pip to 25.2 (GH-137258) (#137361) 2025-08-04 08:29:30 +03:00
html [3.14] gh-135661: Fix CDATA section parsing in HTMLParser (GH-135665) (#137772) 2025-09-08 18:31:41 +03:00
http [3.14] gh-70765: avoid waiting for HTTP headers when parsing HTTP/0.9 requests (GH-139514) (#139600) 2025-10-08 10:39:59 +00:00
idlelib [3.14] gh-96491: Deduplicate version in IDLE shell title (GH-139841) (#139931) 2025-10-11 02:02:34 +00:00
importlib [3.14] gh-82916: Don't fail when importing from / with sys.pycache_prefix set (GH-30456) (GH-137906) 2025-10-07 18:55:33 +02:00
json [3.14] gh-131884: Fix incorrect formatting in json.dumps() when using indent and skipkeys=True (GH-132200) (GH-135060) 2025-06-05 14:38:09 +00:00
logging [3.14] gh-91555: Revert disabling of logger while handling log record. (GH-135858) (GH-135910) 2025-06-25 18:03:13 +01:00
multiprocessing [3.14] gh-131788: make resource_tracker re-entrant safe (GH-131787) (#137737) 2025-10-16 21:25:14 -07:00
pathlib [3.14] GH-133789: Fix unpickling of pathlib objects pickled in Python 3.13 (GH-133831) (#140276) 2025-10-17 22:23:01 +00:00
pydoc_data Python 3.14.0 2025-10-07 12:34:52 +03:00
re gh-133306: Support \z as a synonym for \Z in regular expressions (GH-133314) 2025-05-03 07:54:33 +00:00
site-packages
sqlite3 [3.14] gh-133439: Fix dot commands with trailing spaces are mistaken for multi-line sqlite statements in the sqlite3 command-line interface (GH-133440) (GH-133738) 2025-05-09 15:17:24 +03:00
string [3.14] GH-132661: Add `string.templatelib.convert()` (GH-135217) (#136671) 2025-07-15 10:22:24 +00:00
sysconfig [3.14] Synced docs and docstring for sysconfig.get_platform (GH-135530) (#138976) 2025-10-04 17:55:25 +03:00
test [3.14] GH-133789: Fix unpickling of pathlib objects pickled in Python 3.13 (GH-133831) (#140276) 2025-10-17 22:23:01 +00:00
tkinter [3.14] gh-126008: Improve docstrings for Tkinter cget and configure methods (GH-133303) (GH-137660) 2025-10-07 22:34:36 +02:00
tomllib gh-133117: Enable stricter mypy checks for tomllib (#133206) 2025-05-03 16:57:09 +03:00
turtledemo gh-128062: Fix the font size and shortcut display of the turtledemo menu (#128063) 2024-12-19 15:24:47 -05:00
unittest [3.14] gh-135368: Fix mocks on dataclass specs with instance=True (GH-135421) (#135503) 2025-06-14 09:11:31 +00:00
urllib [3.14] gh-88375, gh-111788: Fix parsing errors and normalization in robotparser (GH-138502) (GH-138548) 2025-10-08 14:22:44 +02:00
venv [3.14] gh-134060: Don't create a certain symlink in venv if platform does not support it (GH-134061) 2025-05-18 22:33:14 +03:00
wsgiref gh-126133: Only use start year in PSF copyright, remove end years (#126236) 2024-11-12 15:59:19 +02:00
xml [3.14] gh-135640: Adds more type checking to ElementTree (GH-135643) (GH-136225) 2025-07-03 08:15:01 +00:00
xmlrpc [3.14] gh-136839: Refactor simple dict.update calls (GH-136811) (#136840) 2025-07-19 17:36:31 +00:00
zipfile [3.14] gh-139700: Check consistency of the zip64 end of central directory record (GH-139702) (GH-139706) 2025-10-07 23:16:26 +02:00
zoneinfo [3.14] gh-137754: Fix import of zoneinfo if _datetime is not available (GH-137845) (GH-138084) 2025-10-08 14:28:41 +02:00
__future__.py
__hello__.py
_aix_support.py
_android_support.py [3.14] Make Android streams respect the unbuffered (-u) option (GH-138806) (#139108) 2025-09-29 11:16:25 +03:00
_apple_support.py gh-126925: Modify how iOS test results are gathered (#127592) 2024-12-09 13:28:57 +08:00
_ast_unparse.py [3.14] gh-132661: Disallow Template/str concatenation after PEP 750 spec update (#135996) (#136901) 2025-07-21 17:34:54 +02:00
_collections_abc.py [3.14] gh-118803: Improve documentation around ByteString deprecation (GH-139115) (#139136) 2025-09-18 17:54:43 +00:00
_colorize.py [3.14] gh-128636: Fix crash in PyREPL when os.environ is overwritten with an invalid value for macOS (GH-138089) (#138938) 2025-09-16 12:10:53 +03:00
_compat_pickle.py
_ios_support.py
_markupbase.py _markupbase.py: Use a permalink for the analysis of MS-Word extensions (GH-129017) 2025-02-06 11:40:43 +01:00
_opcode_metadata.py gh-100239: specialize BINARY_OP/SUBSCR for list-slice (#132626) 2025-05-01 10:28:52 +00:00
_osx_support.py
_py_abc.py
_py_warnings.py [3.14] gh-138010: Fix __init_subclass__ forwarding by warnings.deprecated (GH-138210) (#138561) 2025-10-07 21:29:28 -07:00
_pydatetime.py [3.14] gh-123681: Check NORMALIZE_CENTURY behavior at runtime; require C99 (GH-136022) (GH-137947) 2025-10-07 19:59:06 +02:00
_pydecimal.py [3.14] gh-102431: Clarify constraints on operands of Decimal logical operations (GH-102836) (#140105) 2025-10-14 15:44:30 +02:00
_pyio.py [3.14] gh-62184: Remove _pyio import of _io.FileIO (gh-134192) (gh-134437) 2025-05-21 17:57:58 +02:00
_pylong.py Fix typos in comments and test code (#122846) 2024-08-11 21:16:41 -07:00
_sitebuiltins.py
_strptime.py [3.14] gh-136028: Fix parsing month names containing "İ" (U+0130) in strptime() (GH-136029) (GH-136037) 2025-06-27 14:12:15 +00:00
_threading_local.py gh-107006: Move threading.local docstring to docs (#131840) 2025-05-05 15:00:15 +03:00
_weakrefset.py gh-89967: make WeakKeyDictionary and WeakValueDictionary thread safe (#125325) 2024-10-13 21:05:05 +05:30
abc.py
annotationlib.py [3.14] gh-138558: Improve handling of Template annotations in annotationlib (GH-139072) (#139272) 2025-10-07 21:23:22 -07:00
antigravity.py
argparse.py [3.14] GH-139809: Fix argparse subcommand prog not respecting color environment variables (GH-139818) (#139866) 2025-10-09 17:19:54 +00:00
ast.py [3.14] gh-134718: Fix ast.dump() for empty non-default values (GH-134926) (GH-134931) 2025-05-30 18:24:59 +03:00
base64.py gh-118761: substitute re import in base64.b16decode for a more efficient alternative (#128736) 2025-01-14 13:25:33 +00:00
bdb.py gh-132536: Do not disable PY_THROW event in bdb (#132537) 2025-04-15 18:31:52 -04:00
bisect.py
bz2.py gh-132983: Introduce compression package and move _compression module (GH-133018) 2025-04-27 14:41:30 -07:00
calendar.py gh-130645: Add color to stdlib argparse CLIs (gh-133380) 2025-05-05 19:46:46 +02:00
cmd.py gh-133363: Fix Cmd completion for lines beginning with ! (#133364) 2025-05-03 22:50:37 -04:00
code.py gh-130645: Add color to stdlib argparse CLIs (gh-133380) 2025-05-05 19:46:46 +02:00
codecs.py [3.14] gh-52876: Implement missing parameter in codecs.StreamReaderWriter functions (GH-136498) (#136514) 2025-07-10 16:09:45 +00:00
codeop.py gh-132449: Improve syntax error messages for keywords with typos (#132450) 2025-04-22 11:01:55 +02:00
colorsys.py gh-121905: Consistently use "floating-point" instead of "floating point" (GH-121907) 2024-07-19 08:06:02 +00:00
compileall.py gh-130645: Add color to stdlib argparse CLIs (gh-133380) 2025-05-05 19:46:46 +02:00
configparser.py [3.14] gh-65697: Improved error msg for configparser key validation (GH-135527) (#135541) 2025-06-15 16:38:15 +00:00
contextlib.py
contextvars.py gh-126451: Register contextvars.Context to collections.abc.Mapping (#126452) 2024-11-07 01:12:45 +03:00
copy.py gh-128118: Speed up copy.copy with fast lookup for atomic and container types (#128119) 2024-12-30 18:18:42 +01:00
copyreg.py gh-132882: Fix copying of unions with members that do not support __or__ (#132883) 2025-04-24 16:49:09 +00:00
cProfile.py gh-132737: Support profiling modules that require __main___ (#132738) 2025-04-24 14:41:01 -04:00
csv.py gh-118761: Improve import time for csv (#128858) 2025-01-18 11:45:18 +01:00
dataclasses.py [3.14] gh-135228: When @dataclass(slots=True) replaces a dataclass, make the original class collectible (take 2) (GH-137047) (#137666) 2025-08-12 17:17:26 +03:00
datetime.py gh-123843: Remove broken links to the Zope DateTimeWiki (#123846) 2024-09-08 22:39:23 -04:00
decimal.py gh-123339: Fix cases of inconsistency of __module__ and __firstlineno__ in classes (GH-123613) 2024-09-28 20:51:49 +03:00
difflib.py [3.14] gh-128051: Fix tests if sys.float_repr_style is 'legacy' (GH-135908) (#136025) 2025-06-27 10:26:51 +00:00
dis.py gh-130645: Add color to stdlib argparse CLIs (gh-133380) 2025-05-05 19:46:46 +02:00
doctest.py [3.14] gh-136914: Fix support of cached functions and properties in DocTest's lineno computation (GH-136930) (#137616) 2025-10-07 20:48:10 +02:00
enum.py [3.14] gh-136764: improve comment in enum.verify.__call__ (GH-136774) (GH-136841) 2025-07-19 11:00:15 -07:00
filecmp.py gh-122400: Handle ValueError in filecmp (GH-122401) 2024-07-30 08:50:30 +00:00
fileinput.py
fnmatch.py gh-133306: Use \z instead of \Z in fnmatch.translate() and glob.translate() (GH-133338) 2025-05-03 17:58:21 +03:00
fractions.py [3.14] gh-87790: support thousands separators for formatting fractional part of Fraction (GH-132204) (#136364) 2025-07-07 19:24:24 +03:00
ftplib.py
functools.py [3.14] gh-125028: Prohibit placeholders in partial keywords (GH-126062) (GH-133645) 2025-05-08 08:26:14 +00:00
genericpath.py [3.14] gh-135034: Normalize link targets in tarfile, add os.path.realpath(strict='allow_missing') (gh-135037) (gh-135065) 2025-06-03 14:05:00 +02:00
getopt.py gh-126946: Improve error message in getopt.do_longs based on existing comment (GH-126871) 2024-11-26 10:54:02 +02:00
getpass.py [3.14] gh-138514: getpass: restrict echo_char to a single ASCII character (GH-138591) (#138988) 2025-09-17 17:20:45 +03:00
gettext.py gettext: Remove outdated "TODO" comment (#130890) 2025-03-06 23:41:03 +00:00
glob.py gh-133306: Use \z instead of \Z in fnmatch.translate() and glob.translate() (GH-133338) 2025-05-03 17:58:21 +03:00
graphlib.py gh-130914: Make graphlib.TopologicalSorter.prepare() idempotent (#131317) 2025-03-18 16:28:00 -05:00
gzip.py gh-130645: Add color to stdlib argparse CLIs (gh-133380) 2025-05-05 19:46:46 +02:00
hashlib.py [3.14] gh-134696: align OpenSSL and HACL*-based hash functions constructors AC signatures (GH-134713) (#134961) 2025-06-01 10:26:56 +02:00
heapq.py [3.14] gh-137239: Add *_max functions to heapq.__all__ (gh-137241) (#137256) 2025-10-07 23:22:07 +05:30
hmac.py [3.14] gh-136912: fix handling of OverflowError in hmac.digest (GH-136917) (#137116) 2025-10-08 12:09:45 +02:00
imaplib.py [3.14] gh-78319: Fix implementation of IMAP APPEND UTF8 (GH-9436) (GH-139406) 2025-10-07 22:12:30 +02:00
inspect.py [3.14] gh-139783: Fix inspect.getsourcelines() for the case when a decorator is followed by a comment or an empty line (GH-139836) (GH-139889) 2025-10-10 08:18:32 +00:00
io.py gh-132952: Speed up startup by importing _io instead of io (#132957) 2025-04-28 08:38:56 -07:00
ipaddress.py [3.14] gh-128840: Fix parsing long IPv6 addresses with embedded IPv4 address (GH-134836) (#134845) 2025-05-28 15:50:40 +00:00
keyword.py
linecache.py gh-60115: Support frozen modules for linecache.getline() (#131638) 2025-04-02 19:50:01 -04:00
locale.py [3.14] gh-133967: Do not normalize locale name 'C.UTF-8' to 'en_US.UTF-8' (GH-135347) (GH-135349) 2025-06-11 12:43:20 +03:00
lzma.py gh-132983: Introduce compression package and move _compression module (GH-133018) 2025-04-27 14:41:30 -07:00
mailbox.py
mimetypes.py [3.14] gh-136507: Fix mimetypes CLI to handle multiple file parameters (GH-136508) (GH-138140) 2025-10-07 19:59:52 +02:00
modulefinder.py
netrc.py [3.14] gh-135815: skip netrc security checks if os.getuid is missing (GH-135816) (#135825) 2025-06-22 20:12:57 +00:00
ntpath.py [3.14] gh-135034: Normalize link targets in tarfile, add os.path.realpath(strict='allow_missing') (gh-135037) (gh-135065) 2025-06-03 14:05:00 +02:00
nturl2path.py GH-125866: Deprecate nturl2path module (#131432) 2025-03-19 19:33:01 +00:00
numbers.py [3.14] gh-122450: Expand documentation for `Rational and Fraction` (GH-136800) (#137363) 2025-10-07 19:15:22 +01:00
opcode.py gh-131738: optimize builtin any/all/tuple calls with a generator expression arg (#131737) 2025-03-28 10:35:20 +00:00
operator.py gh-115808: Add `is_none and is_not_none to operator` (#115814) 2024-08-10 20:16:34 +01:00
optparse.py gh-118761: Redudce the import time of `optparse` (#128899) 2025-01-20 00:03:19 +00:00
os.py [3.14] gh-136087: Remove \r from documented os.linesep values (GH-136088) (#136111) 2025-06-30 10:44:29 +03:00
pdb.py [3.14] gh-138860: Lazy import rlcompleter in pdb to avoid deadlock in subprocess (GH-139185) (GH-139305) (GH-139280) 2025-10-10 16:23:52 +02:00
pickle.py gh-130645: Add color to stdlib argparse CLIs (gh-133380) 2025-05-05 19:46:46 +02:00
pickletools.py [3.14] gh-139646: fix typo in pickletools error message (GH-139647) (GH-139649) 2025-10-07 20:19:01 +02:00
pkgutil.py gh-131152, pkgutil: Remove unused imports (#131149) 2025-03-12 15:03:36 +01:00
platform.py [3.14] gh-138130: Fix return value of libc_ver() on Emscripten (GH-138132) (#138312) 2025-10-05 16:03:49 +03:00
plistlib.py
poplib.py gh-130637: Add validation for numeric response data in stat() method (#130646) 2025-03-02 08:05:40 -05:00
posixpath.py [3.14] gh-135034: Normalize link targets in tarfile, add os.path.realpath(strict='allow_missing') (gh-135037) (gh-135065) 2025-06-03 14:05:00 +02:00
pprint.py gh-118761: Improve import time of pprint (#122725) 2024-08-07 22:46:54 +03:00
profile.py
pstats.py gh-118761: Improve import time for pstats and zipfile (#128981) 2025-01-23 14:49:36 +00:00
pty.py gh-124405: Fix NameError in openpty (#124406) 2024-09-24 20:06:39 +02:00
py_compile.py gh-130645: Add color to stdlib argparse CLIs (gh-133380) 2025-05-05 19:46:46 +02:00
pyclbr.py
pydoc.py [3.14] gh-139076: Fix regression in pydoc not showing extension functions (GH-139077) (GH-139160) 2025-10-07 21:57:28 +02:00
queue.py [3.14] Fix docs for Queue.shutdown (gh-137028) (#137080) 2025-10-07 19:41:03 +02:00
quopri.py
random.py gh-130645: Add color to stdlib argparse CLIs (gh-133380) 2025-05-05 19:46:46 +02:00
reprlib.py [3.14] gh-135487: fix reprlib.Repr.repr_int when given very large integers (GH-135506) (#135887) 2025-06-24 12:02:02 +00:00
rlcompleter.py
runpy.py
sched.py gh-121905: Consistently use "floating-point" instead of "floating point" (GH-121907) 2024-07-19 08:06:02 +00:00
secrets.py
selectors.py
shelve.py
shlex.py [3.14] gh-138804: Check type in shlex.quote (GH-138809) (#138846) 2025-09-13 21:29:50 +03:00
shutil.py [3.14] gh-132983: Add missing references to Zstandard in shutil docstrings (GH-136617) (#137052) 2025-07-25 12:30:11 +03:00
signal.py
site.py [3.14] gh-138993: Dedent credits text (GH-138994) (#140088) 2025-10-15 14:05:47 +03:00
smtplib.py [3.14] gh-136134: smtplib: fix CRAM-MD5 on FIPS-only environments (GH-136623) (#138086) 2025-09-04 16:07:59 +03:00
socket.py gh-128916: Do not set SO_REUSEPORT on non-AF_INET* sockets (GH-128933) 2025-01-17 16:49:16 -08:00
socketserver.py gh-128916: Do not set SO_REUSEPORT on non-AF_INET* sockets (GH-128933) 2025-01-17 16:49:16 -08:00
sre_compile.py
sre_constants.py
sre_parse.py
ssl.py gh-128035: Add ssl.HAS_PHA to detect libssl PHA support (GH-128036) 2024-12-24 18:29:27 +00:00
stat.py
statistics.py gh-132893: Minor edits to the statistics module PR (gh-133106) 2025-04-28 23:05:37 -05:00
stringprep.py
struct.py
subprocess.py gh-133089: Use original timeout value for TimeoutExpired when the func subprocess.run is called with a timeout (GH-133103) 2025-05-05 01:15:31 +00:00
symtable.py gh-119698: deprecate `symtable.Class.get_methods` (#121902) 2024-07-22 07:04:17 -07:00
tabnanny.py
tarfile.py [3.14] gh-81325: Support path-like objects with streaming TarFile (GH-137188) (#137365) 2025-10-07 20:40:42 +02:00
tempfile.py [3.14] gh-132124: improve safety nets for creating AF_UNIX socket files (GH-134085) (#134447) 2025-05-21 17:36:32 +00:00
textwrap.py [3.14] gh-139065: Fix trailing space before long word in textwrap (GH-139070) (GH-139902) 2025-10-10 13:54:46 +00:00
this.py
threading.py [3.14] gh-114827: clarify threading.Event.wait timeout behavior (GH-114834) (#140100) 2025-10-14 14:13:33 +00:00
timeit.py gh-131178: Update help message for timeit CLI (#131326) 2025-03-30 14:19:38 +03:00
token.py gh-131507: Add support for syntax highlighting in PyREPL (GH-133247) 2025-05-02 20:22:31 +02:00
tokenize.py [3.14] gh-134675: Add t-string prefixes to tokenizer module, lexical analysis doc, and add a test to make sure we catch this error in the future. (GH-134734) (#134739) 2025-05-26 15:24:24 -04:00
trace.py gh-130645: Add color to stdlib argparse CLIs (gh-133380) 2025-05-05 19:46:46 +02:00
traceback.py [3.14] gh-137576: Fix for Basic REPL showing incorrect code in tracebacks with PYTHONSTARTUP (GH-137625) (#137771) 2025-08-27 18:28:20 +03:00
tracemalloc.py
tty.py
turtle.py [3.14] gh-138772: Fix and improve documentation for turtle color functions (GH-139325) (GH-140047) 2025-10-13 15:56:26 +00:00
types.py GH-118761: Expose more core interpreter types in `_types` (#132103) 2025-04-05 18:11:07 +00:00
typing.py [3.14] gh-138859: Account for ParamSpec defaults that are not lists … (GH-138868) (#140207) 2025-10-16 13:26:29 -07:00
uuid.py [3.14] gh-135244: generate UUID random Node ID with a CSPRNG as per RFC 9562, §6.10.3 (GH-135226) (#135255) 2025-06-08 12:13:04 +00:00
warnings.py gh-128384: Use a context variable for warnings.catch_warnings (gh-130010) 2025-04-09 16:18:54 -07:00
wave.py [3.14] gh-136523: Fix wave.Wave_write emitting an unraisable when open raises (GH-136529) (GH-136606) 2025-07-16 07:26:52 +00:00
weakref.py gh-89967: make WeakKeyDictionary and WeakValueDictionary thread safe (#125325) 2024-10-13 21:05:05 +05:30
webbrowser.py gh-130645: Add color to stdlib argparse CLIs (gh-133380) 2025-05-05 19:46:46 +02:00
zipapp.py gh-130645: Add color to stdlib argparse CLIs (gh-133380) 2025-05-05 19:46:46 +02:00
zipimport.py gh-125746: Delay deprecated zipimport.zipimporter.load_module removal time to 3.15 (#125748) 2025-02-11 23:59:09 +00:00