Commit Graph

111883 Commits

Author SHA1 Message Date
Christian Heimes a4aa52dc28
bpo-46263: FreeBSD 14.0 jemalloc workaround for junk bytes of freed memory (GH-30434)
Automerge-Triggered-By: GH:tiran
2022-01-06 07:14:49 -08:00
Kumar Aditya b50e5e916a
bpo-46278: fix typo introduced in GH-30427 (GH-30430)
Automerge-Triggered-By: GH:asvetlov
2022-01-06 05:21:24 -08:00
Mark Shannon e028ae99ec
bpo-45923: Handle call events in bytecode (GH-30364)
* Add a RESUME instruction to handle "call" events.
2022-01-06 13:09:25 +00:00
Andrew Svetlov 3e43fac250
Reflect 'context' arg in 'AbstractEventLoop.call_*()' methods (GH-30427) 2022-01-06 14:31:32 +02:00
penguin_wwy 3db762db72
bpo-46031: add POP_JUMP_IF_NOT_NONE and POP_JUMP_IF_NONE (GH-30019) 2022-01-06 11:38:35 +00:00
Victor Stinner 35d6540c90
bpo-46006: Revert "bpo-40521: Per-interpreter interned strings (GH-20085)" (GH-30422)
This reverts commit ea251806b8.

Keep "assert(interned == NULL);" in _PyUnicode_Fini(), but only for
the main interpreter.

Keep _PyUnicode_ClearInterned() changes avoiding the creation of a
temporary Python list object.
2022-01-06 08:53:44 +01:00
Nikita Sobolev e5894ca8fd
bpo-46266: Add calendar day of week constants to __all__ (GH-30412) 2022-01-05 14:21:04 -06:00
Nikita Sobolev 817a6bc9f7
bpo-46269: [Enum] remove special-casing of `__new__` in `EnumType.__dir__` (GH-30421) 2022-01-05 09:06:02 -08:00
Raymond Hettinger 43aac29cbb
bpo-46257: Convert statistics._ss() to a single pass algorithm (GH-30403) 2022-01-05 09:39:10 -06:00
Inada Naoki 46e4c257e7
bpo-46236: Fix PyFunction_GetAnnotations() returned tuple. (GH-30409)
Automerge-Triggered-By: GH:pablogsal
2022-01-05 04:25:54 -08:00
Simon McVittie dd50316e45
bpo-43137: Revert "webbrowser: Don't run gvfs-open on GNOME" (GH-30417)
gvfs-open was deprecated in 2015 and removed in 2018, but its replacement,
gio(1), is not available in Ubuntu 16.04, which is apparently still
supported by CPython upstream even though it is considered to be EOL by
Ubuntu developers.

Signed-off-by: Simon McVittie <smcv@debian.org>
2022-01-05 11:53:23 +00:00
Brandt Bucher 332e6b9725
bpo-45256: Don't track the exact depth of each `InterpreterFrame` (GH-30372) 2022-01-05 11:30:26 +00:00
Christian Heimes cae55542d2
bpo-46263: Don't use MULTIARCH on FreeBSD (#30410) 2022-01-05 10:54:17 +01:00
Nikita Sobolev 91bc6f9615
bpo-46262: [Enum] test error path in `Flag._missing_` (GH-30408)
add tests that exercise the `_missing_` error path for `Flag` and `IntFlag`

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
2022-01-04 16:11:06 -08:00
Brandt Bucher 31e43cbe5f
bpo-46009: Remove GEN_START (GH-30367) 2022-01-04 11:38:32 -08:00
Philipp Claßen f404e26d74
Fix missing "," in the documentation of Executor Objects (GH-30404) 2022-01-04 10:48:04 -08:00
Dennis Sweeney 7537f60087
bpo-45609: More specialization stats for STORE_SUBSCR (GH-30193) 2022-01-04 18:05:09 +00:00
Kumar Aditya 7d7817cf0f
bpo-20369: concurrent.futures.wait() now deduplicates futures given a… (GH-30168)
* bpo-20369: concurrent.futures.wait() now deduplicates futures given as arg.

