summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* bpo-26791: Update shutil.move() to provide the same symlink move behavior as ↵Jeffrey Kintscher2023-12-273-1/+34
| | | | the mv shell when moving a symlink into a directory that is the target of the symlink (GH-21759)
* GH-110109: pathlib ABCs: drop use of `warnings._deprecated()` (#113419)Barney Gale2023-12-271-6/+4
| | | | | | The `pathlib._abc` module will be made available as a PyPI backport supporting Python 3.8+. The `warnings._deprecated()` function was only added last year, and it's private from an external package perspective, so here we switch to `warnings.warn()` instead.
* GH-110109: pathlib ABCs: drop use of `io.text_encoding()` (#113417)Barney Gale2023-12-272-3/+18
| | | | | | Do not use the locale-specific default encoding in `PathBase.read_text()` and `write_text()`. Locale settings shouldn't influence the operation of these base classes, which are intended mostly for implementing rich paths on *nonlocal* filesystems.
* gh-57795: IDLE: Enter the selected text when opening the "Replace" dialog ↵Zackery Spytz2023-12-272-16/+8
| | | | | | (GH-17593) Co-authored-by: Roger Serwy <roger.serwy@gmail.com> Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* gh-64020: Deprecate pydoc.ispackage() (GH-20908)Zackery Spytz2023-12-274-2/+12
| | | Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* gh-101100: Fix Sphinx warnings in `library/cmd.rst` (#113502)Hugo van Kemenade2023-12-272-12/+14
| | | | Co-authored-by: Serhiy Storchaka <storchaka@gmail.com> Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* gh-101100: Fix Sphinx warnings in `library/calendar.rst` (#113500)Hugo van Kemenade2023-12-272-4/+10
|
* gh-111615: Fix regression in QueueHandler configuration. (GH-111638)Vinay Sajip2023-12-273-17/+40
|
* gh-113350: Improve the wording of python logging docs to remove an ambiguity ↵Vaishnavi Maheshwari2023-12-272-7/+6
| | | | | around use of the word "higher". (GH-113491) Co-authored-by: Wei-Hsiang (Matt) Wang <mattwang44@gmail.com>
* gh-113332: Simplify calls to SSL_(CTX_)set_verify in _ssl.c (#113333)David Benjamin2023-12-261-7/+2
| | | | _ssl.c currently tries to preserve the verification callback, but at no point does it ever set one. Just pass in NULL.
* gh-101100: Fix Sphinx warnings in `library/bisect.rst` (#113496)Hugo van Kemenade2023-12-262-5/+4
|
* gh-101100: Fix Sphinx warnings in `howto/isolating-extensions.rst` (#113493)Hugo van Kemenade2023-12-262-3/+2
|
* bpo-36959: Fix error messages for invalid ISO format string in _strptime() ↵Gordon P. Hemsley2023-12-263-40/+61
| | | | | | | | (GH-13408) Previously some error messages complained about incompatible combinations of directives that are not contained in the format string. Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* gh-112532: Fix peg generator build.py for mimalloc build (gh-113492)Donghee Na2023-12-261-0/+1
| | | gh-112532: Fix peg generator for mimalloc build
* gh-112532: Use separate mimalloc heaps for GC objects (gh-113263)Sam Gross2023-12-269-23/+161
| | | | | | | | | | | | | | | | | | | | | | | | | | * gh-112532: Use separate mimalloc heaps for GC objects In `--disable-gil` builds, we now use four separate heaps in anticipation of using mimalloc to find GC objects when the GIL is disabled. To support this, we also make a few changes to mimalloc: * `mi_heap_t` and `mi_tld_t` initialization is split from allocation. This allows us to have a `mi_tld_t` per-`PyThreadState`, which is important to keep interpreter isolation, since the same OS thread may run in multiple interpreters (using different PyThreadStates.) * Heap abandoning (mi_heap_collect_ex) can now be called from a different thread than the one that created the heap. This is necessary because we may clear and delete the containing PyThreadStates from a different thread during finalization and after fork(). * Use enum instead of defines and guard mimalloc includes. * The enum typedef will be convenient for future PRs that use the type. * Guarding the mimalloc includes allows us to unconditionally include pycore_mimalloc.h from other header files that rely on things like `struct _mimalloc_thread_state`. * Only define _mimalloc_thread_state in Py_GIL_DISABLED builds
* gh-111971: Make _PyUnicode_FromId thread-safe in --disable-gil (gh-113489)Donghee Na2023-12-262-3/+11
|
* Docs: make htmllive: open browser when ready (#113288)Hugo van Kemenade2023-12-261-3/+7
|
* gh-113468: Remove the "_new_ suffix from class names in pydocfodder (GH-113469)Serhiy Storchaka2023-12-261-8/+8
|
* gh-66515: mailbox.MH now supports folders withou the ".mh_sequences" file ↵Serhiy Storchaka2023-12-264-3/+26
| | | | | | (GH-804) (for example Claws Mail IMAP-cache folders).
* Misc minor improvements to the itertools recipes (gh-113477)Raymond Hettinger2023-12-251-81/+83
|
* gh-106905: Use separate structs to track recursion depth in each ↵Yilei Yang2023-12-254-339/+412
| | | | | | PyAST_mod2obj call. (GH-113035) Co-authored-by: Gregory P. Smith [Google LLC] <greg@krypto.org>
* bpo-21360: mailbox.Maildir now ignores files with a leading dot (GH-11833)Zackery Spytz2023-12-255-0/+23
| | | | | | The maildir format specification states that files with a leading dot should be ignored. Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* fix bullet-list in `LOAD_SUPER_ATTR` documentation on `dis` page (#113461)denballakh2023-12-241-3/+4
|
* GH-111485: Fix handling of FOR_ITER in Tier 2 (GH-113394)Mark Shannon2023-12-241-12/+5
|
* gh-113407: Fix import of unittest.mock when CPython is built without ↵Serhiy Storchaka2023-12-242-5/+12
| | | | docstrings (GH-113408)
* Add codeowners for `Lib/ensurepip/` (#112805)Alex Waygood2023-12-241-0/+2
|
* gh-113191: Add support of os.fchmod() on Windows (GH-113192)Serhiy Storchaka2023-12-247-32/+82
| | | | Also support a file descriptor in os.chmod().
* gh-113440: Ignore the "ver" command failure with exit code 0xc0000142 ↵Serhiy Storchaka2023-12-241-0/+2
| | | | (GH-113435)
* gh-113421: Fix multiprocessing logger for "%(filename)s" (GH-113423)Xu Song2023-12-243-4/+28
|
* gh-113028: Correctly memoize str in pickle when escapes added (GH-113436)Jeff Allen2023-12-243-7/+21
| | | | | | This fixes a divergence between the Python and C implementations of pickle for protocol 0, such that it pickle.py fails to re-use the first pickled representation of strings involving characters that have to be escaped.
* gh-111784: Fix two segfaults in the elementtree module (GH-113405)Kirill Podoprigora2023-12-242-2/+19
| | | | | | | | | | First fix resolve situation when pyexpat module (which contains expat_CAPI capsule) deallocates before _elementtree, so we need to hold a strong reference to pyexpat module to. Second fix resolve situation when module state is deallocated before deallocation of XMLParser instances, which uses module state to clear some stuff.
* gh-112559: Avoid unnecessary conversion attempts to enum_klass in signal.py ↵Yilei Yang2023-12-244-2/+51
| | | | (#113040)
* gh-112800: Ignore PermissionError on SubprocessTransport.close() in asyncio ↵Allison Karlitskaya2023-12-242-1/+4
| | | | | | | | | | (#112803) In case the spawned process is setuid, we may not be able to send signals to it, in which case our .kill() call will raise PermissionError. Ignore that in order to avoid .close() raising an exception. Hopefully the process will exit as a result of receiving EOF on its stdin.
* gh-113317: Move more formatting helpers into libclinic (#113438)Erlend E. Aasland2023-12-234-159/+160
| | | | | | | | | Move the following global helpers into libclinic: - format_escape() - normalize_snippet() - wrap_declarations() Also move strip_leading_and_trailing_blank_lines() and make it internal to libclinic.
* Fix trivial typo in test_interpreters (GH-113381)Jeff Allen2023-12-231-1/+1
|
* gh-74573: document that ndbm can silently corrupt databases on macOS (#113354)Ronald Oussoren2023-12-233-0/+13
| | | | | | | | | * gh-74573: document that ndbm can silently corrupt databases on macOS The system ndbm implementation on macOS has an undocumented limitation on the size of values and can silently corrupt database files when those are exceeded. Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
* gh-113188: Fix shutil.copymode() on Windows (GH-113189)Serhiy Storchaka2023-12-233-14/+24
| | | | | | | | | Previously it worked differently if dst is a symbolic link: it modified the permission bits of dst itself rather than the file it points to if follow_symlinks is true or src is not a symbolic link, and did nothing if follow_symlinks is false and src is a symbolic link. Also document similar changes in shutil.copystat().
* gh-112925: Fix error in example of `datetime.time.fromisoformat` and add ↵F-park2023-12-231-1/+3
| | | | doctest marker (GH-112931)
* gh-81682: Fix test failures when CPython is built without docstrings (GH-113410)Serhiy Storchaka2023-12-2312-21/+55
|
* gh-113317: Clean up Argument Clinic global namespace (#113414)Erlend E. Aasland2023-12-234-135/+185
| | | | | | | | | | Split up clinic.py by establishing libclinic as a support package for Argument Clinic. Get rid of clinic.py globals by either making them class members, or by putting them into libclinic. - Move INCLUDE_COMMENT_COLUMN to BlockPrinter - Move NO_VARARG to CLanguage - Move formatting helpers to libclinic - Move some constants to libclinic (and annotate them as Final)
* gh-113317: Remove TextAccumulator type alias from clinic.py (#113413)Erlend E. Aasland2023-12-221-8/+5
| | | Clean-up after gh-113402.
* GH-110109: Adjust `test_pathlib_abc` imports to ease backporting (#113411)Barney Gale2023-12-221-12/+13
| | | | | This very boring patch reduces the number of changes needed in `test_pathlib_abc.py` when backporting to the external `pathlib_abc` package.
* gh-113317: Argument Clinic: tear out internal text accumulator APIs (#113402)Erlend E. Aasland2023-12-222-188/+89
| | | | | | | Replace the internal accumulator APIs by using lists of strings and join(). Yak-shaving for separating out formatting code into a separate file. Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* GH-110109: pathlib ABCs: do not vary path syntax by host OS. (#113219)Barney Gale2023-12-224-60/+87
| | | | | | | | | | | | | | | | 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.
* GH-112855: Slightly improve tests for `pathlib.PurePath` pickling (#113243)Barney Gale2023-12-222-16/+10
| | | | Add a few more simple test cases, like non-anchored paths. Remove misplaced and indirect test that pickling doesn't change the `stat()` value.
* gh-113212: Improve error message & document zero-arg super inside nested ↵Yan Yanchii2023-12-224-3/+51
| | | | functions and generator expressions (GH-113307)
* GH-110109: Fix misleading `pathlib._abc.PurePathBase` repr (#113376)Barney Gale2023-12-224-15/+16
| | | | | | | | | | `PurePathBase.__repr__()` produces a string like `MyPath('/foo')`. This repr is incorrect/misleading when a subclass's `__init__()` method is customized, which I expect to be the very common. This commit moves the `__repr__()` method to `PurePath`, leaving `PurePathBase` with the default `object` repr. No user-facing changes because the `pathlib._abc` module remains private.
* GH-112215: Increase C recursion limit for non debug builds (GH-113397)Mark Shannon2023-12-227-21/+33
|
* gh-109989: Fix test_c_locale_coercion when PYTHONIOENCODING is set (#113378)Ronald Oussoren2023-12-221-5/+49
| | | | | | | | | | | * gh-109989: Fix test_c_locale_coercion when PYTHONIOENCODING is set This fixes the existing tests when PYTHONIOENCODING is set by unsetting PYTHONIOENCODING. Also add a test that explicitly checks what happens when PYTHONIOENCODING is set. Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
* gh-113384: Skip test_freeze for framework builds on macOS (#113390)Ronald Oussoren2023-12-221-0/+2
|