]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
4 years agobpo-44392: Add Py_GenericAlias to C API docs (GH-26724)
Ken Jin [Wed, 16 Jun 2021 14:12:25 +0000 (22:12 +0800)] 
bpo-44392: Add Py_GenericAlias to C API docs (GH-26724)

Also fix stable ABI type definitions

4 years agobpo-38211: Clean up type_init() (GH-16257)
Sergey Fedoseev [Wed, 16 Jun 2021 13:04:38 +0000 (18:04 +0500)] 
bpo-38211: Clean up type_init() (GH-16257)

1. Remove conditions already checked by assert()
2. Remove object_init() call that effectively creates an empty tuple and
checks that this tuple is empty

4 years agobpo-44422: threading.Thread reuses the _delete() method (GH-26741)
Victor Stinner [Wed, 16 Jun 2021 09:41:17 +0000 (11:41 +0200)] 
bpo-44422: threading.Thread reuses the _delete() method (GH-26741)

The _bootstrap_inner() method of threading.Thread now reuses its
_delete() method rather than accessing _active() directly. It became
possible since _active_limbo_lock became reentrant. Moreover, it no
longer ignores any exception when deleting the thread from the
_active dictionary.

4 years agobpo-43795: Don't list private names in the limited API (GH-26740)
Petr Viktorin [Wed, 16 Jun 2021 09:22:36 +0000 (11:22 +0200)] 
bpo-43795: Don't list private names in the limited API (GH-26740)

* Remove struct _node from the stable ABI list

This struct was removed along with the old parser in Python 3.9 (PEP 617)

* Stable ABI list: Use the public name "PyFrameObject" rather than "_frame"

* Ensure limited API doesn't contain private names

Names prefixed by an underscore are private by definition.

* Add a blurb

4 years agobpo-44342: [Enum] sync current docs to 3.10 (GH-26750)
Ethan Furman [Wed, 16 Jun 2021 01:51:19 +0000 (18:51 -0700)] 
bpo-44342: [Enum] sync current docs to 3.10 (GH-26750)

4 years agobpo-43693: Eliminate unused "fast locals". (gh-26587)
Eric Snow [Tue, 15 Jun 2021 22:35:25 +0000 (16:35 -0600)] 
bpo-43693: Eliminate unused "fast locals". (gh-26587)

Currently, if an arg value escapes (into the closure for an inner function) we end up allocating two indices in the fast locals even though only one gets used.  Additionally, using the lower index would be better in some cases, such as with no-arg `super()`.  To address this, we update the compiler to fix the offsets so each variable only gets one "fast local".  As a consequence, now some cell offsets are interspersed with the locals (only when an arg escapes to an inner function).

https://bugs.python.org/issue43693

4 years agobpo-43475: Add what's new entry for NaN hash changes (GH-26725)
Mark Dickinson [Tue, 15 Jun 2021 18:48:35 +0000 (19:48 +0100)] 
bpo-43475: Add what's new entry for NaN hash changes (GH-26725)

4 years ago[Enum] improve test, add andrei kulakov to ACKS (GH-26726)
Ethan Furman [Tue, 15 Jun 2021 18:38:15 +0000 (11:38 -0700)] 
[Enum] improve test, add andrei kulakov to ACKS (GH-26726)

4 years agobpo-44422: Fix threading.enumerate() reentrant call (GH-26727)
Victor Stinner [Tue, 15 Jun 2021 14:14:24 +0000 (16:14 +0200)] 
bpo-44422: Fix threading.enumerate() reentrant call (GH-26727)

The threading.enumerate() function now uses a reentrant lock to
prevent a hang on reentrant call.

4 years agobpo-42972: _thread.RLock implements the GH protocol (GH-26734)
Victor Stinner [Tue, 15 Jun 2021 13:09:24 +0000 (15:09 +0200)] 
bpo-42972: _thread.RLock implements the GH protocol (GH-26734)

The _thread.RLock type now fully implement the GC protocol: add a
traverse function and the Py_TPFLAGS_HAVE_GC flag.

4 years agobpo-42064: Move sqlite3 types to global state (GH-26537)
Erlend Egeberg Aasland [Tue, 15 Jun 2021 12:47:34 +0000 (14:47 +0200)] 
bpo-42064: Move sqlite3 types to global state (GH-26537)

* Move connection type to global state
* Move cursor type to global state
* Move prepare protocol type to global state
* Move row type to global state
* Move statement type to global state
* ADD_TYPE takes a pointer
* pysqlite_get_state is now static inline

