]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
3 years agogh-93157: Fix fileinput didn't support `errors` in `inplace` mode (GH-95128)
Inada Naoki [Sun, 24 Jul 2022 02:42:11 +0000 (11:42 +0900)] 
gh-93157: Fix fileinput didn't support `errors` in `inplace` mode (GH-95128)

3 years agoCompute v only when needed. (#95183)
Raymond Hettinger [Sat, 23 Jul 2022 23:07:17 +0000 (18:07 -0500)] 
Compute v only when needed. (#95183)

3 years agogh-90385: Add skip_unless_symlink decorator to test_walk_symlink_location (GH-95182)
Christian Heimes [Sat, 23 Jul 2022 21:42:04 +0000 (23:42 +0200)] 
gh-90385: Add skip_unless_symlink decorator to test_walk_symlink_location (GH-95182)

3 years agogh-93351: Add news entry and what's new entry for changes in gh-93351 (#95175)
Pablo Galindo Salgado [Sat, 23 Jul 2022 18:35:44 +0000 (19:35 +0100)] 
gh-93351: Add news entry and what's new entry for changes in gh-93351 (#95175)

3 years agogh-90473: Check for HAVE_KILL in main.c:exit_sigint (GH-95165)
Christian Heimes [Sat, 23 Jul 2022 10:29:00 +0000 (12:29 +0200)] 
gh-90473: Check for HAVE_KILL in main.c:exit_sigint (GH-95165)

3 years agogh-90473: Fix more tests on platforms without umask (GH-95164)
Christian Heimes [Sat, 23 Jul 2022 10:26:31 +0000 (12:26 +0200)] 
gh-90473: Fix more tests on platforms without umask (GH-95164)

3 years agogh-89758: Track all socket module dependencies (#95157)
Christian Heimes [Sat, 23 Jul 2022 09:34:50 +0000 (11:34 +0200)] 
gh-89758: Track all socket module dependencies (#95157)

3 years agoDoc: Add omitted secondary prompt in inputoutput tutorial (GH-30317)
Chenwei Xiao [Sat, 23 Jul 2022 09:25:42 +0000 (17:25 +0800)] 
Doc: Add omitted secondary prompt in inputoutput tutorial (GH-30317)

For the continuation lines, "..." should present as secondary prompt

3 years agogh-95132: Correctly relay *args and **kwds from sqlite3.connect to factory (#95146)
Erlend Egeberg Aasland [Sat, 23 Jul 2022 07:51:28 +0000 (09:51 +0200)] 
gh-95132: Correctly relay *args and **kwds from sqlite3.connect to factory (#95146)

This PR partially reverts gh-24421 (PR) and fixes the remaining concerns
given in gh-93044 (issue):

- keyword arguments are passed as positional arguments to factory()
- if an argument is not passed to sqlite3.connect(), its default value
  is passed to factory()

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
3 years agogh-90385: Add `pathlib.Path.walk()` method (GH-92517)
Stanislav Zmiev [Fri, 22 Jul 2022 23:55:46 +0000 (03:55 +0400)] 
gh-90385: Add `pathlib.Path.walk()` method (GH-92517)

Automerge-Triggered-By: GH:brettcannon
3 years agoGH-94438: Handle extended arguments and conditional pops in mark_stacks (GH-95110)
Brandt Bucher [Fri, 22 Jul 2022 23:28:03 +0000 (16:28 -0700)] 
GH-94438: Handle extended arguments and conditional pops in mark_stacks (GH-95110)

3 years agoGH-94036: Fix more attribute location quirks (GH-95028)
Brandt Bucher [Fri, 22 Jul 2022 20:13:16 +0000 (13:13 -0700)] 
GH-94036: Fix more attribute location quirks (GH-95028)

3 years agoFix copy-friendliness of tutorial example (GH-93424)
Chenwei Xiao [Fri, 22 Jul 2022 20:11:48 +0000 (04:11 +0800)] 
Fix copy-friendliness of tutorial example (GH-93424)

3 years agoGH-95113: Don't use EXTENDED_ARG_QUICK in unquickened code (GH-95121)
Brandt Bucher [Fri, 22 Jul 2022 18:04:20 +0000 (11:04 -0700)] 
GH-95113: Don't use EXTENDED_ARG_QUICK in unquickened code (GH-95121)

3 years agoFix async method reference links in `compound_stmts` docs (GH-94935)
July Tikhonov [Fri, 22 Jul 2022 17:03:17 +0000 (20:03 +0300)] 
Fix async method reference links in `compound_stmts` docs (GH-94935)

3 years agoFix scheme count in `sysconfig` whatsnew entry (GH-94110)
Frank Dana [Fri, 22 Jul 2022 16:51:14 +0000 (12:51 -0400)] 
Fix scheme count in `sysconfig` whatsnew entry (GH-94110)

3 years agoFix incorrect directive in multiprocessing module documentation (GH-93517)
oda-gitso [Fri, 22 Jul 2022 16:46:42 +0000 (23:46 +0700)] 
Fix incorrect directive in multiprocessing module documentation (GH-93517)

3 years agoCloses gh-95133: docs, fix indentation level in TestCase.assertLogs example (GH-95134)
Alexandru Mărășteanu [Fri, 22 Jul 2022 16:37:22 +0000 (19:37 +0300)] 
Closes gh-95133: docs, fix indentation level in TestCase.assertLogs example (GH-95134)

3 years agoUse Markdown Headers in GitHub Issue templates (GH-95111)
Mariatta Wijaya [Fri, 22 Jul 2022 16:19:08 +0000 (09:19 -0700)] 
Use Markdown Headers in GitHub Issue templates (GH-95111)

The Issue templates are using the markup to make text bold.
We should be using proper text headers instead.

I replaced the **bold** text markup with L1 headers.

3 years agogh-81040: Improve sqlite3.Cursor.rowcount docs (#94940)
Erlend Egeberg Aasland [Fri, 22 Jul 2022 07:34:39 +0000 (09:34 +0200)] 
gh-81040: Improve sqlite3.Cursor.rowcount docs (#94940)

3 years agoFix typo in PROTOCOL_TO_TLS_VERSION in test_ssl (GH-95119)
David Benjamin [Fri, 22 Jul 2022 00:38:15 +0000 (17:38 -0700)] 
Fix typo in PROTOCOL_TO_TLS_VERSION in test_ssl (GH-95119)

This appears to be a typo. It causes try_protocol_combo to try to turn
on SSL 3.0 when testing PROTOCOL_SSLv23 (aka PROTOCOL_TLS), which
doesn't make any sense. Fix it to be PROTOCOL_SSLv3.

Without this, try_protocol_combo is actually setting
context.minimum_version to SSLv3 when called as
try_protocol_combo(ssl.PROTOCOL_TLS, ssl.PROTOCOL_TLS, True)

One would think this causes a no-ssl3 OpenSSL build to fail, but OpenSSL
forgot to make SSL_CTX_set_min_proto_version(SSL3_VERSION) does not
notice no-ssl3, so this typo has gone undetected. But we should still
fix the typo because, presumably, a future version of OpenSSL will
remove SSL 3.0 and do so more thoroughly, at which point this will
break.

3 years agogh-95112: Fix What's New 3.12 contribution note periods (#95118)
Terry Jan Reedy [Fri, 22 Jul 2022 00:36:53 +0000 (20:36 -0400)] 
gh-95112: Fix What's New 3.12 contribution note periods (#95118)

A couple, so far, are missing.

3 years agogh-95112: Fix What's New 3.11 contribution note periods (#95115)
Terry Jan Reedy [Fri, 22 Jul 2022 00:35:56 +0000 (20:35 -0400)] 
gh-95112: Fix What's New 3.11 contribution note periods (#95115)

Some are missing, a few placed after the ')'.

3 years agogh-95112: Fix What's New 3.10 contribution note periods (#95114)
Terry Jan Reedy [Fri, 22 Jul 2022 00:00:52 +0000 (20:00 -0400)] 
gh-95112: Fix What's New 3.10 contribution note periods (#95114)

Some are missing, a few placed after the ')'.
One ') was missing.

3 years agogh-95105: Return Iterator from wsgiref.types.InputStream.__iter__ (#95106)
Shantanu [Thu, 21 Jul 2022 20:26:04 +0000 (13:26 -0700)] 
gh-95105: Return Iterator from wsgiref.types.InputStream.__iter__ (#95106)

3 years agogh-95095: Use SSL_CTX_get_max_proto_version instead of SSL_CTX_ctrl (GH-95096)
David Benjamin [Thu, 21 Jul 2022 18:44:30 +0000 (11:44 -0700)] 
gh-95095: Use SSL_CTX_get_max_proto_version instead of SSL_CTX_ctrl (GH-95096)

The wrapper macros are more readable and match the form recommended in
the OpenSSL documentation. They also slightly less error-prone, as the
mapping of arguments to SSL_CTX_ctrl is not always clear. (Though in
this case it's straightforward.)
https://www.openssl.org/docs/man1.1.1/man3/SSL_CTX_get_max_proto_version.html

3 years agoFix PyCode_Addr2Location when addrq < 0 (GH-95091)
Ken Jin [Thu, 21 Jul 2022 13:49:49 +0000 (21:49 +0800)] 
Fix PyCode_Addr2Location when addrq < 0 (GH-95091)

3 years agogh-95010: Fix asyncio GenericWatcherTests.test_create_subprocess_fails_with_inactive_...
Thomas Grainger [Thu, 21 Jul 2022 11:35:20 +0000 (12:35 +0100)] 
gh-95010: Fix asyncio GenericWatcherTests.test_create_subprocess_fails_with_inactive_watcher (GH-95009)

The test was never run, because it was missing the TestCase class.
The test failed because the wrong attribute was patched.

3 years agoGH-95029: Describe Windows Store package isolation and redirection in more detail...
Anthony Shaw [Thu, 21 Jul 2022 00:01:23 +0000 (01:01 +0100)] 
GH-95029: Describe Windows Store package isolation and redirection in more detail (GH-95030)

3 years agodocs: use 'recursively' in the description of rglob, and mention globs in the os...
Ned Batchelder [Wed, 20 Jul 2022 21:47:43 +0000 (14:47 -0700)] 
docs: use 'recursively' in the description of rglob, and mention globs in the os equivalences (GH-94954)

The r in `rglob` stands for "recursively", so use the word in the description. Also, glob and rglob can usefully be mentioned as the pathlib equivalent of os.walk.

Automerge-Triggered-By: GH:brettcannon
3 years agogh-82116: add comment explaining use of `list(scandir_it)` in pathlib. (GH-94939)
Barney Gale [Wed, 20 Jul 2022 21:34:13 +0000 (22:34 +0100)] 
gh-82116: add comment explaining use of `list(scandir_it)` in pathlib. (GH-94939)

Automerge-Triggered-By: GH:brettcannon
3 years agoGH-91409: Don't overwrite valid locations with NOP locations (GH-95067)
Brandt Bucher [Wed, 20 Jul 2022 21:27:31 +0000 (14:27 -0700)] 
GH-91409: Don't overwrite valid locations with NOP locations (GH-95067)

3 years agogh-91102: Port 8-argument _warnings.warn_explicit to Argument Clinic (#92891)
Oleg Iarygin [Wed, 20 Jul 2022 20:24:51 +0000 (23:24 +0300)] 
gh-91102: Port 8-argument _warnings.warn_explicit to Argument Clinic (#92891)

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
3 years agogh-90016: Deprecate default sqlite3 adapters and converters (#94276)
Erlend Egeberg Aasland [Wed, 20 Jul 2022 19:37:59 +0000 (21:37 +0200)] 
gh-90016: Deprecate default sqlite3 adapters and converters (#94276)

Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>
3 years agoGH-94382: port multiprocessing static types to heap types (#94336)
Kumar Aditya [Wed, 20 Jul 2022 19:26:01 +0000 (00:56 +0530)] 
GH-94382: port multiprocessing static types to heap types (#94336)

3 years agogh-54781: Move NEWS item to Tests, and improve wording (#95063)
Erlend Egeberg Aasland [Wed, 20 Jul 2022 19:23:59 +0000 (21:23 +0200)] 
gh-54781: Move NEWS item to Tests, and improve wording (#95063)

3 years agogh-94998: Remove redundant condition in test_sqlite3/__main__.py (#95052)
Erlend Egeberg Aasland [Wed, 20 Jul 2022 16:07:47 +0000 (18:07 +0200)] 
gh-94998: Remove redundant condition in test_sqlite3/__main__.py (#95052)

3 years agogh-94844: Add pathlib support to shutil archive management (GH-94846)
Oleg Iarygin [Wed, 20 Jul 2022 15:55:12 +0000 (18:55 +0300)] 
gh-94844: Add pathlib support to shutil archive management (GH-94846)

Co-authored-by: Barney Gale <barney.gale@gmail.com>
3 years agoGH-94851: fix immortal objects refcounting in compiler (gh-95040)
Kumar Aditya [Wed, 20 Jul 2022 09:53:27 +0000 (15:23 +0530)] 
GH-94851: fix immortal objects refcounting in compiler (gh-95040)

3 years agogh-90654: Remove unneeded blank line (#95044)
Terry Jan Reedy [Wed, 20 Jul 2022 09:38:56 +0000 (05:38 -0400)] 
gh-90654: Remove unneeded blank line (#95044)

3 years agogh-90654: Add item missing from idlelib/NEWS.txt (#95038)
Terry Jan Reedy [Wed, 20 Jul 2022 07:18:10 +0000 (03:18 -0400)] 
gh-90654: Add item missing from idlelib/NEWS.txt (#95038)

3 years agogh-93939: Use new MODULE_name_STATE in wasm_assets script (GH-95035)
Christian Heimes [Wed, 20 Jul 2022 06:53:26 +0000 (08:53 +0200)] 
gh-93939: Use new MODULE_name_STATE in wasm_assets script (GH-95035)

3 years agoGH-90699: fix ref counting of static immortal strings (gh-94850)
Kumar Aditya [Wed, 20 Jul 2022 06:23:30 +0000 (11:53 +0530)] 
GH-90699: fix ref counting of static immortal strings (gh-94850)

3 years agoRemove blurb boilerplate from news item (#95033)
Terry Jan Reedy [Wed, 20 Jul 2022 05:48:35 +0000 (01:48 -0400)] 
Remove blurb boilerplate from news item (#95033)

3 years agogh-95007: Remove the NoneType return converter (GH-95019)
Serhiy Storchaka [Wed, 20 Jul 2022 05:42:02 +0000 (08:42 +0300)] 
gh-95007: Remove the NoneType return converter (GH-95019)

It has confusing semantic which does not provide any benefit (the
only difference is that you should write "return Py_None" instead
of "Py_RETURN_NONE"), it is not currently used, and it is broken.

3 years agogh-93370: Don't print deprecated pysqlite version in test_sqlite3 (#95017)
Erlend Egeberg Aasland [Tue, 19 Jul 2022 21:04:20 +0000 (23:04 +0200)] 
gh-93370: Don't print deprecated pysqlite version in test_sqlite3 (#95017)

3 years agogh-91256: Ensure help text has the program name even before getpath is called (GH...
Steve Dower [Tue, 19 Jul 2022 18:39:11 +0000 (19:39 +0100)] 
gh-91256: Ensure help text has the program name even before getpath is called (GH-94929)

3 years agogh-93678: move normalize_basic_block and extend_block call into optimize_cfg (GH...
Irit Katriel [Tue, 19 Jul 2022 16:48:56 +0000 (17:48 +0100)] 
gh-93678: move normalize_basic_block and extend_block call into optimize_cfg (GH-95002)

3 years agoGH-91153: Handle mutating __index__ methods in bytearray item assignment (GH-94891)
Brandt Bucher [Tue, 19 Jul 2022 16:42:40 +0000 (09:42 -0700)] 
GH-91153: Handle mutating __index__ methods in bytearray item assignment (GH-94891)

3 years agoGH-94979: Pop the exception stack when jumping out of exception handlers. (#95003)
Mark Shannon [Tue, 19 Jul 2022 15:33:18 +0000 (16:33 +0100)] 
GH-94979: Pop the exception stack when jumping out of exception handlers. (#95003)

3 years agotest_concurrent_futures: Fix unneeded/confusing format call (#93119)
Florian Bruhin [Tue, 19 Jul 2022 02:12:40 +0000 (19:12 -0700)] 
test_concurrent_futures: Fix unneeded/confusing format call (#93119)

Added in 339fd46cb764277cbbdc3e78dcc5b45b156bb6ae - but as noted in a comment, the test only tests ThreadPoolExecutor.

3 years agogh-94673: [c-analyzer] Add a Script to Identify Static Types (#94989)
Eric Snow [Tue, 19 Jul 2022 01:03:57 +0000 (19:03 -0600)] 
gh-94673: [c-analyzer] Add a Script to Identify Static Types (#94989)

issue: https://github.com/python/cpython/issues/94673

3 years agogh-94949: Disallow parsing parenthesised ctx mgr with old feature_version (#94950)
Shantanu [Mon, 18 Jul 2022 21:10:49 +0000 (14:10 -0700)] 
gh-94949: Disallow parsing parenthesised ctx mgr with old feature_version (#94950)

* gh-94949: Disallow parsing parenthesised ctx manager with old feature_version

* 📜🤖 Added by blurb_it.

* Allow it with feature_version=(3, 9) as well

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
3 years agoRevert "gh-93910: [Enum] restore member.member restriction while keeping performance...
Ethan Furman [Mon, 18 Jul 2022 20:22:52 +0000 (13:22 -0700)] 
Revert "gh-93910: [Enum] restore member.member restriction while keeping performance boost (GH-94913)" (#94985)

This reverts commit c20186c3972ff38577c4c5e32ca86748210983d2.

3 years agoRevert "gh-94816: Improve coverage of decode_linetable (GH-94853)" (GH-94982)
Michael Droettboom [Mon, 18 Jul 2022 20:08:31 +0000 (16:08 -0400)] 
Revert "gh-94816: Improve coverage of decode_linetable (GH-94853)" (GH-94982)

This reverts commit 20b9d2a658059c8c1624400f60bb6ba19a31ee9b.

3 years agoFix documentation to include possible Exception (#94818)
Guy Yagev [Mon, 18 Jul 2022 19:31:17 +0000 (22:31 +0300)] 
Fix documentation to include possible Exception (#94818)

3 years agoFix incorrect double indent in ast doc (#94976)
Terry Jan Reedy [Mon, 18 Jul 2022 17:24:18 +0000 (13:24 -0400)] 
Fix incorrect double indent in ast doc (#94976)

Warning directive indent was 4 rather than 3 spaces.

3 years agoGH-94822: Don't specialize when metaclasses are involved (GH-94892)
Brandt Bucher [Mon, 18 Jul 2022 17:10:22 +0000 (10:10 -0700)] 
GH-94822: Don't specialize when metaclasses are involved (GH-94892)

3 years agoRemove out of date reference to YIELD_FROM from docs. (#94966)
Mark Shannon [Mon, 18 Jul 2022 17:04:07 +0000 (18:04 +0100)] 
Remove out of date reference to YIELD_FROM from docs. (#94966)

3 years agoIn ast doc, update 'below' to 'above' (#94967)
Terry Jan Reedy [Mon, 18 Jul 2022 16:38:52 +0000 (12:38 -0400)] 
In ast doc, update 'below' to 'above' (#94967)

The included asdl file was moved from 'below' to 'above' in 3.9.

3 years agoGH-94893: Ignore caches when adding LOAD_FAST_CHECKs (GH-94894)
Brandt Bucher [Mon, 18 Jul 2022 16:00:41 +0000 (09:00 -0700)] 
GH-94893: Ignore caches when adding LOAD_FAST_CHECKs (GH-94894)

3 years agogh-94930: skipitem() in getargs.c should return non-NULL on error (GH-94931)
Serhiy Storchaka [Mon, 18 Jul 2022 15:07:31 +0000 (18:07 +0300)] 
gh-94930: skipitem() in getargs.c should return non-NULL on error (GH-94931)

3 years agoGH-94739: Mark stacks of exception handling blocks for setting frame.f_lineno in...
Mark Shannon [Mon, 18 Jul 2022 15:06:42 +0000 (16:06 +0100)] 
GH-94739: Mark stacks of exception handling blocks for setting frame.f_lineno in the debugger. (GH-94958)

3 years agoGH-94857: fix test_io refleak (GH-94858)
Kumar Aditya [Mon, 18 Jul 2022 13:48:04 +0000 (19:18 +0530)] 
GH-94857: fix test_io refleak (GH-94858)

3 years agogh-94947: Disallow parsing walrus with feature_version < (3, 8) (#94948)
Shantanu [Mon, 18 Jul 2022 09:20:12 +0000 (02:20 -0700)] 
gh-94947: Disallow parsing walrus with feature_version < (3, 8) (#94948)

* gh-94947: Disallow parsing walrus with feature_version < (3, 8)

* oops, commit the parser

* 📜🤖 Added by blurb_it.

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
3 years agogh-94847: Don't force inlining in debug builds of libmpdec (GH-94848)
Christian Heimes [Mon, 18 Jul 2022 06:47:03 +0000 (08:47 +0200)] 
gh-94847: Don't force inlining in debug builds of libmpdec (GH-94848)

3 years agogh-94601: [Enum] fix inheritance for __str__ and friends (GH-94942)
Ethan Furman [Mon, 18 Jul 2022 01:51:04 +0000 (18:51 -0700)] 
gh-94601: [Enum] fix inheritance for __str__ and friends (GH-94942)

3 years agogh-72889: Remove redundant mock.Mock()._is_coroutine = False workarounds (#94926)
Thomas Grainger [Sun, 17 Jul 2022 17:21:58 +0000 (18:21 +0100)] 
gh-72889: Remove redundant mock.Mock()._is_coroutine = False workarounds (#94926)

3 years agogh-91348: Restore frame argument to sys._getframe audit event (GH-94928)
Steve Dower [Sun, 17 Jul 2022 15:11:24 +0000 (16:11 +0100)] 
gh-91348: Restore frame argument to sys._getframe audit event (GH-94928)

3 years agogh-92348: Add quotes to support building on Windows with spaces in directory name...
Steve Dower [Sun, 17 Jul 2022 14:20:24 +0000 (15:20 +0100)] 
gh-92348: Add quotes to support building on Windows with spaces in directory name (GH-94925)

3 years agogh-91181: Add a What's New entry for dropping bytes support for `sys.path` (GH-94918)
Brett Cannon [Sun, 17 Jul 2022 02:14:40 +0000 (19:14 -0700)] 
gh-91181: Add a What's New entry for dropping bytes support for `sys.path` (GH-94918)

3 years agogh-93910: [Enum] restore member.member restriction while keeping performance boost...
Ethan Furman [Sun, 17 Jul 2022 01:13:57 +0000 (18:13 -0700)] 
gh-93910: [Enum] restore member.member restriction while keeping performance boost (GH-94913)

3 years agogh-91181: drop support for bytes on sys.path (GH-31934)
Thomas Grainger [Sun, 17 Jul 2022 01:07:53 +0000 (02:07 +0100)] 
gh-91181: drop support for bytes on sys.path (GH-31934)

Support for bytes broke sometime between Python 3.2 and 3.6 and has been broken ever since. Trying to bring back supports is surprisingly difficult in the face of -b and checking for keys in sys.path_importer_cache. Since the support was broken for so long, trying to overcome the difficulty of bringing back the support has been deemed not worth it.

Co-authored-by: Eryk Sun <eryksun@gmail.com>
Co-authored-by: Brett Cannon <brett@python.org>
3 years agogh-94869: Fix the location in some expressions for multi-line f-string ast nodes...
Pablo Galindo Salgado [Sat, 16 Jul 2022 18:51:53 +0000 (19:51 +0100)] 
gh-94869: Fix the location in some expressions for multi-line f-string ast nodes (#94895)

3 years agogh-90844: Allow virtual environments to correctly launch when they have spaces in...
Steve Dower [Sat, 16 Jul 2022 16:38:36 +0000 (17:38 +0100)] 
gh-90844: Allow virtual environments to correctly launch when they have spaces in the path (GH-94903)

3 years agogh-94698: add Subscript and Attribute targets to ast.for documentation (GH-94901)
anilbey [Sat, 16 Jul 2022 11:26:43 +0000 (12:26 +0100)] 
gh-94698: add Subscript and Attribute targets to ast.for documentation (GH-94901)

### Summary

Add Attribute and Subscript as possible targets for the "ast for loop documentation".

Automerge-Triggered-By: GH:isidentical
3 years agogh-94772: Fix off-by-one error in Windows launcher (GH-94779)
Paul Moore [Sat, 16 Jul 2022 09:02:22 +0000 (10:02 +0100)] 
gh-94772: Fix off-by-one error in Windows launcher (GH-94779)

3 years ago[3.11] bpo-14916: interactive fd is not tied to stdin [type-bug] (#91469)
Paul m. p. Peny [Sat, 16 Jul 2022 08:35:19 +0000 (10:35 +0200)] 
[3.11] bpo-14916: interactive fd is not tied to stdin [type-bug] (#91469)

* bpo-14916: interactive fd is not always stdin

related to https://github.com/python/cpython/pull/31006 merged bugfix

following https://bugs.python.org/issue14916

* 📜🤖 Added by blurb_it.

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
3 years agoTutorial sys.argv example should not have interactive prompt (GH-94880)
Marco Buttu [Sat, 16 Jul 2022 02:10:19 +0000 (04:10 +0200)] 
Tutorial sys.argv example should not have interactive prompt (GH-94880)

3 years agoAdd additional pointers to pathlib's mapping to os.path functions (#94828)
Chris Adams [Fri, 15 Jul 2022 22:09:27 +0000 (18:09 -0400)] 
Add additional pointers to pathlib's mapping to os.path functions (#94828)

* Add additional pointers to pathlib's mapping to os.path functions

os.path.splitext has a somewhat quirky signature since it mixes the path and filename components but I wanted the documentation to mention `PurePath.stem` as the natural counterpart to `PurePath.suffix` for the common use of `os.path.splitext` to turn "file.py" into "file" and "py".

Technically this could have some discussion of how to handle the parent directory hierarchy but that seems a bit out of keeping with the spirit of this table so I omitted mentioning `PurePath.parents` here.

* Update Doc/library/pathlib.rst

Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
3 years agogh-94814: Improve coverage of _PyCode_CreateLineArray (GH-94852)
Michael Droettboom [Fri, 15 Jul 2022 17:00:27 +0000 (13:00 -0400)] 
gh-94814: Improve coverage of _PyCode_CreateLineArray (GH-94852)

The case where there are more than (1 << 15) lines was not covered.

I don't know if increasing test coverage requires a blurb -- let me know if it does.

Automerge-Triggered-By: GH:brandtbucher
3 years agogh-94801: Use custom flags to check for headers and libs (#94802)
Christian Heimes [Fri, 15 Jul 2022 12:48:01 +0000 (14:48 +0200)] 
gh-94801: Use custom flags to check for headers and libs (#94802)

3 years agogh-94821: Fix autobind of empty unix domain address (GH-94826)
Nir Soffer [Fri, 15 Jul 2022 06:13:33 +0000 (09:13 +0300)] 
gh-94821: Fix autobind of empty unix domain address (GH-94826)

When binding a unix socket to an empty address on Linux, the socket is
automatically bound to an available address in the abstract namespace.

    >>> s = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
    >>> s.bind("")
    >>> s.getsockname()
    b'\x0075499'

Since python 3.9, the socket is bound to the one address:

    >>> s.getsockname()
    b'\x00'

And trying to bind multiple sockets will fail with:

    Traceback (most recent call last):
      File "/home/nsoffer/src/cpython/Lib/test/test_socket.py", line 5553, in testAutobind
        s2.bind("")
    OSError: [Errno 98] Address already in use

Added 2 tests:
- Auto binding empty address on Linux
- Failing to bind an empty address on other platforms

Fixes f6b3a07b7df6 (bpo-44493: Add missing terminated NUL in sockaddr_un's length (GH-26866)

3 years ago[doc] Update cookbook example and add information about queue types. (GH-94854)
Vinay Sajip [Fri, 15 Jul 2022 05:03:58 +0000 (06:03 +0100)] 
[doc] Update cookbook example and add information about queue types. (GH-94854)

3 years agoGH-46771: docs for asyncio.timeout and task cancellation (#94794)
Tin Tvrtković [Fri, 15 Jul 2022 02:38:38 +0000 (04:38 +0200)] 
GH-46771: docs for asyncio.timeout and task cancellation (#94794)

3 years agogh-94808: Add coverage for boolobject.c:bool_new (GH-94859)
Michael Droettboom [Thu, 14 Jul 2022 23:53:06 +0000 (19:53 -0400)] 
gh-94808: Add coverage for boolobject.c:bool_new (GH-94859)

`bool_new` had no coverage.

Automerge-Triggered-By: GH:brandtbucher
3 years agoDocs: fix typo in sqlite3.rst (#94798)
Ikko Ashimine [Thu, 14 Jul 2022 21:47:46 +0000 (06:47 +0900)] 
Docs: fix typo in sqlite3.rst (#94798)

Colum -> Column

3 years agoGH-94808: Cover handling non-finite numbers from round when ndigits is provided ...
Michael Droettboom [Thu, 14 Jul 2022 21:46:40 +0000 (17:46 -0400)] 
GH-94808: Cover handling non-finite numbers from round when ndigits is provided (GH-94860)

3 years agogh-94816: Improve coverage of decode_linetable (GH-94853)
Michael Droettboom [Thu, 14 Jul 2022 21:34:50 +0000 (17:34 -0400)] 
gh-94816: Improve coverage of decode_linetable (GH-94853)

This makes calls to co_lnotab to exercise this code, as well
as generating synthetically large code to exercise the corner
cases where line numbers need multiple bytes.

Automerge-Triggered-By: GH:brandtbucher
3 years agogh-94841: Ensure arena_map_get() is inlined in PyObject_Free() (#94842)
neonene [Thu, 14 Jul 2022 18:33:25 +0000 (03:33 +0900)] 
gh-94841: Ensure arena_map_get() is inlined in PyObject_Free() (#94842)

3 years agogh-94731: Revert to C-style casts for _Py_CAST (GH-94782)
Petr Viktorin [Thu, 14 Jul 2022 09:57:18 +0000 (11:57 +0200)] 
gh-94731: Revert to C-style casts for _Py_CAST (GH-94782)

Co-authored-by: da-woods <dw-git@d-woods.co.uk>
3 years agogh-93939: Build C extensions without setup.py (GH-94474)
Christian Heimes [Thu, 14 Jul 2022 07:51:49 +0000 (09:51 +0200)] 
gh-93939: Build C extensions without setup.py (GH-94474)

Combines GH-93940, GH-94452, and GH-94433

3 years agogh-94309: Add typing.Hashable and typing.Sized for "What's New for Python 3.12" ...
MonadChains [Thu, 14 Jul 2022 06:50:31 +0000 (08:50 +0200)] 
gh-94309: Add typing.Hashable and typing.Sized for "What's New for Python 3.12" (GH-94729)

Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
3 years agoidlelib: replace 'while 1' with 'while True' (#94827)
Terry Jan Reedy [Thu, 14 Jul 2022 01:09:07 +0000 (21:09 -0400)] 
idlelib: replace 'while 1' with 'while True' (#94827)

3 years agogh-90359: Unify documentation style for datetime.rst (gh-94836)
Dong-hee Na [Thu, 14 Jul 2022 00:40:10 +0000 (09:40 +0900)] 
gh-90359: Unify documentation style for datetime.rst (gh-94836)

3 years agogh-90359: Update documentation to follow PEP 495. (gh-94800)
Dong-hee Na [Thu, 14 Jul 2022 00:04:52 +0000 (09:04 +0900)] 
gh-90359: Update documentation to follow PEP 495. (gh-94800)

3 years agogh-94499 Add test for private name mangling in class pattern matching (#94500)
da-woods [Wed, 13 Jul 2022 16:13:10 +0000 (17:13 +0100)] 
gh-94499 Add test for private name mangling in class pattern matching (#94500)

The current status quo is that private attribute names are not
mangled when a class is matched. I've added a test to
document/legimize this behaviour.

Co-authored-by: Brandt Bucher <brandtbucher@gmail.com>
3 years agogh-90815: Fix test_embed for Windows PGO build with mimalloc (GH-94790)
neonene [Wed, 13 Jul 2022 16:08:12 +0000 (01:08 +0900)] 
gh-90815: Fix test_embed for Windows PGO build with mimalloc (GH-94790)

Fixes the failure of PGO building with `mimalloc` on Windows, ensuring that `test_bpo20891` does not break profiling data (`python31*.pgc`).

3 years agoGH-81620: Add random.binomialvariate() (GH-94719)
Raymond Hettinger [Wed, 13 Jul 2022 14:46:04 +0000 (09:46 -0500)] 
GH-81620: Add random.binomialvariate() (GH-94719)

3 years agogh-94759: Create LCOV report with branch coverage (GH-94793)
Christian Heimes [Wed, 13 Jul 2022 14:35:28 +0000 (16:35 +0200)] 
gh-94759: Create LCOV report with branch coverage (GH-94793)