summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* GH-98522: Add version number to code objects. (GH-98525)Mark Shannon2022-12-0910-4/+23
| | | | | | * Add version number to code object for better versioning of functions. * Improves specialization for closures and list comprehensions.
* gh-88267: Avoid DLL exporting functions from static builds on Windows(GH-99888)Christian Rendina2022-12-092-3/+10
|
* GH-100110: Specialize FOR_ITER for tuples (GH-100109)Ken Jin2022-12-0910-67/+122
| | | * Specialize FOR_ITER for tuples
* GH-100113: remove remaining `yield from` usage from `asyncio` tests (#100114)Kumar Aditya2022-12-091-2/+2
|
* gh-99087: Add missing newline for prompts in docs (GH-98993)Stanley2022-12-0922-0/+43
| | | Add newline for prompts so copying to REPL does not cause errors.
* gh-81057: Fix an ifdef in the time module (#100125)Eric Snow2022-12-091-2/+4
| | | | | An earlier commit only defined check_ticks_per_second() when HAVE_TIMES is defined. However, we also need it when HAVE_CLOCK is defined. This primarily affects Windows. https://github.com/python/cpython/issues/81057
* gh-81057: Move Threading-Related Globals to _PyRuntimeState (#100084)Eric Snow2022-12-0911-54/+114
| | | https://github.com/python/cpython/issues/81057
* gh-81057: Move Ceval Trampoline Globals to _PyRuntimeState (gh-100083)Eric Snow2022-12-099-84/+125
| | | https://github.com/python/cpython/issues/81057
* GH-98831: Generate things in the input order (#100123)Guido van Rossum2022-12-082-261/+269
| | | | This makes it easier to see what changed in the generated code when converting an instruction to super or macro.
* gh-81057: Move time Globals to _PyRuntimeState (gh-100122)Eric Snow2022-12-0814-118/+100
| | | https://github.com/python/cpython/issues/81057
* gh-81057: Move OS-Related Globals to _PyRuntimeState (gh-100082)Eric Snow2022-12-0814-27/+107
| | | https://github.com/python/cpython/issues/81057
* GH-98831: Typed stack effects, and more instructions converted (#99764)Guido van Rossum2022-12-084-604/+545
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Stack effects can now have a type, e.g. `inst(X, (left, right -- jump/uint64_t)) { ... }`. Instructions converted to the non-legacy format: * COMPARE_OP * COMPARE_OP_FLOAT_JUMP * COMPARE_OP_INT_JUMP * COMPARE_OP_STR_JUMP * STORE_ATTR * DELETE_ATTR * STORE_GLOBAL * STORE_ATTR_INSTANCE_VALUE * STORE_ATTR_WITH_HINT * STORE_ATTR_SLOT, and complete the store_attr family * Complete the store_subscr family: STORE_SUBSCR{,DICT,LIST_INT} (STORE_SUBSCR was alread half converted, but wasn't using cache effects yet.) * DELETE_SUBSCR * PRINT_EXPR * INTERPRETER_EXIT (a bit weird, ends in return) * RETURN_VALUE * GET_AITER (had to restructure it some) The original had mysterious `SET_TOP(NULL)` before `goto error`. I assume those just account for `obj` having been decref'ed, so I got rid of them in favor of the cleanup implied by `ERROR_IF()`. * LIST_APPEND (a bit unhappy with it) * SET_ADD (also a bit unhappy with it) Various other improvements/refactorings as well.
* GH-98363: Have batched() return tuples (GH-100118)Raymond Hettinger2022-12-084-38/+40
|
* gh-96250: Improve sqlite3 injection attack example (#99270)Jia Junjie2022-12-081-6/+10
| | | | Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM> Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
* test_ast uses infinite_recursion() to prevent crash (#100104)Victor Stinner2022-12-081-1/+2
| | | | | | | test.test_ast_recursion_limit() now uses infinite_recursion() of test.support to prevent crashes on debug builds. Before this change, the test crashed on ARM64 Windows 3.x buildbot worker which builds Python in debug mode.
* Fix `test_run_until_complete_baseexception` test to check for ↵Fantix King2022-12-081-8/+3
| | | | `KeyboardInterrupt` in asyncio (#24477)
* gh-100098: [Enum] insist on actual tuples, no subclasses, for auto (GH-100099)Ethan Furman2022-12-083-1/+17
| | | | | | When checking for auto() instances, only top-level usage is supported, which means either alone or as part of a regular tuple. Other containers, such as lists, dicts, or namedtuples, will not have auto() transformed into a value.
* gh-98030: socket: add missing TCP socket options (#98031)Matthieu Baerts2022-12-083-4/+78
| | | | | | | | | | | | | A few TCP socket options have been added to the Linux kernel these last few years. This commit adds all the ones available in Linux 6.0: https://elixir.bootlin.com/linux/v6.0/source/include/uapi/linux/tcp.h#L91 While at it, the TCP_FASTOPEN option has been moved lower in the list just to keep the same order as in tcp.h to ease future synchronisations. Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
* gh-92120: The docstring of enum.Enum is invalid in reST (GH-92122)Takeshi KOMIYA2022-12-082-7/+8
| | | Closes #92120
* gh-98778: Update HTTPError to initialize properly even if fp is None (gh-99966)Dong-hee Na2022-12-083-7/+10
|
* gh-100086: Add build info to test.libregrtest (#100093)Victor Stinner2022-12-083-1/+91
| | | | The Python test runner (libregrtest) now logs Python build information like "debug" vs "release" build, or LTO and PGO optimizations.
* gh-81057: Move More Globals to _PyRuntimeState (gh-100092)Eric Snow2022-12-0714-56/+66
| | | https://github.com/python/cpython/issues/81057
* gh-90110: Clean Up the C-analyzer Globals Lists (gh-100091)Eric Snow2022-12-074-441/+487
| | | https://github.com/python/cpython/issues/90110
* gh-100072: only trigger netlify builds for doc changes (#100074)Nikita Sobolev2022-12-071-1/+4
| | | Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
* gh-100077: make test_code.test_invalid_bytecode more robust and maintainable ↵Irit Katriel2022-12-071-8/+12
| | | | (#100078)
* gh-83035: handle decorator with nested parens in inspect.getsource (#99654)Carl Meyer2022-12-074-9/+22
|
* gh-98724: Fix Py_CLEAR() macro side effects (#99100) (#100070)Victor Stinner2022-12-077-29/+235
| | | | | | | | | | | | | | The Py_CLEAR(), Py_SETREF() and Py_XSETREF() macros now only evaluate their arguments once. If an argument has side effects, these side effects are no longer duplicated. Use temporary variables to avoid duplicating side effects of macro arguments. If available, use _Py_TYPEOF() to avoid type punning. Otherwise, use memcpy() for the assignment to prevent a miscompilation with strict aliasing caused by type punning. Add _Py_TYPEOF() macro: __typeof__() on GCC and clang. Add test_py_clear() and test_py_setref() unit tests to _testcapi.
* gh-93018: Fix for the compatibility problems with expat (gh-93900)Matěj Cepl2022-12-072-15/+10
|
* [Enum] Remove unused code from `test_enum.py` (GH-96986)Nikita Sobolev2022-12-071-14/+0
|
* gh-100050: Fix an assertion error when raising unclosed parenthesis errors ↵Pablo Galindo Salgado2022-12-063-0/+22
| | | | | in the tokenizer (GH-100065) Automerge-Triggered-By: GH:pablogsal
* PyUnicode_KIND() uses _Py_RVALUE() (#100060)Victor Stinner2022-12-061-1/+1
| | | | The PyUnicode_KIND() macro is modified to use _Py_RVALUE(), so it can no longer be used as a l-value.
* gh-94943: [Enum] improve repr() when inheriting from a dataclass (GH-99740)Ethan Furman2022-12-065-4/+102
| | | Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
* Post 3.12.0a3Thomas Wouters2022-12-061-1/+1
|
* Python 3.12.0a3v3.12.0a3Thomas Wouters2022-12-0684-193/+847
|
* gh-93453: No longer create an event loop in get_event_loop() (#98440)Serhiy Storchaka2022-12-0618-251/+114
| | | | | | | | | | | | | | | asyncio.get_event_loop() now always return either running event loop or the result of get_event_loop_policy().get_event_loop() call. The latter should now raise an RuntimeError if no current event loop was set instead of creating and setting a new event loop. It affects also a number of asyncio functions and constructors which call get_event_loop() implicitly: ensure_future(), shield(), gather(), etc. DeprecationWarning is no longer emitted if there is no running event loop but the current event loop was set. Co-authored-by: Łukasz Langa <lukasz@langa.pl>
* GH-99729: Unlink frames before clearing them (GH-100030)Brandt Bucher2022-12-066-11/+60
|
* bpo-37860: re-add netlify.toml to set up deploy previews for docs (#92852)Ashwin Ramaswami2022-12-063-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | * Revert "bpo-46184: remove `netlify.toml` (#30272)" This reverts commit fbaf2e604cd354f1ebc6be029480010c6715a8ca. * Delete runtime.txt * Create runtime.txt * Delete runtime.txt * Update netlify.toml * Update netlify.toml * Add netlify badge * Update Doc/tools/templates/layout.html Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com> * Update layout.html Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
* gh-100008: VS 2017 is required since Python 3.11 (#100045)Victor Stinner2022-12-061-0/+1
|
* GH-100026: Include the number of raw input files in summarize_stats.py ↵Michael Droettboom2022-12-061-0/+4
| | | | (GH-100027)
* gh-99957: Add `frozen_default` parameter on `dataclass_transform` (#99958)Erik De Bonte2022-12-064-1/+13
|
* gh-100001: Remove doc typo, add versionadded (#100042)Gregory P. Smith2022-12-051-1/+3
| | | gh-100001: Remove new doc typo, add versionadded.
* gh-100001: Also escape \s in http.server log messages. (#100038)Gregory P. Smith2022-12-053-0/+8
| | | | | | | Also \ escape \s in the http.server BaseHTTPRequestHandler.log_message so that it is technically possible to parse the line and reconstruct what the original data was. Without this a \xHH is ambiguious as to if it is a hex replacement we put in or the characters r"\x" came through in the original request line.
* gh-99984: Fix Compiler Warnings (#100036)Eric Snow2022-12-051-2/+6
| | | https://github.com/python/cpython/issues/99984
* Use sphinxext-opengraph to generate OpenGraph metadata (#99931)Hugo van Kemenade2022-12-054-4/+33
| | | Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
* gh-100001: Omit control characters in http.server stderr logs. (#100002)Gregory P. Smith2022-12-054-2/+43
| | | Replace control characters in http.server.BaseHTTPRequestHandler.log_message with an escaped \xHH sequence to avoid causing problems for the terminal the output is printed to.
* gh-99741: Implement Multi-Phase Init for the _xxsubinterpreters Module ↵Eric Snow2022-12-056-190/+384
| | | | | | | (gh-99742) _xxsubinterpreters is an internal module used for testing. https://github.com/python/cpython/issues/99741
* dataclasses.rst: Prevent horizontal scrolling (gh-100025)Ram Rachum2022-12-051-1/+2
|
* bpo-44817: Ignore additional errors in ntpath.realpath (GH-27574)Michael Förderer2022-12-052-1/+6
|
* gh-98680: Add PyBUF_* constants to the Limited API listing (GH-100018)Petr Viktorin2022-12-052-0/+47
| | | | | | ``PyBUF_*`` constants are marked as part of Limited API of Python 3.11+. These were available in 3.11.0 with `Py_LIMITED_API` defined for 3.11, and are necessary to use the buffer API. Omitting them in `stable_abi.toml` was a mistake.
* gh-60203: Revert changes in cycle.__setstate__ (#99982)Serhiy Storchaka2022-12-052-2/+39
| | | | In case if only True/False be supported as boolean arguments in future, we should continue to support 1/0 here.