4 years agoAdd extra stats for attribute misses (GH-26732)
Mark Shannon [Tue, 15 Jun 2021 12:01:42 +0000 (13:01 +0100)] 
Add extra stats for attribute misses (GH-26732)

4 years agoFix a typo in _make_class_unpicklable() docstring (GH-26729)
andrei kulakov [Tue, 15 Jun 2021 02:42:46 +0000 (22:42 -0400)] 
Fix a typo in _make_class_unpicklable() docstring (GH-26729)

4 years agobpo-44409: Fix error location in tokenizer errors that happen during initialization...
Pablo Galindo [Mon, 14 Jun 2021 16:46:11 +0000 (17:46 +0100)] 
bpo-44409: Fix error location in tokenizer errors that happen during initialization (GH-26712)

4 years agoFix typo in lnotab_notes.txt (GH-26711)
Gabriele N. Tornetta [Mon, 14 Jun 2021 14:49:05 +0000 (15:49 +0100)] 
Fix typo in lnotab_notes.txt (GH-26711)

Thanks for your contribution @P403n1x87

4 years agobpo-38291: Remove mention of typing.io and typing.re again (GH-26113)
Sebastian Rittau [Mon, 14 Jun 2021 14:45:19 +0000 (16:45 +0200)] 
bpo-38291: Remove mention of typing.io and typing.re again (GH-26113)

They were originally removed in GH-10173 per bpo-35089, but then
readded in GH-21574. Cf. bpo-38291 for decision to remove.

4 years agoRemove accidentally duplicated STAT_INC (GH-26718)
Mark Shannon [Mon, 14 Jun 2021 12:38:16 +0000 (13:38 +0100)] 
Remove accidentally duplicated STAT_INC (GH-26718)

4 years agobpo-44338: Port LOAD_GLOBAL to PEP 659 adaptive interpreter (GH-26638)
Mark Shannon [Mon, 14 Jun 2021 10:04:09 +0000 (11:04 +0100)] 
bpo-44338: Port LOAD_GLOBAL to PEP 659 adaptive interpreter (GH-26638)

* Add specializations of LOAD_GLOBAL.

* Add more stats.

* Remove old opcache; it is no longer used.

* Add NEWS

