summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
|
* gh-113297: Fix segfault in compiler for with statement with 19 context ↵Irit Katriel2023-12-223-1/+29
| | | | managers (#113327)
* gh-112027: Don't print mimalloc warning after mmap() call (gh-113372)Sam Gross2023-12-221-2/+2
| | | | | | | gh-112027: Don't print mimalloc warning after mmap This changes the warning to a "verbose"-level message in prim.c. The address passed to mmap is only a hint -- it's normal for mmap() to sometimes not respect the hint and return a different address.
* Bump mypy to 1.8.0 (#113385)Alex Waygood2023-12-212-2/+2
|
* gh-113157 gh-89519: Fix method descriptors (gh-113233)Raymond Hettinger2023-12-212-0/+23
| | | Restore behaviors before classmethod descriptor chaining was introduced.
* gh-113313: Note that slice support is not required for all sequences. ↵Raymond Hettinger2023-12-211-3/+3
| | | | (gh-113377)
* gh-113370: Add missing obmalloc.o dependencies on mimalloc (#113371)Sam Gross2023-12-211-2/+5
|
* gh-95754: Better AttributeError on partially initialised module (#112577)Shantanu2023-12-214-2/+34
| | | Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* gh-113174: Sync with importlib_metadata 7.0 (#113175)Jason R. Coombs2023-12-2110-144/+265
| | | | | | | | | | | | | | | | | | | | | | | * Sync with importlib_metadata 7.0.0 * Add blurb * Update docs to reflect changes. * Link datamodel docs for object.__getitem__ Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com> * Add what's new for removed __getattr__ * Link datamodel docs for object.__getitem__ Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com> * Add exclamation point, as that seems to be used for other classes. --------- Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* gh-113343: Fix error check on mmap(2) (#113342)Namhyung Kim2023-12-211-1/+1
| | | | | | | | | | | | Fix error check on mmap(2) It should check MAP_FAILED instead of NULL for error. On mmap(2) man page: RETURN VALUE On success, mmap() returns a pointer to the mapped area. On error, the value MAP_FAILED (that is, (void *) -1) is returned, and errno is set to indicate the error.
* gh-113325: Remove a debugging print accidentally left in test_symtable ↵Serhiy Storchaka2023-12-211-1/+0
| | | | (GH-113368)
* gh-65701: document that freeze doesn't work with framework builds on macOS ↵Ronald Oussoren2023-12-213-0/+12
| | | | | | | | | | | (#113352) * gh-65701: document that freeze doesn't work with framework builds on macOS The framework install is inherently incompatible with freeze. Document that that freeze doesn't work with framework builds and bail out early when trying to run freeze anyway. Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
* gh-110383: Improve accuracy of str.split() and str.rsplit() docstrings (#113355)Erlend E. Aasland2023-12-212-5/+9
| | | | Clarify split direction in the docstring body, instead of in the 'maxsplit' param docstring.
* gh-87277: Don't look for X11 browsers on macOS in webbrowser (#24480)Ronald Oussoren2023-12-213-1/+20
| | | | | | | | The installation of XQuartz on macOS will unconditionally set the $DISPLAY variable. The X11 server will be launched when a program tries to access the display. This results in launching the X11 server when using the webbrowser module, even though X11 browsers won't be used in practice.
* GH-111485: Delete the old generator code. (GH-113321)Mark Shannon2023-12-2118-3723/+210
|
* gh-113336: Remove the 'version' directive from Argument Clinic (#113341)Erlend E. Aasland2023-12-212-117/+0
| | | | | The 'version' directive was introduced with gh-63929 in Nov 2013. It has not been in use in the CPython code base, and the 'version' variable has never been bumped.
* Docs: update URL in Argument Clinic CLI help text (#113351)Erlend E. Aasland2023-12-211-1/+1
| | | The Argument Clinic docs was moved to the devguide earlier in 2023.
* Docs: OpenSSL wording ambiguity (#113296)Jan Brasna2023-12-211-1/+1
|
* gh-112305: Fix check-clean-src to detect frozen_modules .h files. (#113344)Gregory P. Smith2023-12-212-2/+7
| | | | | | | | | | | A typo left this check broken so many of us who do out-of-tree builds were seeing strange failures due to bad `Python/frozen_modules/*.h` files being picked up from the source tree and used at build time from different Python versions leading to errors like: `Fatal Python error: _PyImport_InitCore: failed to initialize importlib` Or similar once our build got to an "invoke the interpreter" bootstrapping step due to incorrect bytecode being embedded.
* gh-111375: Use `NULL` rather than `None` in the exception stack to indicate ↵Carey Metcalfe2023-12-216-7/+9
| | | | that an exception was handled (#113302)
* GH-113214: Fix SSLProto exception handling in SSL-over-SSL scenarios (#113334)Martijn Pieters2023-12-203-8/+21
| | | | | | When wrapped, `_SSLProtocolTransport._force_close(exc)` is called just like in the unwrapped scenario `_SelectorTransport._force_close(exc)` or `_ProactorBasePipeTransport._force_close(exc)` would be called, except here the exception needs to be passed through the `SSLProtocol._abort()` method, which didn't accept an exception object. This commit ensures that this path works, in the same way that the uvloop implementation of SSLProto passes on the exception (on which the current implementation of SSLProto is based).
* gh-113330: Fix mimalloc headers reference (#113331)Sam Gross2023-12-201-1/+1
| | | | | The `MIMALLOC_HEADERS` variable is defined in the Makefile.pre.in, not the configure script, so we should use the `$(MIMALLOC_HEADERS)` syntax instead of the `@MIMALLOC_HEADERS@` syntax.
* GH-111485: Fix DEFAULT_OUTPUT in opcode_metadata_generator.py (#113324)Guido van Rossum2023-12-201-1/+1
|
* gh-113257: Automatically generate pip SBOM metadata from wheel (#113295)Seth Michael Larson2023-12-202-11/+107
| | | | Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
* gh-113255: Clarify docs for `typing.reveal_type` (#113286)Kir2023-12-202-14/+13
| | | Co-authored-by: AlexWaygood <alex.waygood@gmail.com>
* GH-111485: Generate `TARGET` table for computed goto dispatch. (GH-113319)Mark Shannon2023-12-204-3/+58
|
* GH-111485: Generate instruction and uop metadata (GH-113287)Mark Shannon2023-12-2027-1271/+1740
|