summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* GH-100222: fix typo _py_set_opocde -> _py_set_opcode (GH-100259)Carl Meyer2022-12-152-66/+66
| | | | | Typo introduced in #100223. Automerge-Triggered-By: GH:brandtbucher
* GH-100000: Cleanup and polish various watchers code (GH-99998)Itamar Ostricher2022-12-146-14/+37
| | | | | | * Initialize `type_watchers` array to `NULL`s * Optimize code watchers notification * Optimize func watchers notification
* gh-90111: Minor Cleanup for Runtime-Global Objects (gh-100254)Eric Snow2022-12-144-8/+8
| | | | | | | | * move _PyRuntime.global_objects.interned to _PyRuntime.cached_objects.interned_strings (and use _Py_CACHED_OBJECT()) * rename _PyRuntime.global_objects to _PyRuntime.static_objects (This also relates to gh-96075.) https://github.com/python/cpython/issues/90111
* gh-100248: Add missing `ssl_shutdown_timeout` parameter in `asyncio` docs ↵busywhitespace2022-12-141-3/+17
| | | | (#100249)
* Assorted minor fixes for specialization stats. (GH-100219)Mark Shannon2022-12-142-27/+39
|
* gh-100176: venv: Remove redundant compat code for Python <= 3.2 (#100177)Hugo van Kemenade2022-12-142-146/+131
| | | | | | | | | | gh-100176: Remove redundant compat code for Python 3.2 and older Python 3.2 has been EOL since 2016-02-20 and 2.7 since 2020-01-01, so we can remove this old compatibility check and unindent the old else-block. Also, in the unindented block, replace a .format() call with an f-string. Plus similar changes in the documentation.
* GH-100222: Redefine _Py_CODEUNIT as a union to clarify structure of code ↵Mark Shannon2022-12-149-135/+151
| | | | unit. (GH-100223)
* gh-99955: undef ERROR and SUCCESS before redefining (fixes sanitizer ↵Irit Katriel2022-12-131-0/+2
| | | | warning) (#100215)
* GH-100206: use versionadded for the addition of sysconfig.get_default_scheme ↵Filipe Laíns2022-12-131-1/+1
| | | | (#100207)
* gh-81057: Move _Py_RefTotal to the "Ignored Globals" List (gh-100203)Eric Snow2022-12-122-4/+7
| | | | | We can't move it to _PyRuntimeState because the symbol is exposed in the stable ABI. We'll have to sort that out before a per-interpreter GIL, but it shouldn't be too hard. https://github.com/python/cpython/issues/81057
* gh-81057: Move Signal-Related Globals to _PyRuntimeState (gh-100085)Eric Snow2022-12-126-69/+82
| | | https://github.com/python/cpython/issues/81057
* gh-81057: Move faulthandler Globals to _PyRuntimeState (gh-100152)Eric Snow2022-12-129-73/+120
| | | https://github.com/python/cpython/issues/81057
* gh-81057: Move tracemalloc Globals to _PyRuntimeState (gh-100151)Eric Snow2022-12-129-107/+143
| | | https://github.com/python/cpython/issues/81057
* GH-100143: Improve collecting pystats for parts of runs (GH-100144)Michael Droettboom2022-12-124-25/+48
| | | | | | | | * pystats off by default * Add -Xpystats flag * Always dump pystats, even if turned off
* gh-99955: standardize return values of functions in compiler's code-gen ↵Irit Katriel2022-12-122-760/+695
| | | | (#100010)
* gh-79218: Define `MS_WIN64` macro for Mingw-w64 64bit on Windows (GH-100137)GalaxySnail2022-12-122-0/+11
|
* Fix: typo (Indention) (GH-99904)jarrodcolburn2022-12-121-1/+1
| | | | | Example needed to be indented. Was trying to call a context manger `pr` (from ` with cProfile.Profile() as pr:`) wot perform ` pr.print_stats()` once it had already exited. Automerge-Triggered-By: GH:AlexWaygood
* gh-96715 Remove redundant NULL check in `profile_trampoline` function (#96716)chgnrdv2022-12-121-4/+0
| | | Closes #96715
* gh-100176: remove incorrect version compatibility check from argument clinic ↵Shantanu2022-12-121-4/+0
| | | | (#100190)
* clarify the 4300-digit limit on int-str conversion (#100175)Ned Batchelder2022-12-122-4/+4
|
* gh-70393: Clarify mention of "middle" scope (#98839)Shantanu2022-12-121-2/+2
|
* gh-99688: Fix outdated tests in test_unary (#99712)Yesung(Isaac) Lee2022-12-111-6/+3
| | | | * Remove duplicates from "L" suffix removal * test_invert now tests `~`.
* gh-100174: [Enum] Correct PowersOfThree example. (GH-100178)Beweeted2022-12-111-2/+2
| | | Changed from multiples of 3 to powers of 3 to match the class name.
* gh-88500: Reduce memory use of `urllib.unquote` (#96763)Gregory P. Smith2022-12-113-11/+23
| | | | | | | | | | | `urllib.unquote_to_bytes` and `urllib.unquote` could both potentially generate `O(len(string))` intermediate `bytes` or `str` objects while computing the unquoted final result depending on the input provided. As Python objects are relatively large, this could consume a lot of ram. This switches the implementation to using an expanding `bytearray` and a generator internally instead of precomputed `split()` style operations. Microbenchmarks with some antagonistic inputs like `mess = "\u0141%%%20a%fe"*1000` show this is 10-20% slower for unquote and unquote_to_bytes and no different for typical inputs that are short or lack much unicode or % escaping. But the functions are already quite fast anyways so not a big deal. The slowdown scales consistently linear with input size as expected. Memory usage observed manually using `/usr/bin/time -v` on `python -m timeit` runs of larger inputs. Unittesting memory consumption is difficult and does not seem worthwhile. Observed memory usage is ~1/2 for `unquote()` and <1/3 for `unquote_to_bytes()` using `python -m timeit -s 'from urllib.parse import unquote, unquote_to_bytes; v="\u0141%01\u0161%20"*500_000' 'unquote_to_bytes(v)'` as a test.
* gh-99941: Ensure that asyncio.Protocol.data_received receives immutable ↵DarioDaF2022-12-104-4/+10
| | | | bytes (#100053)
* gh-99728: correct typo in `datetime` format codes documentation (#99750)Brad Wolfe2022-12-101-1/+1
|
* gh-99970 Adding missing `optionflags` parameter in the documentation of ↵busywhitespace2022-12-101-1/+1
| | | | `doctest` (#99971)
* Fix potential flakiness in `test_run_until_complete_baseexception` (#100148)Fantix King2022-12-100-0/+0
|
* Fix potential flakiness in `test_run_until_complete_baseexception` (#100148)Fantix King2022-12-100-0/+0
|
* Fix potential flakiness in `test_run_until_complete_baseexception` (#100148)Fantix King2022-12-101-1/+1
|
* gh-99582: freeze `zipimport` into `_bootstrap_python` (#99583)Kai Zhang2022-12-103-1/+5
| | | Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
* gh-100049: fix `repr` for `mappingproxy` in dictionary view example doc ↵ram vikram singh2022-12-101-1/+1
| | | | (#100052)
* gh-81057: Fix a Reference Leak in the posix Module (gh-100140)Eric Snow2022-12-091-0/+1
| | | | | The leak was introduced in gh-100082. https://github.com/python/cpython/issues/81057
* gh-81057: Fix the wasm32-wasi Buildbot (gh-100139)Eric Snow2022-12-092-2/+3
| | | | | The build was broken by gh-100084. https://github.com/python/cpython/issues/81057
* GH-98363: Shrink the physical size as well as the logical size (GH-100138)Raymond Hettinger2022-12-091-2/+1
|
* bpo-44512: Fix handling of extrasactions arg to csv.DictWriter with mixed or ↵andrei kulakov2022-12-093-1/+12
| | | | upper case (#26924)
* bpo-43984: Allow winreg.SetValueEx to set -1 without treating it as an error ↵Shreyan Avigyan2022-12-093-33/+64
| | | | (GH-25775)
* 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
|