cpython/Lib
Barney Gale a0d3d3ec9d
GH-110109: pathlib ABCs: do not vary path syntax by host OS. (#113219)
Change the value of `pathlib._abc.PurePathBase.pathmod` from `os.path` to
`posixpath`.

User subclasses of `PurePathBase` and `PathBase` previously used the host
OS's path syntax, e.g. backslashes as separators on Windows. This is wrong
in most use cases, and likely to catch developers out unless they test on
both Windows and non-Windows machines.

In this patch we change the default to POSIX syntax, regardless of OS. This
is somewhat arguable (why not make all aspects of syntax abstract and
individually configurable?) but an improvement all the same.

This change has no effect on `PurePath`, `Path`, nor their subclasses. Only
private APIs are affected.
2023-12-22 18:09:50 +00:00
..
__phello__
asyncio GH-113214: Fix SSLProto exception handling in SSL-over-SSL scenarios (#113334) 2023-12-20 15:09:01 -08:00
collections gh-110275: Named tuple's __replace__() now raises TypeError for invalid arguments (GH-110299) 2023-12-04 13:30:32 +02:00
concurrent gh-109649: Use os.process_cpu_count() (#110165) 2023-10-01 03:14:57 +02:00
ctypes gh-105751: test_ctypes avoids "from ctypes import *" (#105768) 2023-06-14 03:34:11 +00:00
curses gh-60436: fix curses textbox backspace/del (#103783) 2023-04-26 22:54:07 +02:00
dbm
email [CVE-2023-27043] gh-102988: Reject malformed addresses in email.parseaddr() (#111116) 2023-12-15 16:10:40 +01:00
encodings gh-98433: Fix quadratic time idna decoding. (#99092) 2022-11-07 16:54:41 -08:00
ensurepip gh-113246: Updated bundled pip to 23.3.2 (gh-113249) 2023-12-18 10:21:46 +00:00
html gh-100210: Correct the comment link for unescaping HTML (#100212) 2023-02-19 11:18:12 +01:00
http gh-113199: Make read1() and readline() of HTTPResponse close IO after reading all data (GH-113200) 2023-12-18 22:17:16 +02:00
idlelib gh-113269: IDLE - Fix test_editor hang (macOS) (#113271) 2023-12-19 05:26:11 +00:00
importlib gh-113174: Sync with importlib_metadata 7.0 (#113175) 2023-12-21 15:04:05 -05:00
json gh-113149: Improve error message when JSON has trailing comma (GH-113227) 2023-12-17 20:52:26 +02:00
logging gh-110875: Handle '.' properties in logging formatter configuration c… (GH-110943) 2023-11-09 18:55:22 +00:00
multiprocessing gh-113009: Fix multiprocessing Process.terminate() on Windows (#113128) 2023-12-15 15:57:49 +01:00
pathlib GH-110109: pathlib ABCs: do not vary path syntax by host OS. (#113219) 2023-12-22 18:09:50 +00:00
pydoc_data Python 3.13.0a2 2023-11-22 12:20:24 +01:00
re GH-83162: Rename re.error for better clarity. (#101677) 2023-12-11 15:45:08 -05:00
site-packages
sqlite3 gh-109151: Enable readline in the sqlite3 CLI (GH-109152) 2023-10-04 14:16:44 +03:00
sysconfig gh-86179: Implement realpath() on Windows for getpath.py calculations (GH-113033) 2023-12-13 23:41:43 +00:00
test GH-110109: pathlib ABCs: do not vary path syntax by host OS. (#113219) 2023-12-22 18:09:50 +00:00
tkinter gh-75666: Tkinter: "unbind(sequence, funcid)" now only unbinds "funcid" (GH-111322) 2023-12-06 16:42:15 +02:00
tomllib
turtledemo gh-111092: Make turtledemo run without default root enabled (#111093) 2023-10-19 23:58:41 -04:00
unittest gh-110774: allow setting the Runner(loop_factory=...) from IsolatedAsyncioTestCase (#110776) 2023-10-31 15:03:54 -07:00
urllib GH-104554: Add RTSPS support to `urllib/parse.py` (#104605) 2023-06-13 16:45:47 -07:00
venv gh-112507: Detect Cygwin and MSYS with `uname` instead of `$OSTYPE` (GH-112508) 2023-12-11 17:27:15 +00:00
wsgiref gh-111768: Add `wsgiref.util.is_hop_by_hop` to `__all__` (#111770) 2023-11-08 15:29:47 +00:00
xml gh-50002: xml.dom.minidom now preserves whitespaces in attributes (GH-107947) 2023-08-23 15:23:41 +03:00
xmlrpc xmlrpc.client uses datetime.datetime.isoformat() (#105741) 2023-06-14 17:00:40 +02:00
zipfile gh-112578: Fix RuntimeWarning when running zipfile (GH-112579) 2023-12-03 13:09:29 +02:00
zoneinfo bpo-42663: Fix parsing TZ strings in zoneinfo module (GH-23825) 2023-10-14 23:24:33 +03:00
__future__.py
__hello__.py
_aix_support.py gh-96305: Fix AIX build by avoiding subprocess during bootstrap (#96429) 2023-02-02 12:30:49 -08:00
_collections_abc.py gh-91896: Deprecate collections.abc.ByteString (#102096) 2023-05-04 09:39:33 -07:00
_compat_pickle.py gh-75552: Remove deprecated tkinter.tix module (GH-104902) 2023-05-27 12:34:19 -05:00
_compression.py
_markupbase.py
_opcode_metadata.py GH-111485: Generate instruction and uop metadata (GH-113287) 2023-12-20 14:27:25 +00:00
_osx_support.py gh-102362: Fix macOS version number in result of sysconfig.get_platform() (GH-112942) 2023-12-18 18:51:58 -05:00
_py_abc.py
_pydatetime.py gh-109495: Remove unused slots from the Python implementation of datetime (GH-109494) 2023-09-29 19:57:32 +03:00
_pydecimal.py gh-86682: Adds sys._getframemodulename as an alternative to using _getframe (GH-99520) 2023-01-13 11:31:06 +00:00
_pyio.py gh-62948: IOBase finalizer logs close() errors (#105104) 2023-05-31 11:41:19 +00:00
_pylong.py gh-102515: Remove unused imports in the `Lib/` directory (#102516) 2023-03-08 11:45:38 +00:00
_sitebuiltins.py
_strptime.py GH-90750: Use datetime.fromisocalendar in _strptime (#103802) 2023-04-27 10:27:27 -06:00
_threading_local.py
_weakrefset.py
abc.py gh-87864: Use correct function definition syntax in the docs (#103312) 2023-04-11 16:50:25 +03:00
antigravity.py
argparse.py gh-109653: Defer importing `warnings` in several modules (#110286) 2023-10-04 06:09:43 +01:00
ast.py gh-110259: Fix f-strings with multiline expressions and format specs (#110271) 2023-10-05 14:26:44 +01:00
base64.py gh-61199: Remove superfluous global statements from `base64._b32{en,de}code()*` (GH-111785) 2023-11-07 16:32:44 -06:00
bdb.py gh-80675: Set `f_trace_lines = True` on all frames upon `pdb.set_trace()` (#110881) 2023-11-04 19:59:36 +00:00
bisect.py GH-102833: Mention the key function in the docstrings (GH-103009) 2023-03-25 02:19:20 -05:00
bz2.py
cProfile.py gh-103935: Use `io.open_code()` when executing code in trace and profile modules (GH-103947) 2023-04-27 20:29:35 +00:00
calendar.py gh-109653: Defer importing `warnings` in several modules (#110286) 2023-10-04 06:09:43 +01:00
cmd.py gh-102130: Support tab completion in cmd for Libedit. (GH-107748) 2023-12-05 08:24:56 +01:00
code.py GH-102895 Add an option local_exit in code.interact to block exit() from terminating the whole process (GH-102896) 2023-10-18 11:36:43 -07:00
codecs.py gh-66143: Allow copying and pickling of CodecInfo object (GH-109235) 2023-09-29 20:07:09 +03:00
codeop.py gh-111366: Correctly show custom syntax error messages in the codeop module functions (#111384) 2023-10-30 19:24:21 +00:00
colorsys.py gh-106498: Revert incorrect colorsys.rgb_to_hls change (#106627) 2023-07-11 11:07:20 -04:00
compileall.py gh-105931: Fix surprising compileall stripdir behaviour (GH-108671) 2023-10-23 13:55:39 +00:00
configparser.py Fix typo in configparser module docstring (#105652) 2023-06-11 15:06:42 +01:00
contextlib.py gh-103791: handle `BaseExceptionGroup` in `contextlib.suppress()` (#111910) 2023-11-10 13:32:36 +00:00
contextvars.py
copy.py gh-109868: Skip deepcopy memo check for empty memo (GH-109869) 2023-09-29 10:28:01 +03:00
copyreg.py gh-99325: Remove unused `NameError` handling (#99326) 2022-11-11 09:56:57 +00:00
csv.py gh-67230: add quoting rules to csv module (GH-29469) 2023-04-12 15:32:30 -07:00
dataclasses.py gh-109409: Fix inheritance of frozen dataclass from non-frozen dataclass mixins (gh-109437) 2023-10-12 09:05:23 -04:00
datetime.py gh-84976: Add back UTC to datetime.__all__ (#104920) 2023-05-25 11:18:56 -04:00
decimal.py
difflib.py
dis.py gh-112720: Move dis's cache output code to the Formatter, labels lookup to the arg_resolver. Reduce the number of parameters passed around. (#113108) 2023-12-15 12:28:22 +00:00
doctest.py gh-61648: Detect line numbers of properties in doctests (GH-113161) 2023-12-15 15:24:30 +02:00
enum.py gh-112328: [Enum] Make some private attributes public. (GH-112514) 2023-12-05 08:27:36 -08:00
filecmp.py
fileinput.py gh-101961 fileinput.hookcompressed should not set the encoding value for the binary mode (gh-102068) 2023-02-21 12:10:29 +09:00
fnmatch.py GH-72904: Add `glob.translate()` function (#106703) 2023-11-13 17:15:56 +00:00
fractions.py gh-67790: Support basic formatting for Fraction (#111320) 2023-12-16 10:58:31 +00:00
ftplib.py bpo-45975: Simplify some while-loops with walrus operator (GH-29347) 2022-11-26 14:33:25 -08:00
functools.py gh-109653: Avoid a top-level import of `types` in `functools` (#109804) 2023-09-24 17:18:27 +01:00
genericpath.py gh-101196: Make isdir/isfile/exists faster on Windows (GH-101324) 2023-02-08 14:34:24 +00:00
getopt.py
getpass.py gh-76912: Raise OSError from any failure in getpass.getuser() (#29739) 2023-11-27 10:05:55 -08:00
gettext.py gh-88434: Emit deprecation warnings for non-integer numbers in gettext if translation not found (GH-110574) 2023-10-14 09:07:02 +03:00
glob.py GH-72904: Add `glob.translate()` function (#106703) 2023-11-13 17:15:56 +00:00
graphlib.py
gzip.py gh-108111: Flush gzip write buffer before seeking, fixing bad writes (#108341) 2023-08-24 10:23:01 +02:00
hashlib.py gh-99108: Refactor _sha256 & _sha512 into _sha2. (#101924) 2023-02-15 22:08:20 -08:00
heapq.py
hmac.py gh-112999: Replace the outdated "deprecated" directives with "versionchanged" (GH-113000) 2023-12-12 18:31:04 +02:00
imaplib.py gh-94172: Remove keyfile, certfile and check_hostname parameters (#94173) 2022-11-03 18:32:25 +01:00
inspect.py gh-112316: improve docs for `inspect.signature` and `inspect.Signature` (#112631) 2023-12-03 01:37:34 -08:00
io.py gh-111356: io: Add missing documented objects to io.__all__ (#111370) 2023-11-10 16:18:52 +09:00
ipaddress.py gh-109466: Add ipv6_mapped property to IPv4Address (#109467) 2023-11-05 16:50:31 +00:00
keyword.py gh-103763: Implement PEP 695 (#103764) 2023-05-15 20:36:23 -07:00
linecache.py gh-67224: Show source lines in tracebacks when using the -c option when running Python (#111200) 2023-10-26 15:17:28 +09:00
locale.py gh-111187: Postpone removal version for locale.getdefaultlocale() to 3.15 (#111188) 2023-10-25 16:47:41 +03:00
lzma.py
mailbox.py gh-90890: New methods to access mailbox.Maildir message info and flags (#103905) 2023-11-11 17:41:33 +00:00
mimetypes.py bpo-45975: Simplify some while-loops with walrus operator (GH-29347) 2022-11-26 14:33:25 -08:00
modulefinder.py
netrc.py
ntpath.py gh-82367: Use `FindFirstFile` Win32 API in `ntpath.realpath()` (GH-110298) 2023-10-05 09:49:07 -05:00
nturl2path.py
numbers.py
opcode.py gh-109039: Branch prediction for Tier 2 interpreter (#109038) 2023-09-11 18:20:24 +00:00
operator.py
optparse.py
os.py gh-59616: Support os.chmod(follow_symlinks=True) and os.lchmod() on Windows (GH-113049) 2023-12-14 13:28:37 +02:00
pdb.py gh-102980: Redirect output of pdb's `interact` command, add tests and improve docs (#111194) 2023-12-07 11:19:33 +00:00
pickle.py gh-93627: Align Python implementation of pickle with C implementation of pickle (GH-103035) 2023-09-10 10:06:08 +03:00
pickletools.py
pkgutil.py gh-97850: Deprecate `find_loader` and `get_loader` in `pkgutil` (GH-98520) 2023-05-03 16:11:54 -07:00
platform.py gh-112278: Disable WMI queries on Windows after they time out (GH-112658) 2023-12-07 17:26:29 +00:00
plistlib.py gh-101992: update pstlib module documentation (#102133) 2023-03-04 13:35:25 -08:00
poplib.py gh-106200: Remove unused imports (#106201) 2023-06-28 11:55:41 +00:00
posixpath.py gh-101196: Make isdir/isfile/exists faster on Windows (GH-101324) 2023-02-08 14:34:24 +00:00
pprint.py [pprint]: Add docstring about `PrettyPrinter.underscore_numbers` parameter (#112963) 2023-12-13 12:04:17 +00:00
profile.py gh-103935: Use `io.open_code()` when executing code in trace and profile modules (GH-103947) 2023-04-27 20:29:35 +00:00
pstats.py GH-83162: Rename re.error for better clarity. (#101677) 2023-12-11 15:45:08 -05:00
pty.py gh-96522: Fix deadlock in pty.spawn (#96639) 2023-05-19 13:22:43 +00:00
py_compile.py
pyclbr.py
pydoc.py gh-112139: Add `inspect.Signature.format` and use it in `pydoc` (#112143) 2023-12-02 15:39:43 -08:00
queue.py
quopri.py bpo-45975: Simplify some while-loops with walrus operator (GH-29347) 2022-11-26 14:33:25 -08:00
random.py gh-111881: Import _sha2 lazily in random (#111889) 2023-11-09 23:10:21 +01:00
reprlib.py gh-109818: `reprlib.recursive_repr` copies `__type_params__` (#109819) 2023-09-27 19:26:42 -07:00
rlcompleter.py
runpy.py gh-98040: Remove just the `imp` module (#98573) 2023-04-28 16:17:58 -07:00
sched.py
secrets.py gh-99305: Speed up secrets.token_hex() ~2x (#99306) 2022-11-11 14:45:24 -08:00
selectors.py gh-110038: KqueueSelector must count all read/write events (#110039) 2023-09-28 17:25:10 +00:00
shelve.py gh-107089: Improve Shelf.clear method performance (gh-107090) 2023-07-29 09:08:11 +09:00
shlex.py bpo-45975: Simplify some while-loops with walrus operator (GH-29347) 2022-11-26 14:33:25 -08:00
shutil.py bpo-35332: Handle os.close() errors in shutil.rmtree() (GH-23766) 2023-12-05 19:09:39 +02:00
signal.py
site.py gh-112510: Add `readline.backend` for the backend readline uses (GH-112511) 2023-12-01 14:05:55 +00:00
smtplib.py gh-65495: Use lowercase `mail from` and `rcpt to` in `smtplib.SMTP` (#107019) 2023-07-22 16:46:59 +02:00
socket.py Remove unnecessary while in SocketIO.readinto (GH-111057) 2023-10-20 00:26:30 +03:00
socketserver.py gh-103673: Add missing ForkingUnixStreamServer and ForkingUnixDatagramServer socketservers (#103674) 2023-04-24 22:35:52 +00:00
sre_compile.py
sre_constants.py
sre_parse.py
ssl.py gh-112454: Disable TLS-PSK if OpenSSL was built without PSK support (#112491) 2023-11-28 16:15:39 -08:00
stat.py gh-108638: Fix stat.filemode() when _stat is missing (#108639) 2023-08-29 15:46:46 +00:00
statistics.py gh-112540: Support zero inputs in geometric_mean() (gh-112880) 2023-12-08 12:05:56 -06:00
string.py
stringprep.py
struct.py
subprocess.py gh-113117: Support posix_spawn in subprocess.Popen with close_fds=True (#113118) 2023-12-17 21:34:57 +00:00
symtable.py gh-85098: Implement functional CLI of symtable (#109112) 2023-11-07 16:32:16 +00:00
tabnanny.py gh-102856: Python tokenizer implementation for PEP 701 (#104323) 2023-05-21 01:03:02 +01:00
tarfile.py gh-87264: Convert tarinfo type to stat type (GH-113230) 2023-12-19 11:04:43 -08:00
tempfile.py gh-59616: Support os.chmod(follow_symlinks=True) and os.lchmod() on Windows (GH-113049) 2023-12-14 13:28:37 +02:00
textwrap.py gh-107369: optimize textwrap.indent() (#107374) 2023-07-29 06:37:23 +00:00
this.py
threading.py GH-110829: Ensure Thread.join() joins the OS thread (#110848) 2023-11-04 13:59:24 +00:00
timeit.py gh-105052:update timeit function's description (#105060) 2023-08-27 03:22:27 -04:00
token.py gh-107015: Remove async_hacks from the tokenizer (#107018) 2023-07-26 16:34:15 +01:00
tokenize.py gh-104169: Fix test_peg_generator after tokenizer refactoring (#110727) 2023-10-12 09:34:35 +02:00
trace.py gh-110722: Make `-m test -T -j` use sys.monitoring (GH-111710) 2023-11-10 18:17:45 +01:00
traceback.py gh-112730: Use color to highlight error locations (gh-112732) 2023-12-06 23:29:54 +01:00
tracemalloc.py
tty.py gh-110392: Fix tty functions (GH-110642) 2023-10-14 08:50:41 +03:00
turtle.py no-issue: Capitalise 'PhotoImage' (gh-108958) 2023-09-25 21:37:40 +09:00
types.py gh-109599: Add types.CapsuleType (#109600) 2023-09-25 19:50:39 +02:00
typing.py gh-113255: Clarify docs for `typing.reveal_type` (#113286) 2023-12-20 17:21:23 +00:00
uuid.py gh-104396: uuid.py to skip platform check for emscripten and wasi (gh-104397) 2023-05-12 07:45:55 +09:00
warnings.py bpo-39912: Raise appropriate exceptions in filterwarnings() and simplefilter() (GH-18878) 2023-12-01 11:17:47 +00:00
wave.py gh-105096: Deprecate wave getmarkers() method (#105098) 2023-05-31 12:09:41 +00:00
weakref.py
webbrowser.py gh-87277: Don't look for X11 browsers on macOS in webbrowser (#24480) 2023-12-21 14:43:38 +01:00
zipapp.py gh-104527: zippapp will now avoid appending an archive to itself. (gh-106076) 2023-06-26 10:09:08 +01:00
zipimport.py Fix typos in variable names, function names, and comments (GH-101868) 2023-12-01 09:37:40 +00:00