* 📜🤖 Added by blurb_it.

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
2022-01-04 13:36:13 +00:00
Hugo van Kemenade b949845b36
bpo-33252: Document that ResourceWarning is ignored by default (GH-30358)
`ResourceWarning` is ignored by default.

Document this behaviour, for consistency with others in this table such as `DeprecationWarning`.

Documentation PR can skip NEWS file.

Automerge-Triggered-By: GH:iritkatriel
2022-01-04 03:34:31 -08:00
Pablo Galindo Salgado e09d94a140
bpo-46231: Remove invalid_* rules preceded by more tokens from the grammar docs (GH-30341) 2022-01-04 10:42:15 +00:00
Pablo Galindo Salgado 70f415fb8b
bpo-46240: Correct the error for unclosed parentheses when the tokenizer is not finished (GH-30378) 2022-01-04 10:41:22 +00:00
Irit Katriel a94461d718
bpo-46202: Remove opcode POP_EXCEPT_AND_RERAISE (GH-30302)
* bpo-46202: remove opcode POP_EXCEPT_AND_RERAISE

* do not assume that an exception group is truthy
2022-01-04 10:37:12 +00:00
Erlend Egeberg Aasland a09062c267
bpo-44092: Move What's New entry to where it belongs (GH-30381) 2022-01-04 09:36:30 +00:00
David Gilbertson bef48837e7
Update old-style strings to f-strings (GH-30384)
Let me know if this sort of change is unwanted...
2022-01-04 01:25:56 -08:00
Nikita Sobolev 5a2a65096c
bpo-46239: improve error message when importing `asyncio.windows_events` (GH-30353) 2022-01-04 10:44:26 +02:00
Nikita Sobolev 1b111338cf
bpo-46238: reuse `_winapi` constants in `asyncio.windows_events` (GH-30352) 2022-01-04 10:42:19 +02:00
Tim Peters 3aa5242b54
bpo-46233: Minor speedup for bigint squaring (GH-30345)
x_mul()'s squaring code can do some redundant and/or useless
work at the end of each digit pass. A more careful analysis
of worst-case carries at various digit positions allows
making that code leaner.
2022-01-03 20:41:16 -06:00
Erlend Egeberg Aasland f1a58441ee
bpo-44092: Remove unused member `reset` from `sqlite3.Cursor` (GH-30377)
Automerge-Triggered-By: GH:pablogsal
2022-01-03 15:47:16 -08:00
Hugo van Kemenade 2db5613063
bpo-34538: Remove Exception subclassing from tutorial (GH-30361)
Remove the bit about subclassing exceptions.

Documentation PR can skip the NEWS label.

