https://github.com/python/cpython

sort by:
Revision Author Date Message Commit Date
5612078 Python 3.12.0b1 22 May 2023, 12:07:36 UTC
5360cb3 gh-101282: Apply BOLT optimizations to libpython for shared builds (#104709) Apply BOLT optimizations to libpython for shared builds. Most of the C code is in libpython so it is critical to apply BOLT there fully realize BOLT benefits. This change also reworks how BOLT instrumentation is applied. It effectively removes the readelf based logic added in gh-101525 and replaces it with a mechanism that saves a copy of the pre-bolt binary and restores that copy when necessary. This allows us to perform BOLT optimizations without having to manually delete the output binary to force a new bolt run. Also: - add a clean-bolt target for purging BOLT files and hook that up to the clean target - .gitignore BOLT related files Before and after this refactor, `make` will no-op after a previous run. Both versions should also share common make DAG deficiencies where targets fail to trigger as often as they need to or can trigger prematurely in certain scenarios. e.g. after this change you may need to `rm profile-bolt-stamp` to force a BOLT run because there aren't appropriate non-phony targets for BOLT's make target to depend on. To make it easier to iterate on custom BOLT settings, the flags to pass to instrumentation and application are now defined in configure and can be overridden by passing BOLT_INSTRUMENT_FLAGS and BOLT_APPLY_FLAGS. 22 May 2023, 11:45:20 UTC
729b252 gh-104741: Add line number attribute to indentation error exception (#104743) 22 May 2023, 11:30:18 UTC
0a77960 gh-102856: Allow comments inside multi-line f-string expresions (#104006) 22 May 2023, 10:30:07 UTC
9bc80da gh-94473: Flatten arguments in tkinter.Canvas.coords() (GH-98479) It now accepts not only "x1, y1, x2, y2, ..." and "[x1, y1, x2, y2, ...]", but also "(x1, y1), (x2, y2), ..." and "[(x1, y1), (x2, y2), ...]". 22 May 2023, 08:54:41 UTC
6fba031 Update macOS installer ReadMe and Welcome screens for 3.12.0b1. (GH-104739) 22 May 2023, 06:43:43 UTC
13e4600 gh-99834: Update macOS installer to Tcl/Tk 8.6.13. (GH-104738) 22 May 2023, 06:33:50 UTC
a5f244d gh-104656: Rename typeparams AST node to type_params (#104657) 22 May 2023, 04:25:09 UTC
ef5d00a 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> 22 May 2023, 03:48:57 UTC
b9c807a GH-103092: isolate `_ssl` (#104725) 22 May 2023, 00:44:48 UTC
8817886 gh-102856: Tokenize performance improvement (#104731) 22 May 2023, 00:29:04 UTC
4b107d8 gh-104683: clinic.py: Modernise `parse_converter()` using pattern-matching (#104696) 21 May 2023, 23:29:43 UTC
cd97484 gh-104686: Fix tracing for decorated classes (#104708) 21 May 2023, 23:20:19 UTC
64d1b44 gh-104683: `clinic.py`: Improve coverage for the `parse_converter` method (#104729) 21 May 2023, 23:00:47 UTC
f3466bc 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). 21 May 2023, 21:32:39 UTC
6ba8406 gh-104050: Add more type annotations to Argument Clinic (#104631) Annotate methods of the following classes: - class Function - class Parameter - class LandMine 21 May 2023, 21:24:26 UTC
bf6dd8f gh-104050: Add basic type hints to Argument Clinic clinic class (#104705) Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com> 21 May 2023, 20:49:34 UTC
c482e9a gh-104050: Annotate Argument Clinic return converters (#104706) Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com> 21 May 2023, 20:23:14 UTC
5841fbc gh-103857: Document utcnow and utcfromtimestamp deprecations in What's New (#104542) Co-authored-by: Paul Ganssle <1377457+pganssle@users.noreply.github.com> 21 May 2023, 19:45:44 UTC
0c5e79b gh-104719: IDLE - delete useless monkeypatch of tokenize (#104726) 21 May 2023, 18:42:26 UTC
ffe47cb gh-104719: Restore Tokenize module constants (#104722) 21 May 2023, 16:07:28 UTC
9392379 GH-101291: Add low level, unstable API for pylong (GH-101685) Co-authored-by: Petr Viktorin <encukou@gmail.com> 21 May 2023, 13:45:48 UTC
ab71acd 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. 21 May 2023, 13:00:50 UTC
b9fcfa6 gh-104717: Add comment about manual loop unrolling (gh-104718) 21 May 2023, 12:08:28 UTC
014dd30 gh-86275: improve Hypothesis configuration for CI and local runs (#104468) 21 May 2023, 11:52:29 UTC
be0c106 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> 21 May 2023, 10:12:24 UTC
2e91c7e gh-104469: Convert _testcapi/exceptions to use AC (gh-104502) 21 May 2023, 09:39:45 UTC
60993ba Corrected identifier (#104713) 21 May 2023, 05:57:50 UTC
99b6418 gh-104698: Fix reference leak in mmapmodule.c (#104700) Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com> 21 May 2023, 00:19:56 UTC
b870b1f gh-74690: Make a typing test more resilient (#104691) 21 May 2023, 00:13:37 UTC
6715f91 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> 21 May 2023, 00:03:02 UTC
3ed57e4 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> 20 May 2023, 23:33:09 UTC
12f1581 gh-103606: raise RuntimeError if config file is invalid or empty (#104701) (this adjusts new code) raise RuntimeError if provided config file is invalid or empty, not ValueError. 20 May 2023, 22:26:49 UTC
27a68be gh-104050: Add basic type hints to Argument Clinic DSL parser (#104704) Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com> 20 May 2023, 21:55:02 UTC
19dd5aa 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> 20 May 2023, 20:16:49 UTC
30488fa gh-49174: document that the effect of calling gc.collect() during a collection is undefined (#104699) 20 May 2023, 20:12:10 UTC
d1732fe 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. 20 May 2023, 17:09:23 UTC
68ee8b3 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> 20 May 2023, 16:07:40 UTC
2c97878 gh-104679 Fixed syntax highlighting in turtle docs (#104682) 20 May 2023, 15:42:29 UTC
ff7f731 gh-104658: Fix location of unclosed quote error for multiline f-strings (#104660) 20 May 2023, 13:07:05 UTC
663c049 gh-104683: Modernise `clinic.py` using `str.removeprefix` and `str.removesuffix` (#104685) Both methods were new in Python 3.9. 20 May 2023, 11:08:28 UTC
ae147d0 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> 20 May 2023, 10:52:32 UTC
02b6003 gh-104683: Argument clinic: use `dict` over `OrderedDict` (#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+. 20 May 2023, 10:24:00 UTC
06eeee9 Replace "OS X" with "macOS" (#104653) 20 May 2023, 08:25:52 UTC
ceaa4c3 gh-103987: fix several crashes in mmap module (#103990) Co-authored-by: sunmy2019 <59365878+sunmy2019@users.noreply.github.com> Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com> 20 May 2023, 03:34:12 UTC
3bc94e6 docs: fix wrong indentation causing rendering error in dis page (#104661) 19 May 2023, 20:11:21 UTC
6e39fa1 gh-94906: Support multiple steps in math.nextafter (#103881) This PR updates `math.nextafter` to add a new `steps` argument. The behaviour is as though `math.nextafter` had been called `steps` times in succession. --------- Co-authored-by: Mark Dickinson <mdickinson@enthought.com> 19 May 2023, 20:03:49 UTC
c3f43bf gh-104472: Skip `test_subprocess.ProcessTestCase.test_empty_env` if ASAN is enabled (#104667) Skip test_subprocess.ProcessTestCase.test_empty_env if ASAN is enabled. 19 May 2023, 19:25:51 UTC
625887e gh-103839: Allow building Tkinter against Tcl 8.7 without external libtommath (GH-103842) 19 May 2023, 19:09:59 UTC
486bc8e gh-85984: New additions and improvements to the tty library. (#101832) New additions to the tty library. Functions added: cfmakeraw(), and cfmakecbreak(). The functions setcbreak() and setraw() now return original termios to save an extra tcgetattr() call. --------- Signed-off-by: Soumendra Ganguly <soumendraganguly@gmail.com> Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com> Co-authored-by: Gregory P. Smith [Google LLC] <greg@krypto.org> 19 May 2023, 18:13:30 UTC
3ac856e gh-104659: Consolidate python examples in enum documentation (#104665) 19 May 2023, 17:46:20 UTC
27a7d5e gh-92248: Deprecate `type`, `choices`, `metavar` parameters of `argparse.BooleanOptionalAction` (#103678) Co-authored-by: Kirill <80244920+Eclips4@users.noreply.github.com> Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com> Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net> 19 May 2023, 16:44:43 UTC
ac56a85 gh-104645: fix error handling in marshal tests (#104646) 19 May 2023, 16:23:57 UTC
8f1f3b9 gh-104600: Make type.__type_params__ writable (#104634) Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com> 19 May 2023, 16:04:47 UTC
dbe171e gh-104602: Add additional test for listcomp with lambda (#104639) This threw a SystemError before #104603. Adding a separate test because this was a different failure mode than the other two new tests from #104603, both of which used to segfault. 19 May 2023, 15:16:39 UTC
8a8853a gh-104640: Disallow walrus in comprehension within type scopes (#104641) 19 May 2023, 14:31:09 UTC
ab8f546 gh-103921: Rename "type" header in argparse docs (#104654) This allows :keyword:`type` to link to docs for the new `type` statement (being written in gh-104642) instead of to this header in the argparse docs. 19 May 2023, 13:50:34 UTC
a412fc5 Improve readability of `typing._ProtocolMeta.__instancecheck__` (#104649) 19 May 2023, 13:30:02 UTC
9c5aa89 gh-96522: Fix deadlock in pty.spawn (#96639) 19 May 2023, 13:22:43 UTC
c26d03d GH-102818: Do not call `PyTraceBack_Here` in sys.settrace trampoline. (GH-104579) 19 May 2023, 11:40:48 UTC
616fcad GH-103545: Add macOS specific constants for ``os.setpriority`` to ``os`` (#104606) This adds a number of PRIO_DARWIN_* constants to the os module for use with os.setpriority. --------- Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com> 19 May 2023, 07:15:11 UTC
fd04bfe gh-104623: Update macOS installer to SQLite 3.42.0 (GH-104624) 19 May 2023, 06:52:24 UTC
70c7796 gh-104619: never leak comprehension locals to outer locals() (#104637) 19 May 2023, 01:50:24 UTC
86e6f16 gh-104602: ensure all cellvars are known up front (#104603) Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com> 19 May 2023, 00:07:35 UTC
3fadd7d gh-104600: Make function.__type_params__ writable (#104601) 18 May 2023, 23:45:37 UTC
f7835fc gh-74690: Don't set special protocol attributes on non-protocol subclasses of protocols (#104622) Don't set special protocol attributes on non-protocol subclasses of protocols 18 May 2023, 23:34:40 UTC
aab2a36 gh-104623: Update Windows installer to use SQLite 3.42.0 (#104625) 18 May 2023, 22:59:40 UTC
94c8eda gh-104050: Add more type annotations to Argument Clinic (#104628) Annotate the following: - methods of class Class - methods of class Module - methods of class PythonParser - function compute_checksum() - function parse_file() - global variable unsupported_special_methods 18 May 2023, 22:57:26 UTC
86ee49f gh-104629: Don't skip test_clinic if _testclinic is missing (#104630) Just skip the tests that depend on the _testclinic extension module; we can still run the Python tests. 18 May 2023, 22:56:34 UTC
b9dce3a gh-104549: Set __module__ on TypeAliasType (#104550) 18 May 2023, 22:56:15 UTC
1c55e8d gh-104050: Improve some typing around `default`s and sentinel values (#104626) - Convert `unspecified` and `unknown` to be members of a `Sentinels` enum, rather than instances of bespoke classes. - An enum feels more idiomatic here, and works better with type checkers. - Convert some `==` and `!=` checks for these values to identity checks, which are more idiomatic with sentinels. - _Don't_ do the same for `Null`, as this needs to be a distinct type due to its usage in `clinic.py`. - Use `object` as the annotation for `default` across `clinic.py`. `default` can be literally any object, so `object` is the correct annotation here. --- Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com> 18 May 2023, 21:58:42 UTC
61027c0 gh-104146: Remove unused vars from Argument Clinic (#104627) Remove 'in_classes' and 'so_far' from DSLParser.directive_module() 18 May 2023, 21:52:59 UTC
0589c6a gh-104615: don't make unsafe swaps in apply_static_swaps (#104620) 18 May 2023, 21:22:03 UTC
dcdc90d GH-104484: Add case_sensitive argument to `pathlib.PurePath.match()` (GH-104565) Co-authored-by: Barney Gale <barney.gale@gmail.com> 18 May 2023, 17:59:31 UTC
cfa517d GH-96803: Document and test new unstable internal frame API functions (GH-104211) Weaken contract of PyUnstable_InterpreterFrame_GetCode to return PyObject*. 18 May 2023, 09:10:15 UTC
68b5f08 GH-104580: Don't cache eval breaker in interpreter (GH-104581) Move eval-breaker to the front of the interpreter state. 18 May 2023, 09:08:33 UTC
662aede gh-104374: Remove access to class scopes for inlined comprehensions (#104528) Co-authored-by: Carl Meyer <carl@oddbird.net> 18 May 2023, 05:22:17 UTC
152227b gh-103606: Improve error message from logging.config.FileConfig (GH-103628) 18 May 2023, 04:20:47 UTC
c5b670e gh-104499: Fix typo. (#104598) 18 May 2023, 02:35:46 UTC
678bf57 gh-104499: IDLE - fix completions for tk aqua 8.7 (#104591) 18 May 2023, 01:36:58 UTC
7fc8e2d gh-104340: Suppress warning about unawaited exception for closed pipe stdin (#104586) 17 May 2023, 23:45:11 UTC
b27fe67 gh-104555: Runtime-checkable protocols: Don't let previous calls to `isinstance()` influence whether `issubclass()` raises an exception (#104559) Co-authored-by: Carl Meyer <carl@oddbird.net> 17 May 2023, 23:43:12 UTC
2f369ca gh-104050: Add type hints to Argument Clinic converter keywords (#104588) Introduce TypeSet, and use it to annotate the 'accept' keyword of various C converters. Also add some missing return annotations for converter init functions. 17 May 2023, 21:05:22 UTC
aed643b gh-104496: IDLE - fix About for mixed tcl/tk versions (#104585) Print both if they are different, as may happen in the future. 17 May 2023, 19:59:13 UTC
c649df6 gh-104372: Cleanup _posixsubprocess `make_inheritable` for async signal safety and no GIL requirement (#104518) Move all of the Python C API calls into the parent process up front instead of doing PyLong_AsLong and PyErr_Occurred and PyTuple_GET from the post-fork/vfork child process. Much of this was long overdue. We shouldn't have been using PyTuple and PyLong APIs within all of these low level functions anyways. 17 May 2023, 15:59:45 UTC
f7df173 GH-101520: Move tracemalloc functionality into core, leaving interface in Modules. (#104508) 17 May 2023, 13:17:16 UTC
2693194 typing: Add more tests for TypeVar (#104571) During the PEP 695 implementation at one point I made TypeVar.__name__ return garbage, and all of test_typing passed. So I decided to add a few more tests. In the process I discovered a minor incompatibility from the C implementation of TypeVar: empty constraints were returned as None instead of an empty tuple. 17 May 2023, 13:08:21 UTC
97db2f3 gh-104572: Improve error messages for invalid constructs in PEP 695 contexts (#104573) 17 May 2023, 13:05:42 UTC
0cb2fdc typing: Use PEP 695 syntax in typing.py (#104553) Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com> 17 May 2023, 13:03:58 UTC
2f630e1 gh-102153: Start stripping C0 control and space chars in `urlsplit` (#102508) `urllib.parse.urlsplit` has already been respecting the WHATWG spec a bit #25595. This adds more sanitizing to respect the "Remove any leading C0 control or space from input" [rule](https://url.spec.whatwg.org/#url-parsing:~:text=Remove%20any%20leading%20and%20trailing%20C0%20control%20or%20space%20from%20input.) in response to [CVE-2023-24329](https://nvd.nist.gov/vuln/detail/CVE-2023-24329). --------- Co-authored-by: Gregory P. Smith [Google] <greg@krypto.org> 17 May 2023, 08:49:20 UTC
b58bc8c gh-104469: Update README.txt for _testcapi (gh-104529) * gh-104469: Update README.txt for _testcapi Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com> Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru> 17 May 2023, 03:56:20 UTC
1b5a2b0 GH-103092: isolate `_elementtree` (#104561) 16 May 2023, 23:35:07 UTC
0afc473 gh-104050: Add typing to Argument Clinic converters (#104547) 16 May 2023, 22:32:11 UTC
b4a9747 GH-103906: Remove immortal refcounting in the interpreter (GH-103909) 16 May 2023, 21:36:02 UTC
3a4c44b gh-87474: Fix file descriptor leaks in subprocess.Popen (#96351) This fixes several ways file descriptors could be leaked from `subprocess.Popen` constructor during error conditions by opening them later and using a context manager "fds to close" registration scheme to ensure they get closed before returning. --------- Co-authored-by: Gregory P. Smith [Google] <greg@krypto.org> 16 May 2023, 20:23:53 UTC
20e994c GH-103092: isolate `pyexpat` (#104506) 16 May 2023, 20:03:01 UTC
5e9f471 gh-75367: Fix data descriptor detection in inspect.getattr_static (#104517) Co-authored-by: Carl Meyer <carl@oddbird.net> 16 May 2023, 17:34:44 UTC
a454a66 gh-104050: Add more annotations to `Tools/clinic.py` (#104544) 16 May 2023, 17:18:28 UTC
1163782 gh-104555: Fix isinstance() and issubclass() for runtime-checkable protocols that use PEP 695 (#104556) Fixes #104555 16 May 2023, 16:38:10 UTC
f40890b gh-103865: add monitoring support to LOAD_SUPER_ATTR (#103866) 16 May 2023, 16:29:00 UTC
back to top