main
Name already in use
Commits on May 22, 2023
-
gh-104536: Improve
multiprocessing.process._cleanup
logic (#104537)Fix a race condition in the internal `multiprocessing.process` cleanup logic that could manifest as an unintended `AttributeError` when calling `BaseProcess.close()`. --------- Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net> Co-authored-by: Gregory P. Smith <greg@krypto.org>
-
Commits on May 21, 2023
-
-
gh-98836: Extend PyUnicode_FromFormat() (GH-98838)
* Support for conversion specifiers o (octal) and X (uppercase hexadecimal). * Support for length modifiers j (intmax_t) and t (ptrdiff_t). * Length modifiers are now applied to all integer conversions. * Support for wchar_t C strings (%ls and %lV). * Support for variable width and precision (*). * Support for flag - (left alignment).
-
gh-104050: Add more type annotations to Argument Clinic (#104631)
Annotate methods of the following classes: - class Function - class Parameter - class LandMine
-
gh-104050: Annotate Argument Clinic return converters (#104706)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
-
gh-103857: Document utcnow and utcfromtimestamp deprecations in What'…
…s New (#104542) Co-authored-by: Paul Ganssle <1377457+pganssle@users.noreply.github.com>
-
-
GH-101291: Add low level, unstable API for pylong (GH-101685)
Co-authored-by: Petr Viktorin <encukou@gmail.com>
-
typing docs: Move some classes out of the "Generics" section (#104707)
- AnyStr can be used in type annotations, contrary to the section header - Unpack can also be used in annotations, and its use is not restricted to generics. It makes more sense with other building blocks like Required. - Protocol is not necessarily generic. Also fix the indentation for two notes associated with Concatenate. Split off from #104642, but I think this change is independently an improvement.
-
gh-103295: expose API for writing perf map files (#103546)
Co-authored-by: Aniket Panse <aniketpanse@fb.com> Co-authored-by: Gregory P. Smith <greg@krypto.org> Co-authored-by: Carl Meyer <carl@oddbird.net>
-
-
gh-104698: Fix reference leak in mmapmodule.c (#104700)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
-
-
gh-102856: Python tokenizer implementation for PEP 701 (#104323)
This commit replaces the Python implementation of the tokenize module with an implementation that reuses the real C tokenizer via a private extension module. The tokenize module now implements a compatibility layer that transforms tokens from the C tokenizer into Python tokenize tokens for backward compatibility. As the C tokenizer does not emit some tokens that the Python tokenizer provides (such as comments and non-semantic newlines), a new special mode has been added to the C tokenizer mode that currently is only used via the extension module that exposes it to the Python layer. This new mode forces the C tokenizer to emit these new extra tokens and add the appropriate metadata that is needed to match the old Python implementation. Co-authored-by: Pablo Galindo <pablogsal@gmail.com>
Commits on May 20, 2023
-
gh-61460: Stronger HMAC in multiprocessing (#20380)
bpo-17258: `multiprocessing` now supports stronger HMAC algorithms for inter-process connection authentication rather than only HMAC-MD5. Signed-off-by: Christian Heimes <christian@python.org> gpshead: I Reworked to be more robust while keeping the idea. The protocol modification idea remains, but we now take advantage of the message length as an indicator of legacy vs modern protocol version. No more regular expression usage. We now default to HMAC-SHA256, but do so in a way that will be compatible when communicating with older clients or older servers. No protocol transition period is needed. More integration tests to verify these claims remain true are required. I'm unaware of anyone depending on multiprocessing connections between different Python versions. --------- Signed-off-by: Christian Heimes <christian@python.org> Co-authored-by: Gregory P. Smith [Google] <greg@krypto.org>
-
gh-103606: raise RuntimeError if config file is invalid or empty (#10…
…4701) (this adjusts new code) raise RuntimeError if provided config file is invalid or empty, not ValueError.
-
gh-104050: Add basic type hints to Argument Clinic DSL parser (#104704)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
-
gh-104683: Modernise Tools/clinic/ (#104684)
- Make some string interpolations more readable using f-strings or explicit parametrisation - Remove unneeded open() mode specifiers Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
-
gh-49174: document that the effect of calling gc.collect() during a c…
…ollection is undefined (#104699)
-
gh-104372: Use non-Raw malloc for c_fds_to_keep in _posixsubprocess (#…
…104697) Use non-Raw malloc for c_fds_to_keep as the code could ask for 0 length.
-
gh-56276: Add tests to test_compare (#3199)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu> Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>
-
gh-104683: Modernise
clinic.py
usingstr.removeprefix
and `str.re……movesuffix` (#104685) Both methods were new in Python 3.9.
-
gh-104146: Purge dead code from Argument Clinic (#104680)
The following local variables were assigned but never used: - line 551: result - line 1341: groups - line 1431: default_return_converter - line 1529: ignore_self - line 1809: input_checksum - line 4224: new' --- Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
-
gh-104683: Argument clinic: use
dict
overOrderedDict
(#104647)For code readability. Instances of `builtins.dict` have been ordered since 3.6, and have been guaranteed by the language to be ordered since Python 3.7. Argument Clinic now requires Python 3.10+.