cpython/Lib
Barney Gale 15fbd53ba9
GH-112855: Speed up pathlib.PurePath pickling (#112856)
The second item in the tuple returned from `__reduce__()` is a tuple of arguments to supply to path constructor. Previously we returned the `parts` tuple here, which entailed joining, parsing and normalising the path object, and produced a compact pickle representation.

With this patch, we instead return a tuple of paths that were originally given to the path constructor. This makes pickling much faster (at the expense of compactness).

It's worth noting that, in the olden times, pathlib performed this parsing/normalization up-front in every case, and so using `parts` for pickling was almost free. Nowadays pathlib only parses/normalises paths when it's necessary or advantageous to do so (e.g. computing a path parent, or iterating over a directory, respectively).
2024-04-20 17:46:52 +01:00
..
__phello__
asyncio
collections
concurrent
ctypes gh-87969: Align docs and docstrings with implementation for ctypes' [w]string_at() (#25384) 2024-04-18 14:57:37 +00:00
curses
dbm
email gh-80361: Fix TypeError in email.Message.get_payload() (GH-117994) 2024-04-17 19:31:26 +03:00
encodings
ensurepip
html
http gh-102247: http: support rfc9110 status codes (GH-117611) 2024-04-13 07:33:20 -07:00
idlelib
importlib
json
logging gh-117975: Ensure flush level is checked when configuring a logging MemoryHandler. (GH-117976) 2024-04-17 13:55:18 +01:00
multiprocessing
pathlib GH-112855: Speed up pathlib.PurePath pickling (#112856) 2024-04-20 17:46:52 +01:00
pydoc_data Add 'The Python 2.3 Method Resolution Order' (#116435) 2024-04-15 13:01:15 +03:00
re
site-packages
sqlite3
sysconfig
test gh-116818: Make sys.settrace, sys.setprofile, and monitoring thread-safe (#116775) 2024-04-19 14:47:42 -07:00
tkinter
tomllib
turtledemo
unittest
urllib
venv gh-90329: Add _winapi.GetLongPathName and GetShortPathName and use in venv to reduce warnings (GH-117817) 2024-04-15 15:36:06 +01:00
wsgiref
xml
xmlrpc
zipfile
zoneinfo
__future__.py
__hello__.py
_aix_support.py
_collections_abc.py
_compat_pickle.py
_compression.py
_ios_support.py
_markupbase.py
_opcode_metadata.py
_osx_support.py
_py_abc.py
_pydatetime.py
_pydecimal.py gh-71966: Move the module docstring from _pydecimal to decimal (GH-117919) 2024-04-17 10:18:24 +03:00
_pyio.py
_pylong.py
_sitebuiltins.py
_strptime.py
_threading_local.py
_weakrefset.py
abc.py
antigravity.py
argparse.py
ast.py
base64.py
bdb.py
bisect.py
bz2.py
calendar.py
cmd.py
code.py
codecs.py
codeop.py
colorsys.py
compileall.py
configparser.py gh-117348: restore import time performance of configparser (#117703) 2024-04-14 11:10:09 +00:00
contextlib.py
contextvars.py
copy.py
copyreg.py
cProfile.py
csv.py
dataclasses.py
datetime.py
decimal.py gh-71966: Move the module docstring from _pydecimal to decimal (GH-117919) 2024-04-17 10:18:24 +03:00
difflib.py
dis.py
doctest.py
enum.py
filecmp.py
fileinput.py
fnmatch.py
fractions.py
ftplib.py
functools.py GH-100242: bring functools.py partial implementation more in line with C code (GH-100244) 2024-04-17 15:34:46 +02:00
genericpath.py
getopt.py
getpass.py
gettext.py
glob.py GH-115060: Speed up pathlib.Path.glob() by not scanning literal parts (#117732) 2024-04-12 22:19:21 +01:00
graphlib.py
gzip.py
hashlib.py
heapq.py
hmac.py
imaplib.py
inspect.py
io.py
ipaddress.py
keyword.py
linecache.py linecache: Fix docstring location (#117948) 2024-04-16 15:37:18 -07:00
locale.py
lzma.py
mailbox.py
mimetypes.py
modulefinder.py
netrc.py
ntpath.py gh-117636: Remove redundant type check in os.path.join() (#117638) 2024-04-14 14:04:14 -07:00
nturl2path.py
numbers.py
opcode.py
operator.py
optparse.py
os.py
pdb.py
pickle.py
pickletools.py
pkgutil.py
platform.py
plistlib.py
poplib.py
posixpath.py gh-117641: Improve the perfornance of posixpath.commonpath() (#117652) 2024-04-18 09:26:34 +02:00
pprint.py
profile.py
pstats.py
pty.py
py_compile.py
pyclbr.py
pydoc.py gh-65824: Add "Help on ..." to the "less" prompt in pydoc (GH-116183) 2024-04-17 13:05:22 +03:00
queue.py
quopri.py
random.py
reprlib.py
rlcompleter.py
runpy.py
sched.py
secrets.py
selectors.py
shelve.py
shlex.py
shutil.py
signal.py
site.py gh-77102: site: try utf-8 and fallback to locale encoding when reading .pth file (#117802) 2024-04-16 12:56:16 +09:00
smtplib.py
socket.py
socketserver.py
sre_compile.py
sre_constants.py
sre_parse.py
ssl.py
stat.py
statistics.py gh-115532: Minor tweaks to kde() (gh-117897) 2024-04-15 10:08:21 -05:00
string.py
stringprep.py
struct.py
subprocess.py
symtable.py
tabnanny.py
tarfile.py gh-116931: Add fileobj parameter check for Tarfile.addfile (GH-117988) 2024-04-19 11:41:51 +00:00
tempfile.py
textwrap.py
this.py
threading.py
timeit.py
token.py
tokenize.py
trace.py
traceback.py
tracemalloc.py
tty.py
turtle.py
types.py
typing.py gh-114053: Fix bad interaction of PEP-695, PEP-563 and `get_type_hints` (#118009) 2024-04-19 13:03:44 +00:00
uuid.py
warnings.py gh-117535: Change unknown filename of warnings from sys to <sys> (#118018) 2024-04-18 20:50:09 -07:00
wave.py
weakref.py
webbrowser.py gh-68583: webbrowser: replace getopt with argparse, add long options (#117047) 2024-04-13 08:56:56 -06:00
zipapp.py
zipimport.py