]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
3 years agobpo-38523: ignore_dangling_symlinks does not apply recursively (GH-22937)
Zackery Spytz [Mon, 7 Nov 2022 11:45:16 +0000 (03:45 -0800)] 
bpo-38523: ignore_dangling_symlinks does not apply recursively (GH-22937)

3 years agoremove new line in pickle exception message (GH-31782)
Harshil [Mon, 7 Nov 2022 07:43:39 +0000 (13:13 +0530)] 
remove new line in pickle exception message (GH-31782)

3 years agogh-91803: Mock - fix error when using autospec methods with seal (#92213)
andrei kulakov [Mon, 7 Nov 2022 07:24:46 +0000 (02:24 -0500)] 
gh-91803: Mock - fix error when using autospec methods with seal (#92213)

Fixes https://github.com/python/cpython/issues/91803.

Co-authored-by: Karthikeyan Singaravelan <tir.karthi@gmail.com>
Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
3 years agodoc: Formatting and typo fixes (#98974)
jmcb [Mon, 7 Nov 2022 04:55:55 +0000 (04:55 +0000)] 
doc: Formatting and typo fixes (#98974)

3 years agoGH-99155: Fix `NormalDist` pickle with `0` and `1` protocols (GH-99156)
Nikita Sobolev [Mon, 7 Nov 2022 03:02:13 +0000 (06:02 +0300)] 
GH-99155: Fix `NormalDist` pickle with `0` and `1` protocols (GH-99156)

3 years agoGH-99155: Fix `NormalDist` pickle with `0` and `1` protocols (GH99156)
Nikita Sobolev [Mon, 7 Nov 2022 02:56:41 +0000 (05:56 +0300)] 
GH-99155: Fix `NormalDist` pickle with `0` and `1` protocols (GH99156)

3 years agogh-96055: Update faulthandler to emit proper unexpect signal number (gh-99162)
Dong-hee Na [Mon, 7 Nov 2022 01:19:25 +0000 (10:19 +0900)] 
gh-96055: Update faulthandler to emit proper unexpect signal number (gh-99162)

3 years agogh-98586: Add What's New entry and update docs (#99056)
Wenzel Jakob [Sun, 6 Nov 2022 22:54:55 +0000 (23:54 +0100)] 
gh-98586: Add What's New entry and update docs (#99056)

Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
3 years agogh-98139: enhance namespace package repr
Anh71me [Sun, 6 Nov 2022 22:13:40 +0000 (06:13 +0800)] 
gh-98139: enhance namespace package repr

3 years agogh-94286 Fix documentation of print default param (GH-94297)
Nouran Ali [Sun, 6 Nov 2022 20:14:58 +0000 (22:14 +0200)] 
gh-94286 Fix documentation of print default param (GH-94297)

3 years agobpo-33964: IDLE macosx - removed unused local dict. (GH-7926)
Terry Jan Reedy [Sun, 6 Nov 2022 20:10:22 +0000 (15:10 -0500)] 
bpo-33964: IDLE macosx - removed unused local dict. (GH-7926)

3 years ago[Enum] add built-in property to test_test_simple_enum (GH-98453)
Ethan Furman [Sun, 6 Nov 2022 20:03:42 +0000 (12:03 -0800)] 
[Enum] add built-in property to test_test_simple_enum (GH-98453)

3 years agogh-99051: remove duplicated test from `test_weakref` (GH-99052)
Nikita Sobolev [Sun, 6 Nov 2022 19:28:44 +0000 (22:28 +0300)] 
gh-99051: remove duplicated test from `test_weakref` (GH-99052)

3 years agoGH-98831: Implement super-instruction generation (#99084)
Guido van Rossum [Sun, 6 Nov 2022 17:40:47 +0000 (09:40 -0800)] 
GH-98831: Implement super-instruction generation (#99084)

Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
3 years agoCorrect some typos in comments (GH-98194)
jonasdlindner [Sun, 6 Nov 2022 16:54:44 +0000 (17:54 +0100)] 
Correct some typos in comments (GH-98194)

Automerge-Triggered-By: GH:AlexWaygood
3 years agogh-99153: set location on SyntaxError for try with both except and except* (GH-99160)
Irit Katriel [Sun, 6 Nov 2022 15:36:19 +0000 (15:36 +0000)] 
gh-99153: set location on SyntaxError for try with both except and except* (GH-99160)

3 years agogh-83004: Clean up refleak in _pickle initialisation (#98841)
Shantanu [Sun, 6 Nov 2022 14:05:13 +0000 (06:05 -0800)] 
gh-83004: Clean up refleak in _pickle initialisation (#98841)

3 years agogh-83004: Clean up refleak in _zoneinfo initialisation (#98842)
Shantanu [Sun, 6 Nov 2022 14:04:36 +0000 (06:04 -0800)] 
gh-83004: Clean up refleak in _zoneinfo initialisation (#98842)

3 years agogh-99139: Improve NameError error suggestion for instances (#99140)
Pablo Galindo Salgado [Sun, 6 Nov 2022 13:52:06 +0000 (13:52 +0000)] 
gh-99139: Improve NameError error suggestion for instances (#99140)

3 years ago`test_typing`: use all pickle protocols (#99154)
Nikita Sobolev [Sun, 6 Nov 2022 11:53:57 +0000 (14:53 +0300)] 
`test_typing`: use all pickle protocols (#99154)

3 years agogh-93464: [Enum] fix auto() failure during multiple assignment (GH-99148)
Ethan Furman [Sun, 6 Nov 2022 01:01:08 +0000 (18:01 -0700)] 
gh-93464: [Enum] fix auto() failure during multiple assignment (GH-99148)

* fix auto() failure during multiple assignment

i.e. `ONE = auto(), 'text'` will now have `ONE' with the value of `(1,
'text')`.  Before it would have been `(<an auto instance>, 'text')`

3 years ago[doc] fix typo (GH-99143)
Doj [Sat, 5 Nov 2022 21:03:29 +0000 (00:03 +0300)] 
[doc] fix typo (GH-99143)

3 years agogh-99134: Update bundled pip to 22.3.1 (gh-99135)
Paul Moore [Sat, 5 Nov 2022 17:50:39 +0000 (17:50 +0000)] 
gh-99134: Update bundled pip to 22.3.1 (gh-99135)

Update bundled pip to 22.3.1

3 years agogh-94808: add tests covering `PyFunction_GetKwDefaults` and `PyFunction_SetKwDefaults...
Nikita Sobolev [Sat, 5 Nov 2022 17:08:47 +0000 (20:08 +0300)] 
gh-94808: add tests covering `PyFunction_GetKwDefaults` and `PyFunction_SetKwDefaults` (GH-98809)

3 years agogh-94808: add tests covering `PySequence_{Set,Del}Slice` (GH-99123)
Nikita Sobolev [Sat, 5 Nov 2022 17:08:00 +0000 (20:08 +0300)] 
gh-94808: add tests covering `PySequence_{Set,Del}Slice` (GH-99123)

3 years agogh-98284: better error message for undefined abstractmethod (#97971)
Kaushik Kulkarni [Sat, 5 Nov 2022 16:31:57 +0000 (11:31 -0500)] 
gh-98284: better error message for undefined abstractmethod (#97971)

3 years agogh-94808: add tests covering `PyEval_GetFuncDesc` function (GH-98300)
Nikita Sobolev [Sat, 5 Nov 2022 13:07:59 +0000 (16:07 +0300)] 
gh-94808: add tests covering `PyEval_GetFuncDesc` function (GH-98300)

3 years agogh-99086: Fix implicit int compiler warning in configure check for PTHREAD_SCOPE_SYST...
Sam James [Sat, 5 Nov 2022 08:30:31 +0000 (08:30 +0000)] 
gh-99086: Fix implicit int compiler warning in configure check for PTHREAD_SCOPE_SYSTEM (#99085)

3 years agoGH-99104: Update headers for bytecodes.c and generate_cases.py (#99112)
Guido van Rossum [Sat, 5 Nov 2022 00:40:43 +0000 (17:40 -0700)] 
GH-99104: Update headers for bytecodes.c and generate_cases.py (#99112)

Also tweak the labels near the end of bytecodes.c.

3 years agoGH-98686: Fix compiler warning for HAS_ARG (GH-99106)
Brandt Bucher [Fri, 4 Nov 2022 23:54:32 +0000 (16:54 -0700)] 
GH-98686: Fix compiler warning for HAS_ARG (GH-99106)

3 years agoGH-98831: Add some macros definitions to bytecodes.c to reduce IDE warnings. (#99093)
Mark Shannon [Fri, 4 Nov 2022 23:37:53 +0000 (16:37 -0700)] 
GH-98831: Add some macros definitions to bytecodes.c to reduce IDE warnings. (#99093)

3 years agoGH-98831: Auto-generate PREDICTED() macro calls (#99102)
Guido van Rossum [Fri, 4 Nov 2022 22:30:17 +0000 (15:30 -0700)] 
GH-98831: Auto-generate PREDICTED() macro calls (#99102)

Co-authored-by: Brandt Bucher <brandtbucher@gmail.com>
3 years agoGH-98831: Add `regen-cases` to `regen-all` (#99107)
Brandt Bucher [Fri, 4 Nov 2022 22:00:51 +0000 (15:00 -0700)] 
GH-98831: Add `regen-cases` to `regen-all` (#99107)

3 years agogh-90867: test.support.wait_process() uses LONG_TIMEOUT (#99071)
Victor Stinner [Fri, 4 Nov 2022 13:41:33 +0000 (14:41 +0100)] 
gh-90867: test.support.wait_process() uses LONG_TIMEOUT (#99071)

The test.support.wait_process() function now uses a timeout of
LONG_TIMEOUT seconds by default, instead of SHORT_TIMEOUT.  It
doesn't matter if a Python buildbot is slower, it only matters that
the process completes. The timeout should just be shorter than
"forever".

3 years agogh-90716: Fix pylong_int_from_string() refleak (#99094)
Victor Stinner [Fri, 4 Nov 2022 13:24:10 +0000 (14:24 +0100)] 
gh-90716: Fix pylong_int_from_string() refleak (#99094)

Fix validated by:

    $ ./python -m test -R 3:3 test_int
    Tests result: SUCCESS

3 years agominor edits to locale doc (#98537)
Skip Montanaro [Fri, 4 Nov 2022 13:02:11 +0000 (08:02 -0500)] 
minor edits to locale doc (#98537)

3 years agoSupport comparing two sets of pystats (GH-98816)
Michael Droettboom [Fri, 4 Nov 2022 10:15:54 +0000 (06:15 -0400)] 
Support comparing two sets of pystats (GH-98816)

This adds support for comparing pystats collected from two different builds.

- The `--json-output` can be used to load in a set of raw stats and output a
  JSON file.
- Two of these JSON files can be provided on the next run, and then comparative
  results between the two are output.

3 years agogh-94808: Cover `LOAD_GLOBAL` for custom dict subtypes (GH-96767)
Nikita Sobolev [Fri, 4 Nov 2022 09:58:38 +0000 (12:58 +0300)] 
gh-94808: Cover `LOAD_GLOBAL` for custom dict subtypes (GH-96767)

3 years agoDocs: add `named` to the list of styles in the sqlite3.paramstyle attr docs (#99078)
Nick Pope [Thu, 3 Nov 2022 23:21:01 +0000 (23:21 +0000)] 
Docs: add `named` to the list of styles in the sqlite3.paramstyle attr docs (#99078)

3 years agogh-90716: bugfixes and more tests for _pylong. (#99073)
Gregory P. Smith [Thu, 3 Nov 2022 23:18:38 +0000 (16:18 -0700)] 
gh-90716: bugfixes and more tests for _pylong. (#99073)

* Properly decref on _pylong import error.
* Improve the error message on _pylong TypeError.
* Fix the assertion error in pydebug builds to be a TypeError.
* Tie the return value comments together.

These are minor followups to issues not caught among the reviewers on
https://github.com/python/cpython/pull/96673.

3 years agogh-73691: Increase size limits in _xxtestfuzz (#99070)
Gregory P. Smith [Thu, 3 Nov 2022 21:41:20 +0000 (14:41 -0700)] 
gh-73691:  Increase size limits in _xxtestfuzz (#99070)

Now that our int<->str conversions are size limited and we have the
_pylong module handling larger integers, we don't need to limit
everything just to avoid wasting time in the quadratic time DoS-like
case while fuzzing.

We can tweak these further after seeing how this goes.

3 years agoGH-90699: Remove `_Py_IDENTIFIER` usage from `_ctypes` (GH-99054)
Kumar Aditya [Thu, 3 Nov 2022 20:20:10 +0000 (01:50 +0530)] 
GH-90699: Remove `_Py_IDENTIFIER` usage from `_ctypes`  (GH-99054)

3 years agogh-92584: Remove the distutils package (#99061)
Victor Stinner [Thu, 3 Nov 2022 18:27:27 +0000 (19:27 +0100)] 
gh-92584: Remove the distutils package (#99061)

Remove the distutils package. It was deprecated in Python 3.10 by PEP
632 "Deprecate distutils module". For projects still using distutils
and cannot be updated to something else, the setuptools project can
be installed: it still provides distutils.

* Remove Lib/distutils/ directory
* Remove test_distutils
* Remove references to distutils
* Skip test_check_c_globals and test_peg_generator since they use
  distutils

3 years agogh-98978: Fix Py_SetPythonHome(NULL) (#99066)
Victor Stinner [Thu, 3 Nov 2022 17:34:32 +0000 (18:34 +0100)] 
gh-98978: Fix Py_SetPythonHome(NULL) (#99066)

Fix use-after-free in Py_SetPythonHome(NULL), Py_SetProgramName(NULL)
and _Py_SetProgramFullPath(NULL) function calls.

Issue reported by Benedikt Reinartz.

3 years agogh-94172: Remove keyfile, certfile and check_hostname parameters (#94173)
Victor Stinner [Thu, 3 Nov 2022 17:32:25 +0000 (18:32 +0100)] 
gh-94172: Remove keyfile, certfile and check_hostname parameters (#94173)

Remove the keyfile, certfile and check_hostname parameters,
deprecated since Python 3.6, in modules: ftplib, http.client,
imaplib, poplib and smtplib. Use the context parameter (ssl_context
in imaplib) instead.

Parameters following the removed parameters become keyword-only
parameters.

ftplib: Remove the FTP_TLS.ssl_version class attribute: use the
context parameter instead.

3 years agogh-90716: Remove _pylong._DEBUG flag (#99063)
Victor Stinner [Thu, 3 Nov 2022 17:16:28 +0000 (18:16 +0100)] 
gh-90716: Remove _pylong._DEBUG flag (#99063)

To debug the _pylong module, it's trivial to add this code again
locally. There is not need to keep it in Python releases.

3 years agogh-98884: [pathlib] remove `hasattr` check for `lru_cache` (#98885)
Nikita Sobolev [Thu, 3 Nov 2022 17:14:12 +0000 (20:14 +0300)] 
gh-98884: [pathlib] remove `hasattr` check for `lru_cache` (#98885)

3 years agogh-92584: Remove references to removed _bootsubprocess (#99062)
Victor Stinner [Thu, 3 Nov 2022 17:12:45 +0000 (18:12 +0100)] 
gh-92584: Remove references to removed _bootsubprocess (#99062)

The _bootsubprocess module was removed in gh-93939
by commit 81dca70d704d0834d8c30580e648a973250b2973.

3 years agogh-97909: PyMemberDef & PyGetSetDef members are not marked up (GH-98810)
Johnny11502 [Thu, 3 Nov 2022 16:57:30 +0000 (12:57 -0400)] 
gh-97909: PyMemberDef & PyGetSetDef members are not marked up (GH-98810)

3 years agogh-98401: Invalid escape sequences emits SyntaxWarning (#99011)
Victor Stinner [Thu, 3 Nov 2022 16:53:25 +0000 (17:53 +0100)] 
gh-98401: Invalid escape sequences emits SyntaxWarning (#99011)

A backslash-character pair that is not a valid escape sequence now
generates a SyntaxWarning, instead of DeprecationWarning.  For
example, re.compile("\d+\.\d+") now emits a SyntaxWarning ("\d" is an
invalid escape sequence), use raw strings for regular expression:
re.compile(r"\d+\.\d+"). In a future Python version, SyntaxError will
eventually be raised, instead of SyntaxWarning.

Octal escapes with value larger than 0o377 (ex: "\477"), deprecated
in Python 3.11, now produce a SyntaxWarning, instead of
DeprecationWarning. In a future Python version they will be
eventually a SyntaxError.

codecs.escape_decode() and codecs.unicode_escape_decode() are left
unchanged: they still emit DeprecationWarning.

* The parser only emits SyntaxWarning for Python 3.12 (feature
  version), and still emits DeprecationWarning on older Python
  versions.
* Fix SyntaxWarning by using raw strings in Tools/c-analyzer/ and
  wasm_build.py.

3 years agoGH-98831: Remove redundant extract_cases.py script (GH-99065)
Guido van Rossum [Thu, 3 Nov 2022 16:50:35 +0000 (09:50 -0700)] 
GH-98831: Remove redundant extract_cases.py script (GH-99065)

Debt I owe from PR GH-98830.

3 years agogh-97616: test_list_resize_overflow() uses sys.maxsize (#99057)
Victor Stinner [Thu, 3 Nov 2022 14:56:12 +0000 (15:56 +0100)] 
gh-97616: test_list_resize_overflow() uses sys.maxsize (#99057)

3 years agogh-83004: Clean up refleak in _io initialisation (#98840)
Shantanu [Thu, 3 Nov 2022 14:29:11 +0000 (07:29 -0700)] 
gh-83004: Clean up refleak in _io initialisation (#98840)

3 years agogh-98948: Remove obsolete readelf dependency (#98949)
serge-sans-paille [Thu, 3 Nov 2022 13:31:37 +0000 (13:31 +0000)] 
gh-98948: Remove obsolete readelf dependency (#98949)

This got introduced in commit 5884449539510313c826d69835829c7957c7154a
to determine if readline is already linked against curses or tinfo in
the setup.py, which is no longer present.

3 years agogh-94199: Remove ssl.wrap_socket() documentation (#99023)
Victor Stinner [Thu, 3 Nov 2022 12:33:33 +0000 (13:33 +0100)] 
gh-94199: Remove ssl.wrap_socket() documentation (#99023)

The function has been removed. In the ssl documentation, replace
references to the ssl.wrap_socket() function with references to the
ssl.SSLContext.wrap_socket() method.

Co-authored-by: Illia Volochii <illia.volochii@gmail.com>
3 years agoGH-96793: Implement PEP 479 in bytecode. (GH-99006)
Mark Shannon [Thu, 3 Nov 2022 11:38:51 +0000 (04:38 -0700)] 
GH-96793: Implement PEP 479 in bytecode. (GH-99006)

* Handle converting StopIteration to RuntimeError in bytecode.

* Add custom instruction for converting StopIteration into RuntimeError.

3 years agogh-98740: Fix validation of conditional expressions in RE (GH-98764)
Serhiy Storchaka [Thu, 3 Nov 2022 07:23:46 +0000 (09:23 +0200)] 
gh-98740: Fix validation of conditional expressions in RE (GH-98764)

In very rare circumstances the JUMP opcode could be confused with the
argument of the opcode in the "then" part which doesn't end with the
JUMP opcode. This led to incorrect detection of the final JUMP opcode
and incorrect calculation of the size of the subexpression.

NOTE: Changed return value of functions _validate_inner() and
_validate_charset() in Modules/_sre/sre.c.  Now they return 0 on success,
-1 on failure, and 1 if the last op is JUMP (which usually is a failure).
Previously they returned 1 on success and 0 on failure.

3 years agoGH-98831: "Generate" the interpreter (#98830)
Guido van Rossum [Thu, 3 Nov 2022 04:31:26 +0000 (21:31 -0700)] 
GH-98831: "Generate" the interpreter (#98830)

The switch cases (really TARGET(opcode) macros) have been moved from ceval.c to generated_cases.c.h. That file is generated from instruction definitions in bytecodes.c (which impersonates a C file so the C code it contains can be edited without custom support in e.g. VS Code).

The code generator lives in Tools/cases_generator (it has a README.md explaining how it works). The DSL used to describe the instructions is a work in progress, described in https://github.com/faster-cpython/ideas/blob/main/3.12/interpreter_definition.md.

This is surely a work-in-progress. An easy next step could be auto-generating super-instructions.

**IMPORTANT: Merge Conflicts**

If you get a merge conflict for instruction implementations in ceval.c, your best bet is to port your changes to bytecodes.c. That file looks almost the same as the original cases, except instead of `TARGET(NAME)` it uses `inst(NAME)`, and the trailing `DISPATCH()` call is omitted (the code generator adds it automatically).

3 years agogh-98999: Raise `ValueError` in `_pyio` on closed buffers (gh-99009)
Nikita Sobolev [Thu, 3 Nov 2022 03:03:12 +0000 (06:03 +0300)] 
gh-98999: Raise `ValueError` in `_pyio` on closed buffers (gh-99009)

3 years agoDocs: Add 'as, match statement' to the index (#99001)
Hugo van Kemenade [Thu, 3 Nov 2022 02:15:00 +0000 (04:15 +0200)] 
Docs: Add 'as, match statement' to the index (#99001)

3 years agogh-98512: Add more tests for `ValuesView` (#98515)
Nikita Sobolev [Thu, 3 Nov 2022 02:10:42 +0000 (05:10 +0300)] 
gh-98512: Add more tests for `ValuesView` (#98515)

3 years agoargparse howto: Use f-string in preference to "...".format() (#98883)
Skip Montanaro [Thu, 3 Nov 2022 02:08:08 +0000 (21:08 -0500)] 
argparse howto: Use f-string in preference to "...".format() (#98883)

3 years agogh-96997: Clarify the contract of PyMem_SetAllocator() (#98977)
Pablo Galindo Salgado [Wed, 2 Nov 2022 21:49:12 +0000 (21:49 +0000)] 
gh-96997: Clarify the contract of PyMem_SetAllocator() (#98977)

3 years agoGH-90699: Remove `_Py_IDENTIFIER` usage from `_elementtree` module (GH-99012)
Kumar Aditya [Wed, 2 Nov 2022 20:29:41 +0000 (01:59 +0530)] 
GH-90699: Remove `_Py_IDENTIFIER` usage from `_elementtree` module (GH-99012)

3 years agogh-98393: Update test_os for bytes-like types (#98487)
Victor Stinner [Wed, 2 Nov 2022 19:45:58 +0000 (20:45 +0100)] 
gh-98393: Update test_os for bytes-like types (#98487)

Address Serhiy Storchaka's review.

3 years agogh-97731: Specify the full path to the docs for `make docclean` (GH-98982)
Brett Cannon [Wed, 2 Nov 2022 19:34:22 +0000 (12:34 -0700)] 
gh-97731: Specify the full path to the docs for `make docclean` (GH-98982)

Specify the full path to the docs for `make docclean`
This is to have `make clean` not error out on cross-builds.

3 years agogh-98415: Fix uuid.getnode() ifconfig implementation (#98423)
Chaim Sanders [Wed, 2 Nov 2022 18:41:20 +0000 (11:41 -0700)] 
gh-98415: Fix uuid.getnode() ifconfig implementation (#98423)

The uuid.getnode() function has multiple implementations, tested sequentially.
The ifconfig implementation was incorrect and always failed: fix it.

In practice, functions of libuuid library are preferred, if available:
uuid_generate_time_safe(), uuid_create() or uuid_generate_time().

Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>
3 years agogh-98790: When DLLs directory is missing on Windows, assume executable_dir contains...
Steve Dower [Wed, 2 Nov 2022 18:38:40 +0000 (18:38 +0000)] 
gh-98790: When DLLs directory is missing on Windows, assume executable_dir contains PYD files instead (GH-98936)

3 years agogh-99016: Make build scripts compatible with Python 3.8 (GH-99017)
Serhiy Storchaka [Wed, 2 Nov 2022 18:30:09 +0000 (20:30 +0200)] 
gh-99016: Make build scripts compatible with Python 3.8 (GH-99017)

3 years agoGH-98686: Quicken everything (GH-98687)
Brandt Bucher [Wed, 2 Nov 2022 17:42:57 +0000 (10:42 -0700)] 
GH-98686: Quicken everything (GH-98687)

3 years agoGH-90699: Remove `_Py_IDENTIFIER` usage from `_asyncio` module (#99010)
Kumar Aditya [Wed, 2 Nov 2022 17:16:06 +0000 (22:46 +0530)] 
GH-90699: Remove `_Py_IDENTIFIER` usage from `_asyncio` module (#99010)

3 years agogh-98989: configure: add 3.11 to list of Pythons (#98988)
Jelle Zijlstra [Wed, 2 Nov 2022 17:05:42 +0000 (10:05 -0700)] 
gh-98989: configure: add 3.11 to list of Pythons (#98988)

Closes #98989

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
3 years agoGH-90699: Remove `_Py_IDENTIFIER` usage from `_json` module (GH-98956)
Kumar Aditya [Wed, 2 Nov 2022 16:03:38 +0000 (21:33 +0530)] 
GH-90699: Remove `_Py_IDENTIFIER` usage from `_json` module (GH-98956)

3 years agogh-87092: remove unused SET_LOC/UNSET_LOC macros (GH-98914)
Irit Katriel [Wed, 2 Nov 2022 15:52:11 +0000 (15:52 +0000)] 
gh-87092: remove unused SET_LOC/UNSET_LOC macros (GH-98914)

3 years agoGH-90699: Remove `_Py_IDENTIFIER` usage from `_curses` module (GH-98957)
Kumar Aditya [Wed, 2 Nov 2022 15:41:11 +0000 (21:11 +0530)] 
GH-90699: Remove `_Py_IDENTIFIER` usage from `_curses` module (GH-98957)

3 years agogh-87092: do not allocate PyFutureFeatures dynamically (GH-98913)
Irit Katriel [Wed, 2 Nov 2022 15:13:07 +0000 (15:13 +0000)] 
gh-87092: do not allocate PyFutureFeatures dynamically (GH-98913)

3 years agogh-98903: Test suite fails with exit code 4 if no tests ran (#98904)
Victor Stinner [Wed, 2 Nov 2022 14:37:40 +0000 (15:37 +0100)] 
gh-98903: Test suite fails with exit code 4 if no tests ran (#98904)

The Python test suite now fails wit exit code 4 if no tests ran. It
should help detecting typos in test names and test methods.

* Add "EXITCODE_" constants to Lib/test/libregrtest/main.py.
* Fix a typo: "NO TEST RUN" becomes "NO TESTS RAN"

3 years agogh-96265: Formatting changes for faq/programming (#98242)
Stanley [Wed, 2 Nov 2022 04:58:44 +0000 (21:58 -0700)] 
gh-96265: Formatting changes for faq/programming (#98242)

* Formatting changes for faq/programming

* Add missing method formatting, use non-literal formatting

* Fix sphinx warnings

* Some extra formatting missed earlier

* More formatting suggestions from review

Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
* Add missing colon, avoid referening external module

Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
3 years agogh-92679: Clarify asyncio.loop.start_tls parameters (#92682)
Oleg Iarygin [Wed, 2 Nov 2022 04:52:19 +0000 (08:52 +0400)] 
gh-92679: Clarify asyncio.loop.start_tls parameters (#92682)

3 years agogh-92871: Postpone the removal of typing.{io,re} to 3.13 (#98958)
Sebastian Rittau [Wed, 2 Nov 2022 03:51:45 +0000 (04:51 +0100)] 
gh-92871: Postpone the removal of typing.{io,re} to 3.13 (#98958)

3 years ago[doc] Update cookbook example for socket-based logging in a production sett… (GH...
Vinay Sajip [Tue, 1 Nov 2022 23:00:17 +0000 (23:00 +0000)] 
[doc] Update cookbook example for socket-based logging in a production sett… (GH-98922)

Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
3 years agogh-98925: Lower marshal recursion depth for WASI (GH-98938)
Brett Cannon [Tue, 1 Nov 2022 22:51:05 +0000 (15:51 -0700)] 
gh-98925: Lower marshal recursion depth for WASI (GH-98938)

For wasmtime 2.0, the stack depth cost is 6% higher. This causes the default max `marshal` recursion depth to blow the stack.

As the default marshal depth is 2000 and Windows is set to 1000, split the difference and choose 1500 for WASI to be safe.

3 years agogh-98689: Update Windows builds to zlib v1.2.13 (GH-98968)
Zachary Ware [Tue, 1 Nov 2022 18:02:51 +0000 (13:02 -0500)] 
gh-98689: Update Windows builds to zlib v1.2.13 (GH-98968)

3 years agoDoc: use "unnumbered" footnotes (#98954)
Manuel Kaufmann [Tue, 1 Nov 2022 13:25:33 +0000 (14:25 +0100)] 
Doc: use "unnumbered" footnotes (#98954)

Use unnumbered footnote in this file to avoid reseting the footnotes numbering.

Example: when building the tutorial into a PDF and using `latex_show_urls = "footnotes"`; this footnote become the number 8. However, without this change, the footnote shows the number 1.

3 years agogh-98931: Improve error message when the user types 'import x from y' instead of...
Pablo Galindo Salgado [Tue, 1 Nov 2022 13:01:20 +0000 (13:01 +0000)] 
gh-98931: Improve error message when the user types 'import x from y' instead of 'from y import x' (#98932)

3 years agogh-98852: Fix subscription of type aliases (GH-98920)
Serhiy Storchaka [Tue, 1 Nov 2022 07:33:09 +0000 (09:33 +0200)] 
gh-98852: Fix subscription of type aliases (GH-98920)

Fix subscription of type aliases containing bare generic types or types
like TypeVar: for example tuple[A, T][int] and tuple[TypeVar, T][int],
where A is a generic type, and T is a type variable.

3 years agoGH-98766: Modest speed-up from ChainMap.__iter__ (GH-98946)
Raymond Hettinger [Tue, 1 Nov 2022 04:44:40 +0000 (23:44 -0500)] 
GH-98766: Modest speed-up from ChainMap.__iter__ (GH-98946)

3 years agogh-98658: Add __class_getitem__ to array.array (#98661)
Jelle Zijlstra [Tue, 1 Nov 2022 04:10:18 +0000 (21:10 -0700)] 
gh-98658: Add __class_getitem__ to array.array (#98661)

Closes #98658

3 years agoRename JUMP_TO_INSTRUCTION to GO_TO_INSTRUCTION (#98934)
Guido van Rossum [Tue, 1 Nov 2022 02:53:32 +0000 (19:53 -0700)] 
Rename JUMP_TO_INSTRUCTION to GO_TO_INSTRUCTION (#98934)

This reduces confusion between jumps at the bytecode level
(e.g. JUMPTO(), JUMPBY(), and various JUMP_*() opcodes)
and jumps in the C code (which are 'goto' statements).

3 years agoFix wording in Functional Programming HOWTO (GH-98939)
partev [Tue, 1 Nov 2022 02:49:27 +0000 (22:49 -0400)] 
Fix wording in Functional Programming HOWTO (GH-98939)

3 years agoMissing PS1 prompt in tutorial example (GH-98921)
Manuel Kaufmann [Tue, 1 Nov 2022 02:24:26 +0000 (03:24 +0100)] 
Missing PS1 prompt in tutorial example (GH-98921)

3 years agoGH-98897: fix memory leak if `math.dist` raises exception (GH-98898)
Kumar Aditya [Tue, 1 Nov 2022 02:18:32 +0000 (07:48 +0530)] 
GH-98897: fix memory leak if `math.dist` raises exception (GH-98898)

3 years agogh-98692: Enable treating shebang lines as executables in py.exe launcher (GH-98732)
Steve Dower [Mon, 31 Oct 2022 21:05:50 +0000 (21:05 +0000)] 
gh-98692: Enable treating shebang lines as executables in py.exe launcher (GH-98732)

3 years agogh-98610: Adjust the Optional Restrictions on Subinterpreters (GH-98618)
Eric Snow [Mon, 31 Oct 2022 19:35:54 +0000 (13:35 -0600)] 
gh-98610: Adjust the Optional Restrictions on Subinterpreters (GH-98618)

Previously, the optional restrictions on subinterpreters were: disallow fork, subprocess, and threads.  By default, we were disallowing all three for "isolated" interpreters.  We always allowed all three for the main interpreter and those created through the legacy `Py_NewInterpreter()` API.

Those settings were a bit conservative, so here we've adjusted the optional restrictions to: fork, exec, threads, and daemon threads.  The default for "isolated" interpreters disables fork, exec, and daemon threads.  Regular threads are allowed by default.  We continue always allowing everything For the main interpreter and the legacy API.

In the code, we add `_PyInterpreterConfig.allow_exec` and  `_PyInterpreterConfig.allow_daemon_threads`.  We also add `Py_RTFLAGS_DAEMON_THREADS` and `Py_RTFLAGS_EXEC`.

3 years agoFix typo in sorting HOWTO (#98888)
partev [Mon, 31 Oct 2022 17:58:13 +0000 (13:58 -0400)] 
Fix typo in sorting HOWTO (#98888)

3 years agoDoc: Fix sphinx-lint issues (GH-98911)
Julien Palard [Mon, 31 Oct 2022 15:30:29 +0000 (16:30 +0100)] 
Doc: Fix sphinx-lint issues (GH-98911)

They were introduced right between GH-98441 and GH-98408.

3 years agogh-98576: Fix types in dataclass.InitVar example (gh-98577)
Shantanu [Mon, 31 Oct 2022 15:02:02 +0000 (08:02 -0700)] 
gh-98576: Fix types in dataclass.InitVar example (gh-98577)

3 years agogh-98410: move getbufferproc and releasebufferproc to buffer.h (#31158)
David Hewitt [Mon, 31 Oct 2022 14:01:32 +0000 (14:01 +0000)] 
gh-98410: move getbufferproc and releasebufferproc to buffer.h (#31158)

This adds them to the Limited API.

3 years agogh-98878: Use builtins from the bound frame when offering a suggestion (#98880)
Batuhan Taskaya [Mon, 31 Oct 2022 13:27:13 +0000 (16:27 +0300)] 
gh-98878: Use builtins from the bound frame when offering a suggestion (#98880)

3 years agogh-98811: use full source location to simplify __future__ imports error checking...
Irit Katriel [Mon, 31 Oct 2022 13:08:03 +0000 (13:08 +0000)] 
gh-98811: use full source location to simplify __future__ imports error checking. This also fixes an incorrect error offset. (GH-98812)