4 years agobpo-44310: Note that lru_cache keep references to both arguments and results (GH...
Raymond Hettinger [Mon, 14 Jun 2021 05:47:26 +0000 (00:47 -0500)] 
bpo-44310:  Note that lru_cache keep references to both arguments and results (GH-26715)

* Simplify the count_vowels example
* Hits and misses are fetched while a lock is held
* Add note that references are kept for arguments and return values
* Clarify behavior when *typed* is false.

4 years agobpo-44389: Fix deprecation of OP_NO_TLSv1_3 (GH-26700)
Christian Heimes [Sun, 13 Jun 2021 11:46:07 +0000 (13:46 +0200)] 
bpo-44389: Fix deprecation of OP_NO_TLSv1_3 (GH-26700)

Signed-off-by: Christian Heimes <christian@python.org>
4 years agoFix a potential reference-counting bug in long_pow (GH-26690)
Mark Dickinson [Sun, 13 Jun 2021 07:19:29 +0000 (08:19 +0100)] 
Fix a potential reference-counting bug in long_pow (GH-26690)

4 years agoFix typos in multiple files (GH-26689)
Binbin [Sun, 13 Jun 2021 02:47:44 +0000 (10:47 +0800)] 
Fix typos in multiple files (GH-26689)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
4 years agobpo-43425: Update test_c_parser not to use TempdirManager (GH-26693)
Dong-hee Na [Sat, 12 Jun 2021 22:07:24 +0000 (07:07 +0900)] 
bpo-43425: Update test_c_parser not to use TempdirManager (GH-26693)

4 years agobpo-44389: Remove duplicate SSL_OP_NO_TLSv1_2 flag (GH-26680)
Erlend Egeberg Aasland [Sat, 12 Jun 2021 20:17:58 +0000 (22:17 +0200)] 
bpo-44389: Remove duplicate SSL_OP_NO_TLSv1_2 flag (GH-26680)

4 years agobpo-44396: Update multi-line-start location when reallocating tokenizer buffers ...
Pablo Galindo [Sat, 12 Jun 2021 17:53:49 +0000 (18:53 +0100)] 
bpo-44396: Update multi-line-start location when reallocating tokenizer buffers (GH-26676)

Automerge-Triggered-By: GH:pablogsal
4 years agobpo-44376 - reduce pow() overhead for small exponents (GH-26662)
Tim Peters [Sat, 12 Jun 2021 16:29:56 +0000 (11:29 -0500)] 
bpo-44376 - reduce pow() overhead for small exponents (GH-26662)

Greatly reduce pow() overhead for small exponents.

4 years agoAdd more const modifiers. (GH-26691)
Serhiy Storchaka [Sat, 12 Jun 2021 13:11:59 +0000 (16:11 +0300)] 
Add more const modifiers. (GH-26691)

4 years agobpo-43475: Fix the Python implementation of hash of Decimal NaN (GH-26679)
Serhiy Storchaka [Sat, 12 Jun 2021 12:15:17 +0000 (15:15 +0300)] 
bpo-43475: Fix the Python implementation of hash of Decimal NaN (GH-26679)

4 years agobpo-44339: Fix math.pow corner case to comply with IEEE 754 (GH-26606)
Mark Dickinson [Sat, 12 Jun 2021 09:23:02 +0000 (10:23 +0100)] 
bpo-44339: Fix math.pow corner case to comply with IEEE 754 (GH-26606)

Change the behaviour of `math.pow(0.0, -math.inf)` and `math.pow(-0.0, -math.inf)` to return positive infinity instead of raising `ValueError`. This makes `math.pow` consistent with the built-in `pow` (and the `**` operator) for this particular special case, and brings the `math.pow` special-case handling into compliance with IEEE 754.

4 years agobpo-40128: Fix IDLE autocomplete on macOS (GH-26672)
Kaustubh J [Fri, 11 Jun 2021 22:55:32 +0000 (04:25 +0530)] 
bpo-40128: Fix IDLE autocomplete on macOS (GH-26672)

In particular, when running with tk8.6.8, as in PSF 3.9.

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
4 years agobpo-44381: Windows build now allows enabling control flow guard (GH-26645)
Steve Dower [Fri, 11 Jun 2021 20:35:40 +0000 (21:35 +0100)] 
bpo-44381: Windows build now allows enabling control flow guard (GH-26645)

4 years agobpo-43318: Fix a bug where pdb does not always echo cleared breakpoints (GH-24646)
huzhaojie [Fri, 11 Jun 2021 15:17:56 +0000 (23:17 +0800)] 
bpo-43318: Fix a bug where pdb does not always echo cleared breakpoints (GH-24646)

4 years agobpo-44351: Restore back parse_makefile in distutils.sysconfig (GH-26637)
Lumír 'Frenzy' Balhar [Fri, 11 Jun 2021 15:08:00 +0000 (17:08 +0200)] 
bpo-44351: Restore back parse_makefile in distutils.sysconfig (GH-26637)

The function uses distutils.text_file.TextFile and therefore
behaves differently than _parse_makefile in sysconfig.

4 years agobpo-44242: [Enum] improve error messages (GH-26669)
Ethan Furman [Fri, 11 Jun 2021 09:44:43 +0000 (02:44 -0700)] 
bpo-44242: [Enum] improve error messages (GH-26669)

4 years agobpo-44378: Fix a compiler warning in Py_IS_TYPE() (GH-26644)
Victor Stinner [Fri, 11 Jun 2021 08:35:36 +0000 (10:35 +0200)] 
bpo-44378: Fix a compiler warning in Py_IS_TYPE() (GH-26644)

Py_IS_TYPE() no longer uses Py_TYPE() to avoid a compiler warning:
no longer cast "const PyObject*" to "PyObject*".

4 years agobpo-44342: [Enum] fix data type search (GH-26667)
Ethan Furman [Fri, 11 Jun 2021 08:25:14 +0000 (01:25 -0700)] 
bpo-44342: [Enum] fix data type search (GH-26667)

In an inheritance chain of

  int -> my_int -> final_int

the data type is now final_int (not my_int)

4 years agobpo-44362: ssl: improve deprecation warnings and docs (GH-26646)
Christian Heimes [Fri, 11 Jun 2021 07:15:48 +0000 (09:15 +0200)] 
bpo-44362: ssl: improve deprecation warnings and docs (GH-26646)

Signed-off-by: Christian Heimes <christian@python.org>
4 years agoDoc: Prettier exception hierarchy. (GH-26533)
Julien Palard [Fri, 11 Jun 2021 06:53:52 +0000 (08:53 +0200)] 
Doc: Prettier exception hierarchy. (GH-26533)

4 years agobpo-44342: [Enum] changed pickling from by-value to by-name (GH-26658)
Ethan Furman [Thu, 10 Jun 2021 22:52:09 +0000 (15:52 -0700)] 
bpo-44342: [Enum] changed pickling from by-value to by-name (GH-26658)

by-value lookups could fail on complex enums, necessitating a check for
__reduce__ and possibly sabotaging the final enum;

by-name lookups should never fail, and sabotaging is no longer necessary
for class-based enum creation.

4 years agobpo-44368: Improve syntax errors with invalid as pattern targets (GH-26632)
Pablo Galindo [Thu, 10 Jun 2021 22:50:32 +0000 (23:50 +0100)] 
bpo-44368: Improve syntax errors with invalid as pattern targets (GH-26632)

4 years agobpo-44385: Remove unused grammar rules (GH-26655)
Lysandros Nikolaou [Thu, 10 Jun 2021 22:05:06 +0000 (00:05 +0200)] 
bpo-44385: Remove unused grammar rules (GH-26655)

Automerge-Triggered-By: GH:lysnikolaou
4 years agobpo-37022: Fix bug where pdb's do_p/do_pp commands swallow exceptions from repr ...
Daniel Hahler [Thu, 10 Jun 2021 20:32:04 +0000 (22:32 +0200)] 
bpo-37022: Fix bug where pdb's do_p/do_pp commands swallow exceptions from repr (GH-18180)

4 years agobpo-44356: [Enum] allow multiple data-type mixins if they are all the same (GH-26649)
Ethan Furman [Thu, 10 Jun 2021 20:30:41 +0000 (13:30 -0700)] 
bpo-44356: [Enum] allow multiple data-type mixins if they are all the same (GH-26649)

This enables, for example, two base Enums to both inherit from `str`, and then both be mixed into the same final Enum:

    class Str1Enum(str, Enum):
        # some behavior here

    class Str2Enum(str, Enum):
        # some more behavior here

    class FinalStrEnum(Str1Enum, Str2Enum):
        # this now works

4 years agobpo-33962: Use ttk spinbox for IDLE indent space config (GH-22954)
Mark Roseman [Thu, 10 Jun 2021 19:13:55 +0000 (12:13 -0700)] 
bpo-33962: Use ttk spinbox for IDLE indent space config (GH-22954)

If ttk.Spinbox is not available (Tk < 8.5.9) use readonly ttk.Combobox.

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
4 years agoRun address sanitiser in the GitHub CI (GH-26640)
Pablo Galindo [Thu, 10 Jun 2021 17:47:53 +0000 (18:47 +0100)] 
Run address sanitiser in the GitHub CI (GH-26640)

4 years agobpo-44357:Add `math.cbrt()` function: Cube Root (GH-26622)
Ajith Ramachandran [Thu, 10 Jun 2021 16:42:09 +0000 (22:12 +0530)] 
bpo-44357:Add `math.cbrt()` function: Cube Root (GH-26622)

* Add math.cbrt() function: Cube Root

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Mark Dickinson <dickinsm@gmail.com>
4 years agobpo-44364:Add non integral tests for `sqrt()` (#26625)
Ajith Ramachandran [Thu, 10 Jun 2021 16:27:26 +0000 (21:57 +0530)] 
bpo-44364:Add non integral tests for `sqrt()` (#26625)

* Add non integral tests for `sqrt()`

Co-authored-by: Mark Dickinson <dickinsm@gmail.com>
4 years agobpo-44363: Get test_capi passing with address sanitizer (GH-26639)
Mark Shannon [Thu, 10 Jun 2021 11:37:22 +0000 (12:37 +0100)] 
bpo-44363: Get test_capi passing with address sanitizer (GH-26639)

4 years agobpo-44348: Move trace-info to thread-state (GH-26623)
Mark Shannon [Thu, 10 Jun 2021 07:46:59 +0000 (08:46 +0100)] 
bpo-44348: Move trace-info to thread-state (GH-26623)

* Move trace-info to thread state.

* Correct output for pdb when turning on tracing in middle of line

4 years agobpo-44337: Port LOAD_ATTR to PEP 659 adaptive interpreter (GH-26595)
Mark Shannon [Thu, 10 Jun 2021 07:46:01 +0000 (08:46 +0100)] 
bpo-44337: Port LOAD_ATTR to PEP 659 adaptive interpreter (GH-26595)

* Specialize LOAD_ATTR with  LOAD_ATTR_SLOT and LOAD_ATTR_SPLIT_KEYS

* Move dict-common.h to internal/pycore_dict.h

* Add LOAD_ATTR_WITH_HINT specialized opcode.

* Quicken in function if loopy

* Specialize LOAD_ATTR for module attributes.

* Add specialization stats

4 years agobpo-35800: Remove smtpd.MailmanProxy since 3.11 (GH-26617)
Dong-hee Na [Wed, 9 Jun 2021 23:12:41 +0000 (08:12 +0900)] 
bpo-35800: Remove smtpd.MailmanProxy since 3.11 (GH-26617)

4 years agobpo-44368: Ensure we don't raise incorrect custom syntax errors with soft keywords...
Pablo Galindo [Wed, 9 Jun 2021 21:20:01 +0000 (22:20 +0100)] 
bpo-44368: Ensure we don't raise incorrect custom syntax errors with soft keywords (GH-26630)

4 years ago bpo-21760: fix __file__ description (GH-19097)
Furkan Onder [Wed, 9 Jun 2021 21:10:20 +0000 (00:10 +0300)] 
 bpo-21760: fix __file__ description (GH-19097)

4 years agobpo-40468: Split IDLE settings General tab (GH-26621)
Terry Jan Reedy [Wed, 9 Jun 2021 20:17:58 +0000 (16:17 -0400)] 
bpo-40468: Split IDLE settings General tab (GH-26621)

Replace it with Windows tab for Shell and Editor options
and Shell/Ed for options exclusive to one of them.

Create room for more options and make dialog shorter,
to better fit small windows.

4 years agobpo-43693: Do not check co_cell2arg if a non-cell offset. (gh-26626)
Eric Snow [Wed, 9 Jun 2021 17:40:49 +0000 (11:40 -0600)] 
bpo-43693: Do not check co_cell2arg if a non-cell offset. (gh-26626)

This is the same fix as for PyFrame_LocalsToFast() in gh-26609, but applied to PyFrame_FastToLocalsWithError(). (It should have been in that PR.)

https://bugs.python.org/issue43693

4 years agobpo-44242: [Enum] remove missing bits test from Flag creation (GH-26586)
Ethan Furman [Wed, 9 Jun 2021 16:03:55 +0000 (09:03 -0700)] 
bpo-44242: [Enum] remove missing bits test from Flag creation (GH-26586)

Move the check for missing named flags in flag aliases from Flag creation
to a new *verify* decorator.

4 years agoDelete line that was accidentally copied. (GH-26624)
Mark Shannon [Wed, 9 Jun 2021 14:55:35 +0000 (15:55 +0100)] 
Delete line that was accidentally copied. (GH-26624)

4 years agobpo-44345: Fix 'generated by' comment in parser.c (GH-26615)
Akira Nonaka [Wed, 9 Jun 2021 14:38:53 +0000 (23:38 +0900)] 
bpo-44345: Fix 'generated by' comment in parser.c (GH-26615)

4 years ago bpo-40468: Factor out class ExtPage in idlelib.configdialog (GH-26618)
Terry Jan Reedy [Wed, 9 Jun 2021 01:43:49 +0000 (21:43 -0400)] 
 bpo-40468: Factor out class ExtPage in idlelib.configdialog (GH-26618)

4 years agobpo-44349: Fix edge case when displaying text from files with encoding in syntax...
Pablo Galindo [Tue, 8 Jun 2021 23:54:29 +0000 (00:54 +0100)] 
bpo-44349: Fix edge case when displaying text from files with encoding in syntax errors (GH-26611)

4 years agobpo-43833: Emit warnings for numeric literals followed by keyword (GH-25466)
Serhiy Storchaka [Tue, 8 Jun 2021 23:31:10 +0000 (02:31 +0300)] 
bpo-43833: Emit warnings for numeric literals followed by keyword (GH-25466)

Emit a deprecation warning if the numeric literal is immediately followed by
one of keywords: and, else, for, if, in, is, or. Raise a syntax error with
more informative message if it is immediately followed by other keyword or
identifier.

Automerge-Triggered-By: GH:pablogsal
4 years ago bpo-43693: Un-revert commit f3fa63e. (#26609)
Eric Snow [Tue, 8 Jun 2021 22:01:34 +0000 (16:01 -0600)] 
 bpo-43693: Un-revert commit f3fa63e. (#26609)

This was reverted in GH-26596 (commit 6d518bb) due to some bad memory accesses.

* Add the MAKE_CELL opcode. (gh-26396)

The memory accesses have been fixed.

https://bugs.python.org/issue43693

4 years agobpo-40468: Move IDLE helplist settings to extensions page of dialog. (GH-26593)
Terry Jan Reedy [Tue, 8 Jun 2021 19:35:10 +0000 (15:35 -0400)] 
bpo-40468: Move IDLE helplist settings to extensions page of dialog. (GH-26593)

These are the settings that extend the help menu.  Moving them shortens the dialog and will help with it being too tall for small screens.

4 years agobpo-44335: Ensure the tokenizer doesn't go into Python with the error set (GH-26608)
Pablo Galindo [Tue, 8 Jun 2021 19:02:03 +0000 (20:02 +0100)] 
bpo-44335: Ensure the tokenizer doesn't go into Python with the error set (GH-26608)

4 years agobpo-11105: document the new test.support.infinite_recursion context manager (GH-26604)
Batuhan Taskaya [Tue, 8 Jun 2021 17:39:03 +0000 (20:39 +0300)] 
bpo-11105: document the new test.support.infinite_recursion context manager (GH-26604)

4 years agobpo-11105: reduce the recursion limit for tests (GH-26550)
Batuhan Taskaya [Tue, 8 Jun 2021 16:55:10 +0000 (19:55 +0300)] 
bpo-11105: reduce the recursion limit for tests (GH-26550)

4 years agobpo-43795: Note Stable ABI PEP in What's New (GH-26479)
Petr Viktorin [Tue, 8 Jun 2021 15:20:07 +0000 (17:20 +0200)] 
bpo-43795: Note Stable ABI PEP in What's New (GH-26479)

Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
4 years agobpo-44329: Refactor sqlite3 statement creation (GH-26566)
Erlend Egeberg Aasland [Tue, 8 Jun 2021 15:00:56 +0000 (17:00 +0200)] 
bpo-44329: Refactor sqlite3 statement creation (GH-26566)

Call SQLite API's first, and return early in case of error. At the end,
allocate the object and initialise members. We now avoid unneeded
alloc/dealloc's in case the statement creation fails.

4 years agoRevert "bpo-43693: Add the MAKE_CELL opcode and interleave fast locals offsets. ...
Pablo Galindo [Tue, 8 Jun 2021 12:17:55 +0000 (13:17 +0100)] 
Revert "bpo-43693: Add the MAKE_CELL opcode and interleave fast locals offsets. (gh-26396)" (GH-26597)

This reverts commit 631f9938b1604d4f893417ec339b9e0fa9196fb1.

4 years agoFix compiler errors for unused variables (GH-26601)
Pablo Galindo [Tue, 8 Jun 2021 12:16:24 +0000 (13:16 +0100)] 
Fix compiler errors for unused variables (GH-26601)

4 years agobpo-44335: Fix a regression when identifying invalid characters in syntax errors...
Pablo Galindo [Tue, 8 Jun 2021 11:25:22 +0000 (12:25 +0100)] 
bpo-44335: Fix a regression when identifying invalid characters in syntax errors (GH-26589)

4 years agobpo-44348: Revert "bpo-39573: Py_TYPE becomes a static inline function (GH-26493...
Pablo Galindo [Tue, 8 Jun 2021 11:24:40 +0000 (12:24 +0100)] 
bpo-44348: Revert "bpo-39573: Py_TYPE becomes a static inline function (GH-26493)" (GH-26596)

This reverts commit f3fa63ec75fdbb4a08a10957a5c631bf0c4a5970 as is
causing crashes in some Windows tests in the buildbots.

4 years agoUse `from` imports (GH-26594)
Machinexa2 [Tue, 8 Jun 2021 09:47:15 +0000 (15:32 +0545)] 
Use `from` imports (GH-26594)

from imports

4 years agobpo-42238: Doc CI: Disable suspicious checks. (GH-26575)
Julien Palard [Tue, 8 Jun 2021 07:22:58 +0000 (09:22 +0200)] 
bpo-42238: Doc CI: Disable suspicious checks. (GH-26575)

They are slow and raise too many false positive, I'm in the slow
process to try to change this.

4 years agofix: use unambiguous punction in 'invalid escape sequence' message (GH-26582) 26592/head
Ned Batchelder [Tue, 8 Jun 2021 00:15:46 +0000 (20:15 -0400)] 
fix: use unambiguous punction in 'invalid escape sequence' message (GH-26582)

4 years agobpo-43693: Silence some compiler warnings. (gh-26588)
Eric Snow [Mon, 7 Jun 2021 23:58:38 +0000 (17:58 -0600)] 
bpo-43693: Silence some compiler warnings. (gh-26588)

The plan is to eventually make PyCodeObject opaque in the public C-API, with the full struct moved to Include/internal/pycore_code.h. _PyLocalsPlusKinds and _PyLocalsPlusKind started off there but were needed on PyCodeObject, hence the duplication. This led to warnings with some compilers. (Apparently it does not trigger a warning on my install of GCC.)

This change eliminates the superfluous typedef.

https://bugs.python.org/issue43693

4 years agobpo-43693: Add the MAKE_CELL opcode and interleave fast locals offsets. (gh-26396)
Eric Snow [Mon, 7 Jun 2021 22:52:00 +0000 (16:52 -0600)] 
bpo-43693: Add the MAKE_CELL opcode and interleave fast locals offsets. (gh-26396)

This moves logic out of the frame initialization code and into the compiler and eval loop.  Doing so simplifies the runtime code and allows us to optimize it better.

https://bugs.python.org/issue43693

4 years agoUse absolute imports in IDLE tests (GH-26581)
Terry Jan Reedy [Mon, 7 Jun 2021 21:56:34 +0000 (17:56 -0400)] 
Use absolute imports in IDLE tests (GH-26581)

Relative imports do not work when running test_x as main.

4 years agobpo-41299: Reduce lag in Windows threading timeouts by using a higher precision time...
Ryan Hileman [Mon, 7 Jun 2021 20:26:02 +0000 (13:26 -0700)] 
bpo-41299: Reduce lag in Windows threading timeouts by using a higher precision time source (GH-26568)

4 years agobpo-43693: Un-revert commits 2c1e258 and b2bf2bc. (gh-26577)
Eric Snow [Mon, 7 Jun 2021 18:22:26 +0000 (12:22 -0600)] 
bpo-43693: Un-revert commits 2c1e258 and b2bf2bc. (gh-26577)

These were reverted in gh-26530 (commit 17c4edc) due to refleaks.

2c1e258 - Compute deref offsets in compiler (gh-25152)
b2bf2bc - Add new internal code objects fields: co_fastlocalnames and co_fastlocalkinds. (gh-26388)

This change fixes the refleaks.

https://bugs.python.org/issue43693

4 years agobpo-44187: Quickening infrastructure (GH-26264)
Mark Shannon [Mon, 7 Jun 2021 17:38:06 +0000 (18:38 +0100)] 
bpo-44187: Quickening infrastructure (GH-26264)

* Add co_firstinstr field to code object.

* Implement barebones quickening.

* Use non-quickened bytecode when tracing.

* Add NEWS item

* Add new file to Windows build.

* Don't specialize instructions with EXTENDED_ARG.

4 years agobpo-44258: support PEP 515 for Fraction's initialization from string (GH-26422)
Sergey B Kirpichev [Mon, 7 Jun 2021 07:06:33 +0000 (10:06 +0300)] 
bpo-44258: support PEP 515 for Fraction's initialization from string (GH-26422)

* bpo-44258: support PEP 515 for Fraction's initialization from string

* regexps's version

* A different regexps version, which doesn't suffer from catastrophic backtracking

* revert denom -> den

* strip "_" from the decimal str, add few tests

* drop redundant tests

* Add versionchanged & whatsnew entry

* Amend Fraction constructor docs

* Change .. versionchanged:...

4 years agobpo-37449: ensurepip uses importlib.resources.files() traversable APIs (#22659)
wim glenn [Mon, 7 Jun 2021 02:14:47 +0000 (21:14 -0500)] 
bpo-37449: ensurepip uses importlib.resources.files() traversable APIs (#22659)

* `ensurepip` now uses `importlib.resources.files()` traversable APIs

* Update Lib/ensurepip/__init__.py

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
* Update Misc/NEWS.d/next/Library/2020-10-11-20-23-48.bpo-37449.f-t3V6.rst

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
4 years agobpo-44322: Document more SyntaxError details. (GH-26562)
Terry Jan Reedy [Mon, 7 Jun 2021 01:42:31 +0000 (21:42 -0400)] 
bpo-44322: Document more SyntaxError details. (GH-26562)

1. SyntaxError args have a tuple of other attributes.
2. Attributes are adjusted for errors in f-string field expressions.
3. Compile() can raise SyntaxErrors.

4 years agobpo-44326: Remove unused members from pysqlite_Statement (GH-26564)
Erlend Egeberg Aasland [Sun, 6 Jun 2021 22:12:07 +0000 (00:12 +0200)] 
bpo-44326: Remove unused members from pysqlite_Statement (GH-26564)

* Remove unused db member of pysqlite_Statement

* Remove unused sql method from statement object

4 years agobpo-44327: Remove unused members from pysqlite_Connection (GH-26565)
Erlend Egeberg Aasland [Sun, 6 Jun 2021 22:11:44 +0000 (00:11 +0200)] 
bpo-44327: Remove unused members from pysqlite_Connection (GH-26565)

* Remove timeout_started

* Remove timeout member

4 years agoUpdate bisect docstrings (GH-26548)
hrchu [Sun, 6 Jun 2021 18:22:48 +0000 (02:22 +0800)] 
Update bisect docstrings (GH-26548)

4 years agobpo-44320: Fix markup for W3C C14N test suite (GH-26556)
NAKAMURA Osamu [Sun, 6 Jun 2021 02:34:10 +0000 (11:34 +0900)] 
bpo-44320: Fix markup for W3C C14N test suite (GH-26556)

4 years agobpo-44304: Ensure the sqlite3 destructor callback is always called with the GIL held...
Pablo Galindo [Sat, 5 Jun 2021 22:41:11 +0000 (23:41 +0100)] 
bpo-44304: Ensure the sqlite3 destructor callback is always called with the GIL held (GH-26551)

4 years agobpo-44304: Fix crash in the sqlite3 module when the GC clears Statement objects ...
Pablo Galindo [Sat, 5 Jun 2021 02:50:39 +0000 (03:50 +0100)] 
bpo-44304: Fix crash in the sqlite3 module when the GC clears Statement objects (GH-26545)

4 years agobpo-38323: Skip SubprocessMultiLoopWatcherTest as they can hang the test suite (GH...
Pablo Galindo [Fri, 4 Jun 2021 23:33:20 +0000 (00:33 +0100)] 
bpo-38323: Skip SubprocessMultiLoopWatcherTest as they can hang the test suite (GH-26542)

4 years agoUpdate nonstandard variable names (GH-26540)
Raymond Hettinger [Fri, 4 Jun 2021 23:28:31 +0000 (16:28 -0700)] 
Update nonstandard variable names (GH-26540)

4 years agobpo-44279: revert 'exceptions are raised' back to 'exceptions occur' (GH-26492)
Irit Katriel [Fri, 4 Jun 2021 22:07:57 +0000 (23:07 +0100)] 
bpo-44279: revert 'exceptions are raised' back to 'exceptions occur' (GH-26492)

4 years agoAlign comment for better readability. (GH-26192)
Kazantcev Andrey [Fri, 4 Jun 2021 21:41:23 +0000 (00:41 +0300)] 
Align comment for better readability. (GH-26192)

4 years agobpo-44315: Remove unused connection argument from pysqlite_step() (GH-26535)
Erlend Egeberg Aasland [Fri, 4 Jun 2021 20:42:20 +0000 (22:42 +0200)] 
bpo-44315: Remove unused connection argument from pysqlite_step() (GH-26535)

4 years agobpo-43853: Handle sqlite3_value_text() errors (GH-25422)
Erlend Egeberg Aasland [Fri, 4 Jun 2021 18:34:00 +0000 (20:34 +0200)] 
bpo-43853: Handle sqlite3_value_text() errors (GH-25422)

4 years agobpo-44041: Add test for sqlite3 column count (GH-25907)
Erlend Egeberg Aasland [Fri, 4 Jun 2021 17:36:08 +0000 (19:36 +0200)] 
bpo-44041: Add test for sqlite3 column count (GH-25907)

4 years agobpo-43693: Revert commits 2c1e2583fdc4db6b43d163239ea42b0e8394171f and b2bf2bc1ece673...
Pablo Galindo [Fri, 4 Jun 2021 16:51:05 +0000 (17:51 +0100)] 
bpo-43693: Revert commits 2c1e2583fdc4db6b43d163239ea42b0e8394171f and b2bf2bc1ece673d387341e06c8d3c2bc6e259747  (GH-26530)

* Revert "bpo-43693: Compute deref offsets in compiler (gh-25152)"

This reverts commit b2bf2bc1ece673d387341e06c8d3c2bc6e259747.

* Revert "bpo-43693: Add new internal code objects fields: co_fastlocalnames and co_fastlocalkinds. (gh-26388)"

This reverts commit 2c1e2583fdc4db6b43d163239ea42b0e8394171f.

These two commits are breaking the refleak buildbots.

4 years agobpo-44048: Fix two hashlib test cases under FIPS mode (GH-26470)
stratakis [Fri, 4 Jun 2021 16:47:59 +0000 (18:47 +0200)] 
bpo-44048: Fix two hashlib test cases under FIPS mode (GH-26470)

test_disallow_instantiation and test_readonly_types try to test all the available
digests, however under FIPS mode, while the algorithms are available, trying to use
them will fail with a ValueError.

4 years agoRemoving myself from ssl code ownership (GH-26529)
Christian Heimes [Fri, 4 Jun 2021 13:01:31 +0000 (15:01 +0200)] 
Removing myself from ssl code ownership (GH-26529)

I'm taking a break.

Signed-off-by: Christian Heimes <christian@python.org>