Automerge-Triggered-By: GH:iritkatriel
2022-01-03 14:52:09 -08:00
Raymond Hettinger 770f43d47e
Add doctest and improve readability for move_to_end() example. (#30370) 2022-01-03 14:26:08 -08:00
Irit Katriel 51700bf08b
bpo-34931: [doc] clarify behavior of os.path.splitext() on paths with multiple leading periods (GH-30347) 2022-01-03 20:10:07 +00:00
Pablo Galindo Salgado dd6c35761a
bpo-46110: Restore commit e9898bf153
This restores commit e9898bf153 .
2022-01-03 19:54:06 +00:00
Erlend Egeberg Aasland 9d6a239a34
bpo-44092: Don't reset statements/cursors before rollback (GH-26026)
In SQLite versions pre 3.7.11, pending statements would block a rollback.  This is no longer the case, so remove the workaround.
2022-01-03 19:02:39 +00:00
Pablo Galindo Salgado 9d35dedc5e
Revert "bpo-46110: Add a recursion check to avoid stack overflow in the PEG parser (GH-30177)" (GH-30363)
This reverts commit e9898bf153 temporarily as we want to confirm if this commit is the cause of a slowdown at startup time.
2022-01-03 18:29:18 +00:00
David CARLIER c960b191b8
bpo-46222: posixmodule sendfile FreeBSD's constants updates. (GH-30327)
* posixodule sendfile FreeBSD's constants updates.

* 📜🤖 Added by blurb_it.

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
2022-01-03 15:01:04 +02:00
Ned Deily 549e628272
bpo-40477: macOS Python Launcher app fixes for recent macOS releases (GH-30348)
This change solves two problems encountered by users of the macOS Python Launcher app on recent macOS releases (10.14+):

- The launcher app was no longer able to launch the macOS Terminal.app to run a script.

- Even if Terminal.app was already launched, the launcher app was unable to send an Apple Event to Terminal.app to open and run Python with the desired .py file.
2022-01-03 01:19:59 -05:00
Nikita Sobolev fedefa6735
bpo-46229: remove `CODE_OF_CONDUCT.md` to use org default (GH-30342)
Automerge-Triggered-By: GH:Mariatta
2022-01-02 15:30:54 -08:00
Irit Katriel 65e7c1f90e
bpo-46219, 46221: simplify except* implementation following exc_info changes. Move helpers to exceptions.c. Do not assume that exception groups are truthy. (GH-30289) 2022-01-02 23:22:42 +00:00
Jade Lovelace 8e75c6b49b
argparse docs: prog default is the basename of argv[0] (GH-30298) 2022-01-02 12:16:25 -08:00
Benjamin Peterson ba00f0d93a
Update copyright year to 2022. (GH-30335)
Automerge-Triggered-By: GH:benjaminp
2022-01-02 12:08:48 -08:00
Tim Peters 863729e9c6
bpo-46218: Change long_pow() to sliding window algorithm (GH-30319)
* bpo-46218: Change long_pow() to sliding window algorithm

The primary motivation is to eliminate long_pow's reliance on that the number of bits in a long "digit" is a multiple of 5. Now it no longer cares how many bits are in a digit.

But the sliding window approach also allows cutting the precomputed table of small powers in half, which reduces initialization overhead enough that the approach pays off for smaller exponents too. Depending on exponent bit patterns, a sliding window may also be able to save some bigint multiplies (sometimes when at least 5 consecutive exponent bits are 0, regardless of their starting bit position modulo 5).

Note: boosting the window width to 6 didn't work well overall. It give marginal speed improvements for huge exponents, but the increased overhead (the small-power table needs twice as many entries) made it a loss for smaller exponents.

Co-authored-by: Oleg Iarygin <dralife@yandex.ru>
2022-01-02 13:18:20 -06:00
Nikita Sobolev ce4d25f3cd
bpo-46196: document method cmd.Cmd.columnize (#30303)
The method is already written and tested, now it's officially public.
2022-01-02 13:33:20 -05:00
Hugo van Kemenade 7a8796dc67
bpo-45903: Fix typo in What's New: Signature.from_builtin is removed (GH-29813) 2022-01-02 08:51:56 -08:00
Irit Katriel a82baed0e9
bpo-45615: Add missing test for printing traceback for non-exception. Fix traceback.py (GH-30091) 2022-01-02 09:34:03 +00:00
Raymond Hettinger a09bc3a404
bpo-46095: Improve SeqIter documentation. (GH-30316) 2022-01-01 10:37:26 -08:00
Raymond Hettinger ac4eea2172
bpo-46079: Replace external link that is down for maintenance. (GH-30315) 2022-01-01 09:49:55 -08:00
Mark Dickinson 0b58bac3e7
bpo-37295: More direct computation of power-of-two factor in math.comb (GH-30313)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2021-12-31 19:52:27 +00:00
Sebastian Pipping e18d81569f
bpo-45321: Add missing error codes to module `xml.parsers.expat.errors` (GH-30188)
The idea is to ensure that module `xml.parsers.expat.errors`
contains all known error codes and messages,
even when CPython is compiled or run with an outdated version of libexpat.

https://bugs.python.org/issue45321
2021-12-31 10:57:00 +01:00
Jason R. Coombs 35628e4cde
bpo-46118: Make sure importlib.resources is included. (GH-30311) 2021-12-30 22:39:24 -05:00
Jason R. Coombs 99945c6b5c
bpo-46109: Separate out files relating to importlib.resources (GH-30160)
* Separate out files relating to importlib.resources

* Update Introduction to direct readers to the submodule documentation.

* Create separate file for abcs relating to resources.

* Move abc docs back to where they were.
2021-12-30 21:17:05 -05:00