summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* 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
|
* gh-111178: Make slot functions in typeobject.c have compatible types (GH-112752)Christopher Chavez2023-12-203-21/+36
|
* gh-112205: Support docstring for `@getter` (#113160)Donghee Na2023-12-207-61/+265
| | | | | --------- Co-authored-by: Erlend E. Aasland <erlend@python.org>
* Fix typo in datamodel docs (#113314)Rodrigo Girão Serrão2023-12-201-1/+1
| | | Co-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com>
* Fix typo in collections.abc docs example (#113310)David Greaves2023-12-201-1/+1
| | | Calling the instance reference arg for the __next__ method, "next", seems misleading as it would normally just be "self"
* add Ujan to ACKS for work on enum docs (GH-113301)Ethan Furman2023-12-201-0/+1
|
* gh-111973: Update Windows installer to use SQLite 3.44.2 (#113281)Erlend E. Aasland2023-12-194-3/+4
|
* gh-87264: Convert tarinfo type to stat type (GH-113230)Marat Idrisov2023-12-193-5/+23
| | | Co-authored-by: val-shkolnikov <val@nvsoft.net>
* gh-111973: Update macOS installer to use SQLite 3.44.2 (GH-113279)Erlend E. Aasland2023-12-192-3/+4
|
* gh-101100: Fix Sphinx warnings in `library/ast.rst` (#113289)Hugo van Kemenade2023-12-192-17/+20
| | | | Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* gh-112205: Require @getter and @setter to be methods (#113278)Erlend E. Aasland2023-12-192-0/+15
| | | Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* gh-113054: Compiler no longer replaces a redundant jump with no line number ↵Irit Katriel2023-12-193-1/+22
| | | | by a NOP (#113139)
* gh-113234: tomllib docs: reorder conversion table & add remaining types ↵ryan-duve2023-12-191-1/+7
| | | | (GH-113236)
* gh-113208: Mention namespace packages don't require __init__.py (#113209)Unique-Usman2023-12-191-1/+2
| | | | Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
* gh-113257: Fix SBOM metadata for pip 23.3.2 (#113262)Seth Michael Larson2023-12-192-5/+5
| | | Fix SBOM metadata for pip 23.3.2