]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
4 years agobpo-27313: Use non-deprecated methods for tracing (GH-29425)
Serhiy Storchaka [Sat, 6 Nov 2021 19:01:39 +0000 (21:01 +0200)] 
bpo-27313: Use non-deprecated methods for tracing (GH-29425)

4 years agobpo-39452: [doc] Change "must" to "can" on relative import style in `__main__` (GH...
Andre Delfino [Sat, 6 Nov 2021 18:09:23 +0000 (15:09 -0300)] 
bpo-39452: [doc] Change "must" to "can" on relative import style in `__main__` (GH-29379)

4 years ago[doc] bpo-45680: Improve glossary entry for generic types (GH-29388)
Alex Waygood [Sat, 6 Nov 2021 18:00:45 +0000 (18:00 +0000)] 
[doc] bpo-45680: Improve glossary entry for generic types (GH-29388)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
4 years ago[doc] minor fixes to expressions.rst (GH-29444)
Ethan Furman [Sat, 6 Nov 2021 17:26:43 +0000 (10:26 -0700)] 
[doc] minor fixes to expressions.rst (GH-29444)

4 years agobpo-45740: [Enum] add versionadded markers to docs (GH-29443)
Ethan Furman [Sat, 6 Nov 2021 17:16:43 +0000 (10:16 -0700)] 
bpo-45740: [Enum] add versionadded markers to docs (GH-29443)

[Enum] add versionadded markers to docs

4 years agobpo-45644: Make json.tool read infile before writing to outfile (GH-29273)
Chris Wesseling [Sat, 6 Nov 2021 17:11:35 +0000 (18:11 +0100)] 
bpo-45644:  Make json.tool read infile before writing to outfile (GH-29273)

so that

$ python -m json.tool foo.json foo.json

doesn't result in an empty foo.json.

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
4 years agobpo-45731: Handle --enable-loadable-sqlite-extensions in configure (GH-29434)
Christian Heimes [Sat, 6 Nov 2021 09:30:37 +0000 (11:30 +0200)] 
bpo-45731: Handle --enable-loadable-sqlite-extensions in configure (GH-29434)

4 years agobpo-45720: Drop references to shlwapi.dll on Windows (GH-29417)
Steve Dower [Fri, 5 Nov 2021 23:06:45 +0000 (23:06 +0000)] 
bpo-45720: Drop references to shlwapi.dll on Windows (GH-29417)

4 years agoPost 3.11.0a2
Pablo Galindo [Fri, 5 Nov 2021 21:29:33 +0000 (21:29 +0000)] 
Post 3.11.0a2

4 years agoMerge tag 'v3.11.0a2'
Pablo Galindo [Fri, 5 Nov 2021 21:29:23 +0000 (21:29 +0000)] 
Merge tag 'v3.11.0a2'

Python 3.11.0a2

4 years agobpo-43158: Regenerate configure again (GH-29433)
Christian Heimes [Fri, 5 Nov 2021 20:51:26 +0000 (22:51 +0200)] 
bpo-43158: Regenerate configure again (GH-29433)

4 years agobpo-45679: add `tuple` tests with `lru_cache` to `test_functools` (GH-29339)
Nikita Sobolev [Fri, 5 Nov 2021 19:52:46 +0000 (22:52 +0300)] 
bpo-45679: add `tuple` tests with `lru_cache` to `test_functools` (GH-29339)

4 years agoPython 3.11.0a2 v3.11.0a2
Pablo Galindo [Fri, 5 Nov 2021 19:02:44 +0000 (19:02 +0000)] 
Python 3.11.0a2

4 years agobpo-45243: Use connection limits to simplify `sqlite3` tests (GH-29356)
Erlend Egeberg Aasland [Fri, 5 Nov 2021 17:19:43 +0000 (18:19 +0100)] 
bpo-45243: Use connection limits to simplify `sqlite3` tests (GH-29356)

4 years agobpo-45762: Improve docs for ``@singledispatch``/``@singledispatchmethod`` (GH-29426)
Alex Waygood [Fri, 5 Nov 2021 16:25:08 +0000 (16:25 +0000)] 
bpo-45762: Improve docs for ``@singledispatch``/``@singledispatchmethod`` (GH-29426)

4 years agobpo-45716: Improve the error message when using True/False/None as keywords in a...
Pablo Galindo Salgado [Fri, 5 Nov 2021 13:54:55 +0000 (13:54 +0000)] 
bpo-45716: Improve the error message when using True/False/None as keywords in a call (GH-29413)

4 years agobpo-45678: Add more ``singledispatchmethod`` tests (GH-29412)
Alex Waygood [Fri, 5 Nov 2021 10:06:18 +0000 (10:06 +0000)] 
bpo-45678: Add more ``singledispatchmethod`` tests (GH-29412)

In order to fix a bug in the 3.9 branch in #29394, more tests were added to
``test_functools.py`` to ensure that ``singledispatchmethod`` still correctly
wrapped a target method, even if the target method had already been wrapped by
 multiple other decorators. This PR brings the new tests into the 3.11 and 3.10
branches as well.

4 years agobpo-45292: [PEP 654] Update traceback display code to work with exception groups...
Irit Katriel [Fri, 5 Nov 2021 09:39:18 +0000 (09:39 +0000)] 
bpo-45292: [PEP 654] Update traceback display code to work with exception groups (GH-29207)

4 years agobpo-27313: Fix ttk_guionly tests failing on Framework builds on macOS (GH-29411)
Łukasz Langa [Fri, 5 Nov 2021 08:53:13 +0000 (09:53 +0100)] 
bpo-27313: Fix ttk_guionly tests failing on Framework builds on macOS (GH-29411)

4 years agobpo-45160: Fix refleak in test_ttk_guionly introduced in GH-28291 (GH-29416)
Łukasz Langa [Fri, 5 Nov 2021 08:51:31 +0000 (09:51 +0100)] 
bpo-45160: Fix refleak in test_ttk_guionly introduced in GH-28291 (GH-29416)

4 years agoAdd generated artifacts in Mac/ to .gitignore; update copyright (GH-29408)
Łukasz Langa [Thu, 4 Nov 2021 19:09:46 +0000 (20:09 +0100)] 
Add generated artifacts in Mac/ to .gitignore; update copyright (GH-29408)

4 years agobpo-45220: Remove invalid include from resource definition files on Windows (GH-29396)
Steve Dower [Thu, 4 Nov 2021 16:39:36 +0000 (16:39 +0000)] 
bpo-45220: Remove invalid include from resource definition files on Windows (GH-29396)

4 years agobpo-43652: Actually update to Tcl/Tk 8.6.11 on Windows (GH-29397)
Steve Dower [Thu, 4 Nov 2021 16:39:07 +0000 (16:39 +0000)] 
bpo-43652: Actually update to Tcl/Tk 8.6.11 on Windows (GH-29397)

4 years agoRemove reference to ``Tuple`` at top of ``typing`` docs (GH-29401)
Alex Waygood [Thu, 4 Nov 2021 11:48:40 +0000 (11:48 +0000)] 
Remove reference to ``Tuple`` at top of ``typing`` docs (GH-29401)

``typing.Tuple`` has been deprecated since Python 3.9, so it makes no sense to mention it so prominently in the documentation for the ``typing`` module.

4 years agobpo-45697: Use PyObject_TypeCheck in type_call (GH-29392)
Itamar Ostricher [Thu, 4 Nov 2021 10:39:50 +0000 (03:39 -0700)] 
bpo-45697: Use PyObject_TypeCheck in type_call (GH-29392)

4 years agobpo-45680: ``typing`` docs: improve links to docs on ``GenericAlias``/``__class_getit...
Alex Waygood [Thu, 4 Nov 2021 04:06:34 +0000 (04:06 +0000)] 
bpo-45680: ``typing`` docs: improve links to docs on ``GenericAlias``/``__class_getitem__`` (GH-29387)

4 years agobpo-45613: Set `sqlite3.threadsafety` dynamically (GH-29227)
Erlend Egeberg Aasland [Wed, 3 Nov 2021 21:01:37 +0000 (22:01 +0100)] 
bpo-45613: Set `sqlite3.threadsafety` dynamically (GH-29227)

Use the compile-time selected default SQLite threaded mode to set the
DB-API 2.0 attribute 'threadsafety'

Mappings:
  - SQLITE_THREADSAFE=0 => threadsafety=0
  - SQLITE_THREADSAFE=1 => threadsafety=3
  - SQLITE_THREADSAFE=2 => threadsafety=1

4 years agobpo-44257: fix "assigment_expr" typo + regenerate the grammar, and remove unused...
wim glenn [Wed, 3 Nov 2021 20:57:40 +0000 (15:57 -0500)] 
bpo-44257: fix "assigment_expr" typo + regenerate the grammar, and remove unused imports (GH-29393)

Co-authored-by: Wim Glenn <wglenn@jumptrading.com>
4 years agobpo-45506: Stop skipping test_embed. (gh-29300)
Eric Snow [Wed, 3 Nov 2021 17:47:16 +0000 (11:47 -0600)] 
bpo-45506: Stop skipping test_embed. (gh-29300)

In gh-29063 I ended up disabling test_embed on non-Windows by accident. This gets it running again.

https://bugs.python.org/issue45506

4 years agobpo-45691: Make array of small ints static to fix use-after-free error. (GH-29366)
Mark Shannon [Wed, 3 Nov 2021 16:22:32 +0000 (16:22 +0000)] 
bpo-45691: Make array of small ints static to fix use-after-free error. (GH-29366)

4 years agobpo-45678: Add ``functools.singledispatchmethod`` tests (GH-29328)
Alex Waygood [Wed, 3 Nov 2021 16:12:02 +0000 (16:12 +0000)] 
bpo-45678: Add ``functools.singledispatchmethod`` tests (GH-29328)

4 years agobpo-45578: add tests for `dis.distb` (GH-29332)
Nikita Sobolev [Wed, 3 Nov 2021 13:55:42 +0000 (16:55 +0300)] 
bpo-45578: add tests for `dis.distb` (GH-29332)

4 years agobpo-24139: Fix test_sqlite3 `test_extended_error_code_on_exception()` on s390x RHEL...
Erlend Egeberg Aasland [Wed, 3 Nov 2021 09:35:42 +0000 (10:35 +0100)] 
bpo-24139: Fix test_sqlite3 `test_extended_error_code_on_exception()` on s390x RHEL buildbots (GH-29382)

4 years agobpo-24139: Add support for SQLite extended result codes (GH-28076)
Erlend Egeberg Aasland [Tue, 2 Nov 2021 23:49:38 +0000 (00:49 +0100)] 
bpo-24139: Add support for SQLite extended result codes (GH-28076)

4 years agobpo-45406: make inspect.getmodule() return None when getabsfile() raises FileNotFound...
Irit Katriel [Tue, 2 Nov 2021 21:55:51 +0000 (21:55 +0000)] 
bpo-45406: make inspect.getmodule() return None when getabsfile() raises FileNotFoundError (GH-28824)

4 years ago[doc] Link to section File input (GH-28941)
Andre Delfino [Tue, 2 Nov 2021 21:34:00 +0000 (18:34 -0300)] 
[doc] Link to section File input (GH-28941)

4 years agobpo-45457: Minor fix to documentation for SSLContext.load_default_certs. (GH-28947)
LincolnPuzey [Tue, 2 Nov 2021 21:27:44 +0000 (05:27 +0800)] 
bpo-45457: Minor fix to documentation for SSLContext.load_default_certs. (GH-28947)

Specify that SSLContext.set_default_verify_paths is called on ALL systems.

The code of SSLContext.load_default_certs was changed in bpo-22449 to do this,
this fix corrects the documentation to match that change.

4 years agobpo-44828: macOS installer: avoid leaving a zombie Save panel in Tk 8.6.12rc1 (GH...
Ned Deily [Tue, 2 Nov 2021 21:01:37 +0000 (17:01 -0400)] 
bpo-44828: macOS installer: avoid leaving a zombie Save panel in Tk 8.6.12rc1 (GH-29367)

4 years agomakefile: remove unused SGI_ABI variable (GH-29325)
Filipe Laíns [Tue, 2 Nov 2021 20:39:27 +0000 (20:39 +0000)] 
makefile: remove unused SGI_ABI variable (GH-29325)

SGI_ABI support was removed in [1] but this variable was never removed
from the makefile. Currently, it is just a bad variable that does not
get replaced by the configure script.

[1] https://github.com/python/cpython/pull/3294

Signed-off-by: Filipe Laíns <lains@riseup.net>
4 years agobpo-42064: Adapt `sqlite3` to multi-phase init (PEP 489) (GH-29234)
Erlend Egeberg Aasland [Tue, 2 Nov 2021 15:35:51 +0000 (16:35 +0100)] 
bpo-42064: Adapt `sqlite3` to multi-phase init (PEP 489) (GH-29234)

4 years agobpo-45633: Fix newtypes doc typo (GH-29318)
Dmitry Smirnov [Tue, 2 Nov 2021 14:47:06 +0000 (17:47 +0300)] 
bpo-45633: Fix newtypes doc typo (GH-29318)

4 years agobpo-43158: Use configure values for building _uuid extension (GH-29353)
Christian Heimes [Tue, 2 Nov 2021 11:25:13 +0000 (13:25 +0200)] 
bpo-43158: Use configure values for building _uuid extension (GH-29353)

4 years agobpo-45688: Add _scproxy to sys.stdlib_module_names (GH-29358)
Christian Heimes [Tue, 2 Nov 2021 11:08:40 +0000 (13:08 +0200)] 
bpo-45688: Add _scproxy to sys.stdlib_module_names (GH-29358)

4 years agoRemove Programs/_freeze_importlib (#29357)
Brandt Bucher [Tue, 2 Nov 2021 01:09:26 +0000 (18:09 -0700)] 
Remove Programs/_freeze_importlib (#29357)

4 years agobpo-45243: Add support for setting/getting `sqlite3` connection limits (GH-28463)
Erlend Egeberg Aasland [Mon, 1 Nov 2021 22:50:53 +0000 (23:50 +0100)] 
bpo-45243: Add support for setting/getting `sqlite3` connection limits (GH-28463)

4 years agoUpdate macOS installer to use Tk 8.6.12rc1 pre-release. (GH-29354)
Ned Deily [Mon, 1 Nov 2021 15:53:05 +0000 (11:53 -0400)] 
Update macOS installer to use Tk 8.6.12rc1 pre-release. (GH-29354)

4 years agobpo-45666: Use `%S` for MSVC and `%s` elsewhere for `swprintf` in `_testembed.c`...
Nikita Sobolev [Mon, 1 Nov 2021 12:11:34 +0000 (15:11 +0300)] 
bpo-45666: Use `%S` for MSVC and `%s` elsewhere for `swprintf` in `_testembed.c` (GH-29341)

Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
4 years agobpo-45668: Fix PGO tests without test extensions (GH-29315)
Christian Heimes [Mon, 1 Nov 2021 10:14:53 +0000 (12:14 +0200)] 
bpo-45668: Fix PGO tests without test extensions (GH-29315)

4 years agobpo-10572: Fixup Lib/test/libregrtest/pgo.py (GH-29327)
Erlend Egeberg Aasland [Mon, 1 Nov 2021 09:57:28 +0000 (10:57 +0100)] 
bpo-10572: Fixup Lib/test/libregrtest/pgo.py (GH-29327)

4 years agobpo-45618: Update Sphinx version used to build the documentation to 4.2.0 (GH-29256)
m-aciek [Sun, 31 Oct 2021 20:51:33 +0000 (21:51 +0100)] 
bpo-45618: Update Sphinx version used to build the documentation to 4.2.0 (GH-29256)

Updating version of Sphinx to most recent one, 4.2.0. Documentation builds without warnings.

Sphinx 4.2.0 release notes: https://www.sphinx-doc.org/en/master/changes.html#release-4-2-0-released-sep-12-2021.

cc @JulienPalard

Automerge-Triggered-By: GH:JulienPalard
4 years agoUpdated README with Python 3.11 release info (GH-29338)
Jacob Walls [Sun, 31 Oct 2021 19:53:08 +0000 (15:53 -0400)] 
Updated README with Python 3.11 release info (GH-29338)

4 years agoMove field width to the right field (GH-29344)
Olaf van der Spek [Sun, 31 Oct 2021 17:44:23 +0000 (18:44 +0100)] 
Move field width to the right field (GH-29344)

Automerge-Triggered-By: GH:vsajip
4 years agobpo-45516: fix Traversable.name documentation (GH-29194)
Filipe Laíns [Sun, 31 Oct 2021 14:57:21 +0000 (14:57 +0000)] 
bpo-45516: fix Traversable.name documentation (GH-29194)

Here we go again... Sorrry!

Signed-off-by: Filipe Laíns <lains@riseup.net>
Automerge-Triggered-By: GH:jaraco
4 years agobpo-45634: Don't combine error checks when adding `sqlite3` int constants (GH-29251)
Erlend Egeberg Aasland [Sun, 31 Oct 2021 10:01:19 +0000 (11:01 +0100)] 
bpo-45634: Don't combine error checks when adding `sqlite3` int constants (GH-29251)

4 years agobpo-45679: Fix caching of multi-value typing.Literal (GH-29334)
Serhiy Storchaka [Sun, 31 Oct 2021 08:22:16 +0000 (10:22 +0200)] 
bpo-45679: Fix caching of multi-value typing.Literal (GH-29334)

Literal[True, 2] is no longer equal to Literal[1, 2].

4 years agobpo-45666: fixes warning with `swprintf` and `%s` (GH-29307)
Nikita Sobolev [Sun, 31 Oct 2021 02:13:54 +0000 (05:13 +0300)] 
bpo-45666: fixes warning with `swprintf` and `%s` (GH-29307)

4 years agoFix docs source link for importlib.metadata (GH-29025)
Philipp A [Sat, 30 Oct 2021 15:12:47 +0000 (17:12 +0200)] 
Fix docs source link for importlib.metadata (GH-29025)

The link broke for Python 3.10 since importlib.metadata was made from a module into a package

I think this is trivial enough to not need a bpo issue.

Automerge-Triggered-By: GH:jaraco
4 years agobpo-10572: Move `sqlite3` tests to `Lib/test` (GH-29304)
Erlend Egeberg Aasland [Fri, 29 Oct 2021 22:08:19 +0000 (00:08 +0200)] 
bpo-10572: Move `sqlite3` tests to `Lib/test` (GH-29304)

Automerge-Triggered-By: GH:brettcannon
4 years agobpo-45379: clarify FROZEN_EXCLUDED and FROZEN_INVALID documentation (GH-29189)
Filipe Laíns [Fri, 29 Oct 2021 20:55:14 +0000 (21:55 +0100)] 
bpo-45379: clarify FROZEN_EXCLUDED and FROZEN_INVALID documentation (GH-29189)

Signed-off-by: Filipe Laíns <lains@riseup.net>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
4 years agobpo-45581: Raise `MemoryError` in `sqlite3.connect` if SQLite signals memory error...
Erlend Egeberg Aasland [Fri, 29 Oct 2021 20:21:58 +0000 (22:21 +0200)] 
bpo-45581: Raise `MemoryError` in `sqlite3.connect` if SQLite signals memory error (GH-29171)

4 years agobpo-45600: Enhanced / clarified the docs for os.environ and os.environb (GH-29204)
andrei kulakov [Fri, 29 Oct 2021 20:18:45 +0000 (16:18 -0400)] 
bpo-45600: Enhanced / clarified the docs for os.environ and os.environb (GH-29204)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
4 years agobpo-45335: Add note to `sqlite3` docs about "timestamp" converter (GH-29200)
Ian Fisher [Fri, 29 Oct 2021 20:17:22 +0000 (16:17 -0400)] 
bpo-45335: Add note to `sqlite3` docs about "timestamp" converter (GH-29200)

4 years agobpo-45548: Some test modules must be built as shared libs (GH-29268)
Christian Heimes [Fri, 29 Oct 2021 15:49:57 +0000 (18:49 +0300)] 
bpo-45548: Some test modules must be built as shared libs (GH-29268)

Some test cases don't work when test modules are static extensions.

Add dependency on Modules/config.c to trigger a rebuild whenever a
module build type is changed.

``makesetup`` puts shared extensions into ``Modules/`` directory. Create
symlinks from pybuilddir so the extensions can be imported.

Note: It is not possible to use the content of pybuilddir.txt as a build
target. Makefile evaluates target variables in the first pass. The
pybuilddir.txt file does not exist at that point.

4 years agobpo-45655: Add ref to union type expressions at top of typing docs (GH-29309)
Alex Waygood [Fri, 29 Oct 2021 13:56:21 +0000 (14:56 +0100)] 
bpo-45655: Add ref to union type expressions at top of typing docs (GH-29309)

4 years agobpo-45628: Check all parts of the suffix for an extension match. (GH-29310)
Vinay Sajip [Fri, 29 Oct 2021 13:40:37 +0000 (14:40 +0100)] 
bpo-45628: Check all parts of the suffix for an extension match. (GH-29310)

4 years agobpo-45621: Small changes to mmap (GH-29247)
Tim Golden [Fri, 29 Oct 2021 08:20:21 +0000 (09:20 +0100)] 
bpo-45621: Small changes to mmap (GH-29247)

* Small tidy-ups / comments
* Use randomized names when testing tagged mmaps to avoid any risk of parallel tests treading on each others' toes

4 years agobpo-45395: Make custom frozen modules additions instead of replacements. (gh-28778)
Eric Snow [Thu, 28 Oct 2021 21:04:33 +0000 (15:04 -0600)] 
bpo-45395: Make custom frozen modules additions instead of replacements. (gh-28778)

Currently custom modules (the array set on PyImport_FrozenModules) replace all the frozen stdlib modules. That can be problematic and is unlikely to be what the user wants. This change treats the custom frozen modules as additions instead. They take precedence over all other frozen modules except for those needed to bootstrap the import system. If the "code" field of an entry in the custom array is NULL then that frozen module is treated as disabled, which allows a custom entry to disable a frozen stdlib module.

This change allows us to get rid of is_essential_frozen_module() and simplifies the logic for which frozen modules should be ignored.

https://bugs.python.org/issue45395

4 years agobpo-45577: test all pickle protocols in `test_zoneinfo` (GH-29167)
Nikita Sobolev [Thu, 28 Oct 2021 20:22:24 +0000 (23:22 +0300)] 
bpo-45577: test all pickle protocols in `test_zoneinfo` (GH-29167)

4 years agobpo-45379: add custom error string for FROZEN_DISABLED (GH-29190)
Filipe Laíns [Thu, 28 Oct 2021 20:20:07 +0000 (21:20 +0100)] 
bpo-45379: add custom error string for FROZEN_DISABLED (GH-29190)

Signed-off-by: Filipe Laíns <lains@riseup.net>
Co-authored-by: Gareth Rees <gdr@garethrees.org>
4 years agobpo-45624: make test_graphlib not depend on the iteration order of sets (GH-29233)
Carl Friedrich Bolz-Tereick [Thu, 28 Oct 2021 20:01:35 +0000 (22:01 +0200)] 
bpo-45624: make test_graphlib not depend on the iteration order of sets (GH-29233)

the current test depended on integer sets being iterated on in a certain
fixed order. That order is different on PyPy (insertion based) and could
change in CPython in the future in theory. Make the test robust against
a different iteration order by sorting.

4 years agobpo-45655: Add "relevant PEPs" section to ``typing`` documentation (GH-29280)
Alex Waygood [Thu, 28 Oct 2021 19:55:50 +0000 (20:55 +0100)] 
bpo-45655: Add "relevant PEPs" section to ``typing`` documentation (GH-29280)

The list of PEPs at the top of the documentation for the ``typing`` module has
become too long to be readable. This PR proposes presenting this
information in a more structured and readable way by adding a new "relevant
PEPs" section to the ``typing`` docs.

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
4 years agobpo-45612: Add sqlite3 module docstring (GH-29224)
Erlend Egeberg Aasland [Thu, 28 Oct 2021 19:55:27 +0000 (21:55 +0200)] 
bpo-45612: Add sqlite3 module docstring (GH-29224)

4 years agobpo-45583: Correct datamodel documentation of int() (GH-29182)
Arthur Milchior [Thu, 28 Oct 2021 19:48:37 +0000 (21:48 +0200)] 
bpo-45583: Correct datamodel documentation of int() (GH-29182)

It should be noted that this part of the documentation is redundant with
function.rst's documentation of int. This one was correctly updated with Python 3.8.

4 years agoFixed typos (GH-29211)
MalikIdreesHasanKhan [Thu, 28 Oct 2021 19:39:27 +0000 (01:09 +0530)] 
Fixed typos (GH-29211)

4 years agobpo-45604: add `level` argument to `multiprocessing.log_to_stderr` func (GH-29226)
Nikita Sobolev [Thu, 28 Oct 2021 19:38:14 +0000 (22:38 +0300)] 
bpo-45604: add `level` argument to `multiprocessing.log_to_stderr` func (GH-29226)

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
4 years agobpo-45608: Document missing `sqlite3` DB-API attributes and methods (GH-29219)
Erlend Egeberg Aasland [Thu, 28 Oct 2021 19:35:51 +0000 (21:35 +0200)] 
bpo-45608: Document missing `sqlite3` DB-API attributes and methods (GH-29219)

4 years agobpo-44828: Avoid tkinter file dialog failure on macOS 12 Monterey (GH-29276)
Ned Deily [Thu, 28 Oct 2021 18:22:05 +0000 (14:22 -0400)] 
bpo-44828: Avoid tkinter file dialog failure on macOS 12 Monterey (GH-29276)

when using the Tk 8.6.11 provided by python.org macOS installers.
Patch by Marc Culler of the Tk project.

4 years agobpo-45562: Ensure all tokenizer debug messages are printed to stderr (GH-29270)
Pablo Galindo Salgado [Thu, 28 Oct 2021 17:06:15 +0000 (18:06 +0100)] 
bpo-45562: Ensure all tokenizer debug messages are printed to stderr (GH-29270)

4 years agoStore actual ints, not pointers to them in the interpreter state. (GH-29274)
Mark Shannon [Thu, 28 Oct 2021 16:35:43 +0000 (17:35 +0100)] 
Store actual ints, not pointers to them in the interpreter state. (GH-29274)

4 years agobpo-45629: Add a test for the "freeze" tool. (gh-29222)
Eric Snow [Thu, 28 Oct 2021 16:14:37 +0000 (10:14 -0600)] 
bpo-45629: Add a test for the "freeze" tool. (gh-29222)

The "freeze" tool has been part of the repo for a long time. However, it hasn't had any tests in the test suite to guard against regressions. We add such a test here. This is especially important as there has been a lot of change recently related to frozen modules, with more to come.

Note that as part of the test we build Python out-of-tree and install it in a temp dir.

https://bugs.python.org/issue45629

4 years agobpo-45256: Rationalize code around Python-to-Python calls a bit. (GH-29235)
Mark Shannon [Thu, 28 Oct 2021 15:14:59 +0000 (16:14 +0100)] 
bpo-45256: Rationalize code around Python-to-Python calls a bit. (GH-29235)

4 years agobpo-44525: Add recursive checks for `CALL_FUNCTION_BUILTIN_O` (GH-29271)
Ken Jin [Thu, 28 Oct 2021 15:02:34 +0000 (23:02 +0800)] 
bpo-44525: Add recursive checks for `CALL_FUNCTION_BUILTIN_O` (GH-29271)

4 years agobpo-45637: Store the frame pointer in the cframe (GH-29267)
Mark Shannon [Thu, 28 Oct 2021 12:59:11 +0000 (13:59 +0100)] 
bpo-45637: Store the frame pointer in the cframe (GH-29267)

* Rename 'frame' to 'current_frame'

4 years agoFix typo in Counter documentation (GH-29223)
Justinas Petuchovas [Thu, 28 Oct 2021 10:43:09 +0000 (13:43 +0300)] 
Fix typo in Counter documentation (GH-29223)

Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
4 years agobpo-30570: Fix segfault on buildbots caused by stack overflow from recursion in tests...
Dennis Sweeney [Thu, 28 Oct 2021 10:11:18 +0000 (06:11 -0400)] 
bpo-30570: Fix segfault on buildbots caused by stack overflow from recursion in tests (GH-29258)

* Don't stackoveflow on debug builds

* Also catch the pickletester case

4 years agobpo-45548: Fix out-of-tree and Debian builds (GH-29263)
Christian Heimes [Thu, 28 Oct 2021 09:57:38 +0000 (12:57 +0300)] 
bpo-45548: Fix out-of-tree and Debian builds (GH-29263)

Add Modules subdirs to SRCDIRS to generate directories for out-of-tree
object files.

Debian wants ncurses lib. Works on Fedora, too.

Debian also needs pkg-config to detect correct flags.

Remove more outdated comments. Makefile now tracks header dependencies
-lintl is injected by configure when needed. Build _dbm with
gdbm-compat.

Group some modules by purpose. socket, select, and mmap work on Windows,
too.

4 years agobpo-44904: Fix classmethod property bug in doctest module (GH-28838)
Alex Waygood [Thu, 28 Oct 2021 07:48:02 +0000 (08:48 +0100)] 
bpo-44904: Fix classmethod property bug in doctest module (GH-28838)

The doctest module raised an error if a docstring contained an example that
attempted to access a classmethod property. (Stacking '@classmethod' on top of
`@property` has been supported since Python 3.9; see
https://docs.python.org/3/howto/descriptor.html#class-methods.)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
4 years agobpo-45438: format of inspect.Signature with generic builtins (#29212)
Martin Rueckl [Wed, 27 Oct 2021 21:36:41 +0000 (23:36 +0200)] 
bpo-45438: format of inspect.Signature with generic builtins (#29212)

Use types.GenericAlias in inspect.formatannotation to correctly add
type arguments of builtin types to the string representation of
Signatures.

Co-authored-by: Martin Rückl <martin.rueckl@codecentric.de>
4 years agobpo-45562: Print tokenizer debug messages to stderr (GH-29250)
Pablo Galindo Salgado [Wed, 27 Oct 2021 21:27:34 +0000 (22:27 +0100)] 
bpo-45562: Print tokenizer debug messages to stderr (GH-29250)

4 years agobpo-28737: Document when tp_dealloc should call PyObject_GC_UnTrack() (GH-29246)
Sam Gross [Wed, 27 Oct 2021 19:15:13 +0000 (15:15 -0400)] 
bpo-28737: Document when tp_dealloc should call PyObject_GC_UnTrack() (GH-29246)

Objects that support garbage collection ("container" objects) should
call PyObject_GC_UnTrack() from their destructors before clearing any
fields which may point to other "container" objects.

4 years agoDon't make a call at the C level when calling bound-methods from Python code. (GH...
Mark Shannon [Wed, 27 Oct 2021 14:26:22 +0000 (15:26 +0100)] 
Don't make a call at the C level when calling bound-methods from Python code. (GH-29238)

4 years agobpo-45618: Fix documentation build by pinning Docutils version to 0.17.1 (GH-29230)
m-aciek [Wed, 27 Oct 2021 14:21:29 +0000 (16:21 +0200)] 
bpo-45618: Fix documentation build by pinning Docutils version to 0.17.1 (GH-29230)

Co-authored-by: Maciej Olko <maciej.olko@yougov.com>
Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
4 years agobpo-42064: Convert `sqlite3` global state to module state (GH-29073)
Erlend Egeberg Aasland [Wed, 27 Oct 2021 11:12:21 +0000 (13:12 +0200)] 
bpo-42064: Convert `sqlite3` global state to module state (GH-29073)

4 years agobpo-44511: Improve the bytecode for class and mapping patterns (GH-26922)
Brandt Bucher [Wed, 27 Oct 2021 09:45:35 +0000 (02:45 -0700)] 
bpo-44511: Improve the bytecode for class and mapping patterns (GH-26922)

* Refactor mapping patterns and speed up class patterns.

* Simplify MATCH_KEYS and MATCH_CLASS.

* Add COPY opcode.

4 years agoRemove unused variables. (GH-29231)
Benjamin Peterson [Tue, 26 Oct 2021 23:22:34 +0000 (16:22 -0700)] 
Remove unused variables. (GH-29231)

4 years agobpo-40915: Fix mmap resize bugs on Windows (GH-29213)
Tim Golden [Tue, 26 Oct 2021 21:56:43 +0000 (22:56 +0100)] 
bpo-40915: Fix mmap resize bugs on Windows (GH-29213)

(original patch by eryksun)

Correctly hand various failure modes when resizing an mmap on Windows:

* Resizing a pagefile-backed mmap now creates a new mmap and copies data
* Attempting to resize when another mapping is held on the same file raises an OSError
* Attempting to resize a nametagged mmap raises an OSError if another mapping is held with the same nametag

4 years agobpo-45548: makesetup improvements (GH-29225)
Christian Heimes [Tue, 26 Oct 2021 08:58:43 +0000 (11:58 +0300)] 
bpo-45548: makesetup improvements (GH-29225)

* record which modules are build as shared extensions
* put object files in same directory as source files
* remove dependency on deleted _math.c

Signed-off-by: Christian Heimes <christian@python.org>
4 years agobpo-45020: Add tests for the -X "frozen_modules" option. (gh-28997)
Eric Snow [Mon, 25 Oct 2021 21:26:41 +0000 (15:26 -0600)] 
bpo-45020: Add tests for the -X "frozen_modules" option. (gh-28997)

We hadn't explicitly added any tests for this, so here they are.

https://bugs.python.org/issue45020

4 years agobpo-45548: FreeBSD doesn't like auto vars in makesetup (GH-29216)
Christian Heimes [Mon, 25 Oct 2021 18:52:55 +0000 (21:52 +0300)] 
bpo-45548: FreeBSD doesn't like auto vars in makesetup (GH-29216)

4 years agobpo-45548: Add missing extensions to Modules/Setup (GH-29199)
Christian Heimes [Mon, 25 Oct 2021 18:01:52 +0000 (21:01 +0300)] 
bpo-45548: Add missing extensions to Modules/Setup (GH-29199)

Adds _ctypes, _decimal, _multiprocessing, _posixshmem, _scproxy, _sqlite3,
and _uuid.

Use Makefile variables to build OpenSSL and TCL/TK modules.

Drop ``-lm`` from math lines. Extensions are always linked against libm.

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