]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
3 years agobpo-46685: cover `TypeError` of `ForwardRef(1)` in `test_typing` (GH-31223)
Miss Islington (bot) [Wed, 9 Feb 2022 15:12:17 +0000 (07:12 -0800)] 
bpo-46685: cover `TypeError` of `ForwardRef(1)` in `test_typing` (GH-31223)

(cherry picked from commit d2d1d49eaccaa83eb8873ba15f2fc9562143bc56)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
3 years agobpo-46678: Fix Invalid cross device link in Lib/test/support/import_helper.py (GH...
Miss Islington (bot) [Tue, 8 Feb 2022 21:04:05 +0000 (13:04 -0800)] 
bpo-46678: Fix Invalid cross device link in Lib/test/support/import_helper.py (GH-31204) (GH-31207)

In `Lib/test/support/import_helper.py`, the function `make_legacy_pyc` makes a call to `os.rename` which can fail when the source and target live on different devices. This happens (for example) when `PYTHONPYCACHEPREFIX` is set to a directory anywhere on disk, while a ramdisk is mounted on `/tmp` (the latter of which is the default on various Linux distros). Replacing `os.rename` with `shutil.move` fixes this.

Automerge-Triggered-By: GH:brettcannon
(cherry picked from commit da576e08296490e94924421af71001bcfbccb317)

Co-authored-by: Jason Wilkes <notarealdeveloper@gmail.com>
3 years ago[3.10] bpo-46521: Fix codeop to use a new partial-input mode of the parser (GH-31010...
Pablo Galindo Salgado [Tue, 8 Feb 2022 12:25:15 +0000 (12:25 +0000)] 
[3.10] bpo-46521: Fix codeop to use a new partial-input mode of the parser (GH-31010). (GH-31213)

(cherry picked from commit 69e10976b2e7682c6d57f4272932ebc19f8e8859)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
3 years ago[3.10] bpo-46676: Make ParamSpec args and kwargs equal to themselves (GH-31203) ...
Gregory Beauregard [Tue, 8 Feb 2022 08:41:13 +0000 (00:41 -0800)] 
[3.10] bpo-46676: Make ParamSpec args and kwargs equal to themselves (GH-31203) (GH-31210)

(cherry picked from commit c8b62bbe46e20d4b6dd556f2fa85960d1269aa45)

Co-authored-by: Gregory Beauregard <greg@greg.red>
3 years ago[3.10] bpo-46648: Rewrite test_urllib2.test_issue16464() with a local HTTP server...
Miss Islington (bot) [Mon, 7 Feb 2022 20:15:22 +0000 (12:15 -0800)] 
[3.10] bpo-46648: Rewrite test_urllib2.test_issue16464() with a local HTTP server (GH-31186) (GH-31189)

Re-enable test_issue16464() of test_urllib2, move it to urllib2_localnet
and use the local HTTP server rather than an external HTTP server.
(cherry picked from commit 8e98175a03fe03d62822d96007a74e5273013764)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
3 years agobpo-46638: Makes registry virtualisation setting stable when building MSIX packages...
Miss Islington (bot) [Mon, 7 Feb 2022 17:31:32 +0000 (09:31 -0800)] 
bpo-46638: Makes registry virtualisation setting stable when building MSIX packages (GH-31130)

(cherry picked from commit 3a5afc14e16370c1f4f72d43cb553298ad9a1fa4)

Co-authored-by: Steve Dower <steve.dower@python.org>
3 years ago[3.10] bpo-46655: allow stringized TypeAlias with get_type_hints (GH-31156). (#31175)
Gregory Beauregard [Mon, 7 Feb 2022 16:21:56 +0000 (08:21 -0800)] 
[3.10] bpo-46655: allow stringized TypeAlias with get_type_hints (GH-31156). (#31175)

(cherry picked from commit 77b025be4a4cd5a3bfc1b1af560cc57e8e956c98)

Co-authored-by: Gregory Beauregard <greg@greg.red>
3 years ago[3.10] bpo-46611: add coverage to instance and class checks in `typing.py` (GH-31078...
Nikita Sobolev [Mon, 7 Feb 2022 08:48:20 +0000 (11:48 +0300)] 
[3.10] bpo-46611: add coverage to instance and class checks in `typing.py` (GH-31078) (GH-31182)

(cherry picked from commit 067c03bf40d13393209f0138fa9c4d5980c4ff8a)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
3 years agobpo-40479: Fix undefined behavior in Modules/_hashopenssl.c (GH-31153)
Miss Islington (bot) [Mon, 7 Feb 2022 08:05:29 +0000 (00:05 -0800)] 
bpo-40479: Fix undefined behavior in Modules/_hashopenssl.c (GH-31153)

va_end() must be called before returning.
(cherry picked from commit 59e004af63742361b67d1e1ae70229ff0db1059d)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
3 years agoAdd more tests for variable substitution in generics (GH-31170)
Miss Islington (bot) [Sun, 6 Feb 2022 20:15:29 +0000 (12:15 -0800)] 
Add more tests for variable substitution in generics (GH-31170)

(cherry picked from commit 3da5526136034188185d6a3fdba71e2b56577ee2)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
3 years agobpo-46648: Skip test_urllib2.test_issue16464() (GH-31161)
Miss Islington (bot) [Sun, 6 Feb 2022 14:33:01 +0000 (06:33 -0800)] 
bpo-46648: Skip test_urllib2.test_issue16464() (GH-31161)

POST requests to http://www.example.com/ fail randomly.
(cherry picked from commit 1578de2fcd685c71f9c84e09bac32901dea192c1)

Co-authored-by: Victor Stinner <vstinner@python.org>
3 years ago[3.10] bpo-46609: Update asyncio-task coroutine doc (GH-31132)
Terry Jan Reedy [Fri, 4 Feb 2022 19:59:23 +0000 (14:59 -0500)] 
[3.10] bpo-46609: Update asyncio-task coroutine doc (GH-31132)

@coroutine in removed in 3.11, not 3.10.

3 years agobpo-46629: Update classicAppCompat.sccd for new signing certificate (GH-31111)
Miss Islington (bot) [Fri, 4 Feb 2022 16:34:12 +0000 (08:34 -0800)] 
bpo-46629: Update classicAppCompat.sccd for new signing certificate (GH-31111)

(cherry picked from commit 9b4e3d94a5746af093392ed8e977b26fcc1bfd11)

Co-authored-by: Steve Dower <steve.dower@python.org>
3 years agoOptimize images by IMGbot (GH-21348)
Miss Islington (bot) [Fri, 4 Feb 2022 07:31:21 +0000 (23:31 -0800)] 
Optimize images by IMGbot (GH-21348)

Co-authored-by: ImgBotApp <ImgBotHelp@gmail.com>
(cherry picked from commit ba650af7d660084e08859dd1ee1917cccee24e88)

3 years agobpo-46588: fix typo in test_calltip.py (GH-31119)
Miss Islington (bot) [Fri, 4 Feb 2022 05:11:15 +0000 (21:11 -0800)] 
bpo-46588: fix typo in test_calltip.py  (GH-31119)

(cherry picked from commit 222865daabfa7a8b12ca9a5e9c23b9ce217448f1)

Co-authored-by: Caio Agiani <agianicaio@gmail.com>
3 years agobpo-14916: use specified tokenizer fd for file input (GH-31006)
Miss Islington (bot) [Thu, 3 Feb 2022 23:32:22 +0000 (15:32 -0800)] 
bpo-14916: use specified tokenizer fd for file input (GH-31006)

@pablogsal, sorry i failed to rebase to main, so i recreated https://github.com/python/cpython/pull/22190GH-issuecomment-1024633392

> PyRun_InteractiveOne\*() functions allow to explicitily set fd instead of stdin.
but stdin was hardcoded in readline call.

> This patch does not fix target file for prompt unlike original bpo one : prompt fd is unrelated to tokenizer source which could be read only. It is more of a bugfix regarding the docs :  actual documentation say "prompt the user" so one would expect prompt to go on stdout not a file for both PyRun_InteractiveOne\*() and PyRun_InteractiveLoop\*().

Automerge-Triggered-By: GH:pablogsal
(cherry picked from commit 89b13042fcfc95bae21a49806a205ef62f1cdd73)

Co-authored-by: Paul m. p. P <mail.peny@free.fr>
3 years agobpo-46630: Fix initial focus of IDLE query dialogs (GH-31112)
Miss Islington (bot) [Thu, 3 Feb 2022 22:34:03 +0000 (14:34 -0800)] 
bpo-46630: Fix initial focus of IDLE query dialogs (GH-31112)

On Windows, one had to Tab or click on the entry box
to get a cursor and be able to enter anything.
(cherry picked from commit d1df81a730499cc6286d02afa6028a1e9c22bbbf)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
3 years agobpo-45975: IDLE - Remove extraneous parens (GH-31107)
Miss Islington (bot) [Thu, 3 Feb 2022 20:44:11 +0000 (12:44 -0800)] 
bpo-45975: IDLE - Remove extraneous parens (GH-31107)

mistakenly included in 3 files in previous PR
and backported both to 3.10 and 3.9.
(cherry picked from commit 916d0d822c79933f4c420f7a36f16f3eb788646b)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
3 years agobpo-45773: Remove invalid peephole optimizations (GH-31066)
Miss Islington (bot) [Thu, 3 Feb 2022 15:54:51 +0000 (07:54 -0800)] 
bpo-45773: Remove invalid peephole optimizations (GH-31066)

(cherry picked from commit e0433c1e70254d4d0357a9e14596929a04bdf769)

Co-authored-by: Brandt Bucher <brandt@python.org>
3 years agoAdd recipe for subslices (GH-31095)
Raymond Hettinger [Thu, 3 Feb 2022 08:12:08 +0000 (02:12 -0600)] 
Add recipe for subslices (GH-31095)

3 years ago[3.10] bpo-46576: bpo-46524: Disable compiler optimization within test_peg_generator...
Gregory P. Smith [Thu, 3 Feb 2022 04:02:59 +0000 (20:02 -0800)] 
[3.10] bpo-46576: bpo-46524: Disable compiler optimization within test_peg_generator. (GH-31015) (GH-31089)

Disable compiler optimization within test_peg_generator.

This speed up test_peg_generator by always disabling compiler
optimizations by using -O0 or equivalent when the test is building its
own C extensions.

A build not using --with-pydebug in order to speed up test execution
winds up with this test taking a very long time as it would do
repeated compilation of parser C code using the same optimization
flags as CPython was built with.

This speeds the test up 6-8x on gps-raspbian.

Also incorporate's GH-31017's win32 conditional and flags.

Co-authored-by: Kumar Aditya kumaraditya303.
(cherry picked from commit 164a017e13ee96bd1ea1ae79f5ac9e25fe83994e)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
3 years agobpo-45975: Use walrus operator for some idlelib while loops (GH-31083)
Miss Islington (bot) [Thu, 3 Feb 2022 02:28:52 +0000 (18:28 -0800)] 
bpo-45975: Use walrus operator for some idlelib while loops (GH-31083)

(cherry picked from commit 51a95be1d035a717ab29e98056b8831a98e61125)

Co-authored-by: Nick Drozd <nicholasdrozd@gmail.com>
3 years agobpo-46616: Ensures test_importlib.test_windows cleans up registry keys after completi...
Miss Islington (bot) [Wed, 2 Feb 2022 20:25:37 +0000 (12:25 -0800)] 
bpo-46616: Ensures test_importlib.test_windows cleans up registry keys after completion (GH-31086)

(cherry picked from commit 89a0a90c2e0e685bc70206fc45e4413c4f4411ed)

Co-authored-by: Steve Dower <steve.dower@python.org>
3 years ago[3.10] bpo-45173: Note configparser deprecations will be removed in 3.12 (GH-31084)
Hugo van Kemenade [Wed, 2 Feb 2022 18:41:30 +0000 (20:41 +0200)] 
[3.10] bpo-45173: Note configparser deprecations will be removed in 3.12 (GH-31084)

Cherry-pick of [`b06e9ba`](https://github.com/python/cpython/pull/30952/commits/b06e9ba398fafe39028c3b2dc3943266a16b1416) from https://github.com/python/cpython/pull/30952.

3 years agoFix minor details in the Counter docs (GH-31029) (GH-31072)
Miss Islington (bot) [Wed, 2 Feb 2022 05:28:07 +0000 (21:28 -0800)] 
Fix minor details in the Counter docs (GH-31029) (GH-31072)

3 years agobpo-44359: Fix test_ftplib unhandled thread exceptions (GH-31069)
Miss Islington (bot) [Wed, 2 Feb 2022 02:12:27 +0000 (18:12 -0800)] 
bpo-44359: Fix test_ftplib unhandled thread exceptions (GH-31069)

test_ftplib now silently ignores socket errors to prevent logging
unhandled threading exceptions.
(cherry picked from commit 0611eafc709cbe8a2a0bdde082d25df0c5034de7)

Co-authored-by: Victor Stinner <vstinner@python.org>
3 years agobpo-46591: Make About IDLE doc link label clickable (GH-30251)
Miss Islington (bot) [Wed, 2 Feb 2022 01:47:51 +0000 (17:47 -0800)] 
bpo-46591: Make About IDLE doc link label clickable (GH-30251)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
(cherry picked from commit 53c78080573b3bae4c4e782b9f47dce48aac9688)

Co-authored-by: Wes <5124946+wesinator@users.noreply.github.com>
3 years agobpo-46487: Add `get_write_buffer_limits` to Write and _SSLProtocol transports (GH...
Miss Islington (bot) [Tue, 1 Feb 2022 19:30:03 +0000 (11:30 -0800)] 
bpo-46487: Add `get_write_buffer_limits` to Write and _SSLProtocol transports (GH-30958)

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
(cherry picked from commit 64568acbd88a88d54ac9b8215447f88280448dd5)

Co-authored-by: Emiya <importz750@gmail.com>
3 years agobpo-45925: Update macOS installer to SQLite 3.37.2 (GH-30921) (GH-31057)
Ned Deily [Tue, 1 Feb 2022 16:29:02 +0000 (11:29 -0500)] 
bpo-45925: Update macOS installer to SQLite 3.37.2 (GH-30921) (GH-31057)

Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
3 years ago[3.10] bpo-46584: remove check for `py2.3` from `ctypes/test_python_api` (GH-31024...
Miss Islington (bot) [Tue, 1 Feb 2022 14:42:37 +0000 (06:42 -0800)] 
[3.10] bpo-46584: remove check for `py2.3` from `ctypes/test_python_api` (GH-31024) (GH-31054)

(cherry picked from commit 913e340a323c7e61ae6e4acbb1312b4342657bec)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
3 years agobpo-44031: fix test_tabnanny failure in non-ascii CWD (GH-31014)
Miss Islington (bot) [Tue, 1 Feb 2022 11:20:07 +0000 (03:20 -0800)] 
bpo-44031: fix test_tabnanny failure in non-ascii CWD (GH-31014)

(cherry picked from commit 108e66b6d23efd0fc2966163ead9434b328c5f17)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
3 years agobpo-46482: add a test for `typing.Annotation.__new__` (GH-30821)
Miss Islington (bot) [Tue, 1 Feb 2022 10:27:36 +0000 (02:27 -0800)] 
bpo-46482: add a test for `typing.Annotation.__new__` (GH-30821)

(cherry picked from commit 4c0612ad00ba45dbea2a86f7db6d21546cf243f8)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
3 years agobpo-46542: test_lib2to3 uses support.infinite_recursion() (GH-31035)
Miss Islington (bot) [Mon, 31 Jan 2022 20:03:40 +0000 (12:03 -0800)] 
bpo-46542: test_lib2to3 uses support.infinite_recursion() (GH-31035)

* bpo-46542: test_lib2to3 uses support.infinite_recursion()

Fix a Python crash in test_lib2to3 when using Python built in debug
mode: limit the recursion limit.

The test_all_project_files() test of test_lib2to3 now uses the
test.support.infinite_recursion() context manager when processing the
infinite_recursion.py file to prevent a crash when Python is built in
debug mode.

The two test_all_project_files() tests now use subTest() and log the
refactored/parsed filename (if test_lib2to3 is run in verbose mode).

* Update Lib/lib2to3/tests/data/infinite_recursion.py

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
(cherry picked from commit ee0ac328d38a86f7907598c94cb88a97635b32f8)

Co-authored-by: Victor Stinner <vstinner@python.org>
3 years agobpo-26552: Fixed case where failing `asyncio.ensure_future` did not close the corouti...
Kumar Aditya [Sat, 29 Jan 2022 06:57:18 +0000 (12:27 +0530)] 
bpo-26552: Fixed case where failing `asyncio.ensure_future` did not close the coroutine (#30288) (#31003)

3 years agobpo-46560: Fix a typo in `typing.ParamSpec's` doc string (GH-30995)
Miss Islington (bot) [Fri, 28 Jan 2022 18:36:16 +0000 (10:36 -0800)] 
bpo-46560: Fix a typo in `typing.ParamSpec's` doc string (GH-30995)

(cherry picked from commit ffa505b580464d9d90c29e69bd4db8c52275280a)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
3 years agobpo-45925: Update Windows installer to SQLite 3.37.2 (GH-30485)
Steve Dower [Fri, 28 Jan 2022 17:13:22 +0000 (17:13 +0000)] 
bpo-45925: Update Windows installer to SQLite 3.37.2 (GH-30485)

Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
3 years agobpo-46530: add `"thread_time"` to `test_time.test_get_clock_info` (GH-30913)
Miss Islington (bot) [Fri, 28 Jan 2022 16:56:50 +0000 (08:56 -0800)] 
bpo-46530: add `"thread_time"` to `test_time.test_get_clock_info` (GH-30913)

(cherry picked from commit c27a33132be101e246ae2584f1826477357138d6)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
3 years agobpo-46542: test_json uses support.infinite_recursion() (GH-30972)
Miss Islington (bot) [Fri, 28 Jan 2022 00:57:07 +0000 (16:57 -0800)] 
bpo-46542: test_json uses support.infinite_recursion() (GH-30972)

Fix test_json tests checking for RecursionError: modify these tests
to use support.infinite_recursion().
(cherry picked from commit e7a6285f1be18992191599792524d3aa6aedfa55)

Co-authored-by: Victor Stinner <vstinner@python.org>
3 years agobpo-29844: Remove obsolete paragraph from Tools/msi/README.txt (GH-29141)
Miss Islington (bot) [Thu, 27 Jan 2022 16:59:20 +0000 (08:59 -0800)] 
bpo-29844: Remove obsolete paragraph from Tools/msi/README.txt (GH-29141)

(cherry picked from commit 098a33f6a60ca2df88e03024ac9d8da507cfa5c8)

3 years agobpo-46539: Pass status of special typeforms to forward references (GH-30926)
Miss Islington (bot) [Thu, 27 Jan 2022 16:48:08 +0000 (08:48 -0800)] 
bpo-46539: Pass status of special typeforms to forward references (GH-30926)

Previously this didn't matter because there weren't any valid code paths
that could trigger a type check with a special form, but after the bug
fix for `Annotated` wrapping special forms it's now possible to annotate
something like `Annotated['ClassVar[int]', (3, 4)]`. This change would
also be needed for proposed future changes, such as allowing `ClassVar`
and `Final` to nest each other in dataclasses.
(cherry picked from commit ced50051bb752a7c1e616f4b0c001f37f0354f32)

Co-authored-by: Gregory Beauregard <greg@greg.red>
3 years agobpo-44734: Fix floating point precision in test_turtle (GH-30910)
Miss Islington (bot) [Thu, 27 Jan 2022 14:21:15 +0000 (06:21 -0800)] 
bpo-44734: Fix floating point precision in test_turtle (GH-30910)

(cherry picked from commit aa78287bc6d1c4fc07ee134642eb72db67b771a0)

Co-authored-by: Karolina Surma <33810531+befeleme@users.noreply.github.com>
3 years ago[3.10] bpo-45703: Invalidate _NamespacePath cache on importlib.invalidate_cache ...
Petr Viktorin [Thu, 27 Jan 2022 14:00:23 +0000 (15:00 +0100)] 
[3.10] bpo-45703: Invalidate _NamespacePath cache on importlib.invalidate_cache (GH-29384) (GH-30922)

Consider the following directory structure:

    .
    └── PATH1
        └── namespace
            └── sub1
                └── __init__.py

And both PATH1 and PATH2 in sys path:

    $ PYTHONPATH=PATH1:PATH2 python3.11
    >>> import namespace
    >>> import namespace.sub1
    >>> namespace.__path__
    _NamespacePath(['.../PATH1/namespace'])
    >>> ...

While this interpreter still runs, PATH2/namespace/sub2 is created:

    .
    ├── PATH1
    │   └── namespace
    │       └── sub1
    │           └── __init__.py
    └── PATH2
        └── namespace
            └── sub2
                └── __init__.py

The newly created module cannot be imported:

    >>> ...
    >>> namespace.__path__
    _NamespacePath(['.../PATH1/namespace'])
    >>> import namespace.sub2
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
    ModuleNotFoundError: No module named 'namespace.sub2'

Calling importlib.invalidate_caches() now newly allows to import it:

    >>> import importlib
    >>> importlib.invalidate_caches()
    >>> namespace.__path__
    _NamespacePath(['.../PATH1/namespace'])
    >>> import namespace.sub2
    >>> namespace.__path__
    _NamespacePath(['.../PATH1/namespace', '.../PATH2/namespace'])

This was not previously possible.

3 years agobpo-44791: Fix substitution of ParamSpec in Concatenate with different parameter...
Miss Islington (bot) [Thu, 27 Jan 2022 13:01:24 +0000 (05:01 -0800)] 
bpo-44791: Fix substitution of ParamSpec in Concatenate with different parameter expressions (GH-27518)

* Substitution with a list of types returns now a tuple of types.
* Substitution with Concatenate returns now a Concatenate with
  concatenated lists of arguments.
* Substitution with Ellipsis is not supported.
(cherry picked from commit ecfacc362dd7fef7715dcd94f2e2ca6c622ef115)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
3 years ago[3.10] bpo-23556: [doc] Fix inaccuracy in documentation for raise without args. Impro...
Miss Islington (bot) [Thu, 27 Jan 2022 10:51:06 +0000 (02:51 -0800)] 
[3.10] bpo-23556: [doc] Fix inaccuracy in documentation for raise without args. Improve tests for context in nested except handlers.  (GH-29236) (GH-30953)

(cherry picked from commit 08c0ed2d9c0d01ad1a5adc0787bc75e4e90cbb85)

Co-authored-by: Kinshuk Dua <kinshukdua@gmail.com>
Automerge-Triggered-By: GH:iritkatriel
3 years agobpo-42982: Improve the text on suggested number of iterations of PBKDF2 (GH-24276)
Miss Islington (bot) [Thu, 27 Jan 2022 09:01:30 +0000 (01:01 -0800)] 
bpo-42982: Improve the text on suggested number of iterations of PBKDF2 (GH-24276)

Less specific number wording (as there is no one right number - the old 100k is too big for some applications and woefully small for others). We now link to NIST SP 800-132 to tell people what to read in there on how to decide for their application.

Co-authored-by: Gregory P. Smith <greg@krypto.org> [Google]
(cherry picked from commit 897ce9018775bcd679fb49aa17258f8f6e818e23)

Co-authored-by: Illia Volochii <illia.volochii@gmail.com>
3 years agobpo-46496: news11-10 for bpo45296 (GH-30937)
Miss Islington (bot) [Thu, 27 Jan 2022 04:05:42 +0000 (20:05 -0800)] 
bpo-46496: news11-10 for bpo45296 (GH-30937)

(cherry picked from commit 9f0881476e0113d3a35e0ffa96649b9276dd75c5)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
3 years agobpo-45296: Clarify close, quit, and exit in IDLE (GH-30936) (GH-30944)
Miss Islington (bot) [Thu, 27 Jan 2022 03:55:25 +0000 (19:55 -0800)] 
bpo-45296: Clarify close, quit, and exit in IDLE (GH-30936) (GH-30944)

In the File menu, 'Close' and 'Exit' are now 'Close Window' (the current
one) and 'Exit' is now 'Exit IDLE' (by closing all windows).
In Shell, 'quit()' and 'exit()' mean 'close Shell'.
If there are no other windows, this also exits IDLE.
(cherry picked from commit fcde0bc10ddd836b62d0a8e893d80b8c55e0ba3f)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
3 years ago[3.10] bpo-46502: Remove "How do I tell incomplete input" from FAQ (GH-30925) (GH...
Pablo Galindo Salgado [Thu, 27 Jan 2022 00:16:50 +0000 (00:16 +0000)] 
[3.10] bpo-46502: Remove "How do I tell incomplete input" from FAQ (GH-30925) (GH-30933)

Since,

- Py_CompileString no longer allows to distinguish "incomplete input"
  from "invalid input"
- there is no alternative solution available from the Python C API
  due to how the new parser works (rewritten in 3.9)
- the only supported way is to manually import the codeop module from C
  and use its API as IDLE does, and accept its own complications

it is desirable to remove this Q&A from the official FAQ..
(cherry picked from commit f0a648152f2d8011f47cc49873438ebaf01d3f82)

Co-authored-by: Mateusz Łoskot <mateusz@loskot.net>
Co-authored-by: Mateusz Łoskot <mateusz@loskot.net>
3 years agobpo-38472: setup.py uses LC_ALL=C to check the C compiler (GH-30929)
Miss Islington (bot) [Wed, 26 Jan 2022 23:49:53 +0000 (15:49 -0800)] 
bpo-38472: setup.py uses LC_ALL=C to check the C compiler (GH-30929)

Fix GCC detection in setup.py when cross-compiling. The C compiler is
now run with LC_ALL=C. Previously, the detection failed with a German
locale.
(cherry picked from commit a9503ac39474a9cb1b1935ddf159c0d9672b04b6)

Co-authored-by: Victor Stinner <vstinner@python.org>
3 years agobpo-43698: do not use `...` as argument name in docs (GH-30502)
Miss Islington (bot) [Wed, 26 Jan 2022 12:42:26 +0000 (04:42 -0800)] 
bpo-43698: do not use `...` as argument name in docs (GH-30502)

(cherry picked from commit b9d8980d89bfaa4bf16d60f0488adcc9d2cbf5ef)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
3 years ago[3.10] bpo-46513: Remove AC_C_CHAR_UNSIGNED / __CHAR_UNSIGNED__ (GH-30851) (GH-30914)
Christian Heimes [Wed, 26 Jan 2022 11:20:31 +0000 (13:20 +0200)] 
[3.10] bpo-46513: Remove AC_C_CHAR_UNSIGNED / __CHAR_UNSIGNED__ (GH-30851) (GH-30914)

Co-authored-by: Christian Heimes <christian@python.org>
3 years agobpo-46529: increase coverage of `typing.Union.__repr__` method (GH-30911)
Miss Islington (bot) [Wed, 26 Jan 2022 10:39:40 +0000 (02:39 -0800)] 
bpo-46529: increase coverage of `typing.Union.__repr__` method (GH-30911)

(cherry picked from commit d0c690b5f85c679de6059cf353fe0524e905530e)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
3 years agobpo-48146: Update IDLE part of What's New 3.10 to 2022 (GH-30906)
Miss Islington (bot) [Wed, 26 Jan 2022 07:04:52 +0000 (23:04 -0800)] 
bpo-48146: Update IDLE part of What's New 3.10 to 2022 (GH-30906)

(cherry picked from commit 4a49fa6ca66664383d406dbf6f6c28289ffeeeaa)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
3 years agobpo-41844: Update IDLE part of What's New 3.9 to 20228 (GH-30905)
Miss Islington (bot) [Wed, 26 Jan 2022 05:10:53 +0000 (21:10 -0800)] 
bpo-41844: Update IDLE part of What's New 3.9 to 20228 (GH-30905)

(cherry picked from commit 7cf285d82ec722d4225297366013e924805171f2)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
3 years ago[3.10] bpo-46091: Correctly calculate indentation levels for whitespace lines with...
Pablo Galindo Salgado [Tue, 25 Jan 2022 22:33:57 +0000 (22:33 +0000)] 
[3.10] bpo-46091: Correctly calculate indentation levels for whitespace lines with continuation characters (GH-30130). (GH-30898)

(cherry picked from commit a0efc0c1960e2c49e0092694d98395555270914c)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
3 years ago[3.10] bpo-45382: test.pythoninfo logs more Windows versions (GH-30891)
Victor Stinner [Tue, 25 Jan 2022 20:20:34 +0000 (21:20 +0100)] 
[3.10] bpo-45382: test.pythoninfo logs more Windows versions (GH-30891)

Add the following info to test.pythoninfo:

* windows.ver: output of the shell "ver" command
* windows.version and windows.version_caption: output of the
  "wmic os get Caption,Version /value" command.

(cherry picked from commit b0898f4aa90d9397e23aef98a2d6b82445ee7455)

* bpo-45382: test.pythoninfo: set wmic.exe encoding to OEM (GH-30890)

(cherry picked from commit cef0a5458f254c2f8536b928dee25862ca90ffa6)

3 years agobpo-41682: fixed flaky test test_sendfile_close_peer_in_the_middle_of_receiving ...
Miss Islington (bot) [Tue, 25 Jan 2022 17:40:13 +0000 (09:40 -0800)] 
bpo-41682: fixed flaky test test_sendfile_close_peer_in_the_middle_of_receiving (GH-30845) (#30860)

(cherry picked from commit 1c705fda8f9902906edd26d46acb0433b0b098e1)

Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
3 years ago[3.10] bpo-46445, bpo-46519: Re-import typing.NewType (GH-30886)
Ken Jin [Tue, 25 Jan 2022 15:31:12 +0000 (23:31 +0800)] 
[3.10] bpo-46445, bpo-46519: Re-import typing.NewType (GH-30886)

Partially reverts 65b88d5e01c845c0cfa3ff61bc8b2faec8f67a57.

3 years agobpo-46491: Allow Annotated on outside of Final/ClassVar (GH-30864)
Miss Islington (bot) [Tue, 25 Jan 2022 14:38:45 +0000 (06:38 -0800)] 
bpo-46491: Allow Annotated on outside of Final/ClassVar (GH-30864)

We treat Annotated type arg as class-level annotation. This exempts it from checks against Final and ClassVar in order to allow using them in any nesting order.

Automerge-Triggered-By: GH:gvanrossum
(cherry picked from commit e1abffca45b60729c460e3e2ad50c8c1946cfd4e)

Co-authored-by: Gregory Beauregard <greg@greg.red>
3 years ago[3.10] bpo-46496: Update IDLE News to 2021 Jan 24 (GH-30876)
Terry Jan Reedy [Tue, 25 Jan 2022 08:28:29 +0000 (03:28 -0500)] 
[3.10] bpo-46496: Update IDLE News to 2021 Jan 24 (GH-30876)

Cherry picked from b1a3446f077b7d56b89f55d98dadb8018986a3e

3 years agobpo-41841: update idlelib News up to 3.10.0. (GH-30868) (GH-30870)
Miss Islington (bot) [Tue, 25 Jan 2022 07:02:02 +0000 (23:02 -0800)] 
bpo-41841: update idlelib News up to 3.10.0. (GH-30868) (GH-30870)

(cherry picked from commit 9d3c9788a6ccd4f2f53a147dd0026a316c396976)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
3 years agobpo-46503: Prevent an assert from firing when parsing some invalid \N sequences in...
Miss Islington (bot) [Tue, 25 Jan 2022 03:13:11 +0000 (19:13 -0800)] 
bpo-46503: Prevent an assert from firing when parsing some invalid \N sequences in f-strings. (GH-30865) (GH-30866)

* bpo-46503: Prevent an assert from firing.  Also fix one nearby tiny PEP-7 nit.

* Added blurb.
(cherry picked from commit 0daf72194bd4e31de7f12020685bb39a14d6f45e)

Co-authored-by: Eric V. Smith <ericvsmith@users.noreply.github.com>
Co-authored-by: Eric V. Smith <ericvsmith@users.noreply.github.com>
3 years ago[3.10] bpo-46416: Allow direct invocation of `Lib/test/test_typing.py` (GH-30641...
Nikita Sobolev [Mon, 24 Jan 2022 16:18:38 +0000 (19:18 +0300)] 
[3.10] bpo-46416: Allow direct invocation of `Lib/test/test_typing.py` (GH-30641) (GH-30697)

Use `__name__`
(cherry picked from commit 2792d6d18eab3efeb71e6397f88db86e610541f1)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
3 years agoImprove grouper() recipe to demonstrate all forms of zip() (GH-30837) (GH-30840)
Miss Islington (bot) [Sun, 23 Jan 2022 22:02:31 +0000 (14:02 -0800)] 
Improve grouper() recipe to demonstrate all forms of zip() (GH-30837) (GH-30840)

3 years agobpo-41403: Improve error message for invalid mock target (GH-30833) (GH-30834)
Irit Katriel [Sun, 23 Jan 2022 19:34:43 +0000 (19:34 +0000)] 
bpo-41403: Improve error message for invalid mock target (GH-30833) (GH-30834)

(cherry picked from commit f7955a82e36d4c32ebdd7b7707cdf0e6ffa7a418)

3 years ago[3.10] bpo-46474: Avoid REDoS in EntryPoint.pattern (sync with importlib_metadata...
Jason R. Coombs [Sun, 23 Jan 2022 15:17:27 +0000 (10:17 -0500)] 
[3.10] bpo-46474: Avoid REDoS in EntryPoint.pattern (sync with importlib_metadata 4.10.1) (GH-30803) (GH-30827)

(cherry picked from commit 51c3e28c8a163e58dc753765e3cc51d5a717e70d)

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
3 years ago[3.10] bpo-46240: Correct the error for unclosed parentheses when the tokenizer is...
Pablo Galindo Salgado [Sun, 23 Jan 2022 03:10:37 +0000 (03:10 +0000)] 
[3.10] bpo-46240: Correct the error for unclosed parentheses when the tokenizer is not finished (GH-30378). (GH-30819)

(cherry picked from commit 70f415fb8b632247e28d87998642317ca7a652ae)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
3 years agobpo-46266: Add calendar day of week constants to __all__ (GH-30412) (GH-30424)
Miss Islington (bot) [Sun, 23 Jan 2022 01:00:11 +0000 (17:00 -0800)] 
bpo-46266:  Add calendar day of week constants to __all__  (GH-30412) (GH-30424)

(cherry picked from commit e5894ca8fd05e6a6df1033025b9093b68baa718d)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
3 years agobpo-41682: Skip unstable test_asyncio sendfile test on Windows (GH-30801) (GH-30812)
Miss Islington (bot) [Sun, 23 Jan 2022 00:58:16 +0000 (16:58 -0800)] 
bpo-41682: Skip unstable test_asyncio sendfile test on Windows (GH-30801) (GH-30812)

(cherry picked from commit 1ded8ed8e817b8f9dae1a0ef92d97983afbc844e)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
3 years agobpo-43118: Fix bug in inspect.signature around 'base.__text_signature__' (GH-30285...
Miss Islington (bot) [Sat, 22 Jan 2022 17:28:48 +0000 (09:28 -0800)] 
bpo-43118: Fix bug in inspect.signature around 'base.__text_signature__' (GH-30285) (#30765)

(cherry picked from commit 881a763cfe07ef4a5806ec78f13a9bc99e8909dc)

Co-authored-by: Weipeng Hong <hongweichen8888@sina.com>
Co-authored-by: Weipeng Hong <hongweichen8888@sina.com>
3 years agobpo-46468: document that "-m http.server" defaults to port 8000 (GH-30776) (#30787)
Miss Islington (bot) [Sat, 22 Jan 2022 15:31:52 +0000 (07:31 -0800)] 
bpo-46468: document that "-m http.server" defaults to port 8000 (GH-30776) (#30787)

Code link:
https://github.com/python/cpython/blob/70c16468deee9390e34322d32fda57df6e0f46bb/Lib/http/server.pyGH-L1270

It's been this way since at least 3.4.

Also improved some wording in the same section.
(cherry picked from commit c8a536624e8f5d6612e3c275c5b19592583a8cf8)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
3 years agobpo-46417: Fix race condition on setting type __bases__ (GH-30788) (GH-30789)
Miss Islington (bot) [Sat, 22 Jan 2022 14:28:36 +0000 (06:28 -0800)] 
bpo-46417: Fix race condition on setting type __bases__ (GH-30788) (GH-30789)

Fix a race condition on setting a type __bases__ attribute: the
internal function add_subclass() now gets the
PyTypeObject.tp_subclasses member after calling PyWeakref_NewRef()
which can trigger a garbage collection which can indirectly modify
PyTypeObject.tp_subclasses.
(cherry picked from commit f1c6ae3270913e095d24ae13ecf96f5a32c8c503)

Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Victor Stinner <vstinner@python.org>
3 years agobpo-46425: fix direct invocation of `asyncio` tests (GH-30725) (#30782)
Miss Islington (bot) [Sat, 22 Jan 2022 12:29:51 +0000 (04:29 -0800)] 
bpo-46425: fix direct invocation of `asyncio` tests (GH-30725) (#30782)

(cherry picked from commit 5a5340044ca98cbe6297668d91bccba04b102923)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
3 years ago[3.10] bpo-46469: Make asyncio generic classes return GenericAlias (GH-30777) (#30784)
Miss Islington (bot) [Sat, 22 Jan 2022 12:28:51 +0000 (04:28 -0800)] 
[3.10] bpo-46469: Make asyncio generic classes return GenericAlias (GH-30777) (#30784)

* bpo-46469: Make asyncio generic classes return GenericAlias (GH-30777)

* bpo-46469: Make asyncio generic classes return GenericAlias

* 📜🤖 Added by blurb_it.

* Update Misc/NEWS.d/next/Library/2022-01-22-05-05-08.bpo-46469.plUab5.rst

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
(cherry picked from commit ea5b96842e066623a53015d8b2492ed61a5baf96)

Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
* Fix tests

Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
3 years agobpo-46442: improve and rename testExceptionCleanupNames (GH-30758)
Miss Islington (bot) [Sat, 22 Jan 2022 07:34:29 +0000 (23:34 -0800)] 
bpo-46442: improve and rename testExceptionCleanupNames (GH-30758)

The test tested that explicitly deleting the local variable bound to the exception
did not cause problems, but it did not test what it actually claimed to test, i.e.
that the variable is deleted automatically.
(cherry picked from commit 82c53229e18f5853c82cb8ab6b9af1925a0e9e58)

Co-authored-by: Yellow Dusk <yellow.dusk1590@fastmail.com>
3 years agobpo-46445: Cover multiple inheritance of `TypedDict` in `test_typing` (GH-30719)
Miss Islington (bot) [Fri, 21 Jan 2022 22:37:52 +0000 (14:37 -0800)] 
bpo-46445: Cover multiple inheritance of `TypedDict` in `test_typing` (GH-30719)

(cherry picked from commit 65b88d5e01c845c0cfa3ff61bc8b2faec8f67a57)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
3 years agobpo-46463: Fixes escape4chm.py script used when building the CHM documentation file...
Miss Islington (bot) [Fri, 21 Jan 2022 22:11:47 +0000 (14:11 -0800)] 
bpo-46463: Fixes escape4chm.py script used when building the CHM documentation file (GH-30768)

(cherry picked from commit 57d1855682dbeb9233ef3a531f9535c6442e9992)

Co-authored-by: Steve Dower <steve.dower@python.org>
3 years agobpo-46434: Handle missing docstrings in pdb help (GH-30705)
Miss Islington (bot) [Fri, 21 Jan 2022 19:32:43 +0000 (11:32 -0800)] 
bpo-46434: Handle missing docstrings in pdb help (GH-30705)

(cherry picked from commit 60705cff70576482fea31dcafbf8a37cbb751ea5)

Co-authored-by: Tom Sparrow <793763+sparrowt@users.noreply.github.com>
3 years agobpo-46426: Improve tests for the dir_fd argument (GH-30668) (GH-30739)
Miss Islington (bot) [Fri, 21 Jan 2022 17:31:25 +0000 (09:31 -0800)] 
bpo-46426: Improve tests for the dir_fd argument (GH-30668) (GH-30739)

Ensure that directory file descriptors refer to directories different
from the current directory, and that src_dir_fd and dst_dir_fd refer
to different directories.

Add context manager open_dir_fd() in test.support.os_helper.
(cherry picked from commit 54610bb448a9cf5be77d53b66169fca4c11be6cb)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
3 years agono-issue: Fix documentation typos. (GH-30576)
Miss Islington (bot) [Fri, 21 Jan 2022 12:45:42 +0000 (04:45 -0800)] 
no-issue: Fix documentation typos. (GH-30576)

(cherry picked from commit d05a66339b5e07d72d96e4c30a34cc3821bb61a2)

Co-authored-by: Piotr Fusik <piotr@fusik.info>
3 years ago[3.10] bpo-41857: mention timeout argument units in select.poll() and select.depoll...
Tal Einat [Fri, 21 Jan 2022 09:02:25 +0000 (11:02 +0200)] 
[3.10] bpo-41857: mention timeout argument units in select.poll() and select.depoll() doc-strings (GH-22406)

(cherry picked from commit 27df7566bc19699b967e0e30d7808637b90141f6)

Co-authored-by: Zane Bitter <zbitter@redhat.com>
3 years agobpo-21987: Fix TarFile.getmember getting a dir with a trailing slash (GH-30283)
Miss Islington (bot) [Fri, 21 Jan 2022 08:05:57 +0000 (00:05 -0800)] 
bpo-21987: Fix TarFile.getmember getting a dir with a trailing slash (GH-30283)

(cherry picked from commit cfadcc31ea84617b1c73022ce54d4ae831333e8d)

Co-authored-by: andrei kulakov <andrei.avk@gmail.com>
3 years agobpo-46080: fix argparse help generation exception in edge case (GH-30111)
Miss Islington (bot) [Thu, 20 Jan 2022 23:13:17 +0000 (15:13 -0800)] 
bpo-46080: fix argparse help generation exception in edge case (GH-30111)

Fix an uncaught exception during help text generation when
argparse.BooleanOptionalAction is used with default=argparse.SUPPRESS
and help is specified.
(cherry picked from commit 9e87c0e03fa501fb90008547983ce4c1dcaaf90c)

Co-authored-by: Felix Fontein <felix@fontein.de>
3 years ago[3.10] Mark all clinic headers as generated (GH-30679). (GH-30726)
Erlend Egeberg Aasland [Thu, 20 Jan 2022 21:06:47 +0000 (22:06 +0100)] 
[3.10] Mark all clinic headers as generated (GH-30679). (GH-30726)

(cherry picked from commit 71734d0b9ca584bcbdcb2fb44ae16bb2fbfcaf6e)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
3 years ago[3.10] bpo-46339: Fix crash in the parser when computing error text for multi-line...
Miss Islington (bot) [Thu, 20 Jan 2022 13:05:10 +0000 (05:05 -0800)] 
[3.10] bpo-46339: Fix crash in the parser when computing error text for multi-line f-strings (GH-30529) (GH-30542)

* bpo-46339: Fix crash in the parser when computing error text for multi-line f-strings (GH-30529)

Automerge-Triggered-By: GH:pablogsal
(cherry picked from commit cedec19be81e6bd153678bfb28c8e217af8bda58)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
* Fix interactive mode

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
3 years ago[3.10] bpo-46425: Fix direct invocation of multiple test modules (GH-30666) (GH-30699)
Nikita Sobolev [Thu, 20 Jan 2022 01:44:21 +0000 (04:44 +0300)] 
[3.10] bpo-46425: Fix direct invocation of multiple test modules (GH-30666) (GH-30699)

3 years agobpo-46437: remove useless `hasattr` from `test_typing` (GH-30704)
Miss Islington (bot) [Wed, 19 Jan 2022 22:30:07 +0000 (14:30 -0800)] 
bpo-46437: remove useless `hasattr` from `test_typing` (GH-30704)

(cherry picked from commit 263c0dd16017613c5ea2fbfc270be4de2b41b5ad)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
3 years agodoc: Clarify os.urandom return type (GH-30282)
Miss Islington (bot) [Wed, 19 Jan 2022 21:58:13 +0000 (13:58 -0800)] 
doc: Clarify os.urandom return type (GH-30282)

Other descriptions in the same file also use 'bytestring' to refer to bytes objects
(cherry picked from commit 4b99803b861e58eb476a7a30e2e8aacdec5df104)

Co-authored-by: Florian Bruhin <me@the-compiler.org>
3 years agodocs: correct outdated MappingProxyType docstrings (GH-30281)
Miss Islington (bot) [Wed, 19 Jan 2022 21:57:09 +0000 (13:57 -0800)] 
docs: correct outdated MappingProxyType docstrings (GH-30281)

The docstrings for MappingProxyType's keys(), values(), and items()
methods were never updated to reflect the changes that Python 3 brought
to these APIs, namely returning views rather than lists.
(cherry picked from commit 2d10fa9bc4cf83c5e5dd73decc9a138d6d247374)

Co-authored-by: Joshua Bronson <jabronson@gmail.com>
3 years agoUpdate documentation in datetime module strftime-and-strptime-behavior fix typo in...
Miss Islington (bot) [Wed, 19 Jan 2022 18:02:07 +0000 (10:02 -0800)] 
Update documentation in datetime module strftime-and-strptime-behavior fix typo in '%W' format code description (GH-30232)

A small change to the documentation of datetime module , in the format codes section of stftime and strptime. Changed the description of format code '%W' from 'as a decimal number' to 'a zero padded   decimal number' so it's in line with the example having leading zeros.  Similar to the format code '%U' above.

Automerge-Triggered-By: GH:pganssle
(cherry picked from commit d45cd2d20770f72a000ba6dfa9ac88dd49423c27)

Co-authored-by: Evan <binary-signal@users.noreply.github.com>
3 years ago[3.10] bpo-46413: properly test `__{r}or__` code paths in `_SpecialGenericAlias`...
Miss Islington (bot) [Wed, 19 Jan 2022 16:11:12 +0000 (08:11 -0800)] 
[3.10] bpo-46413: properly test `__{r}or__` code paths in `_SpecialGenericAlias` (GH-30640) (GH-30694)

Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
(cherry picked from commit 0a49148e87cca11e3820cbff2abfd316986a68c6)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Automerge-Triggered-By: GH:Fidget-Spinner
3 years agobpo-46424: [typing] cover `Annotation[arg]` invalid usage in tests (GH-30663)
Miss Islington (bot) [Wed, 19 Jan 2022 15:54:07 +0000 (07:54 -0800)] 
bpo-46424: [typing] cover `Annotation[arg]` invalid usage in tests (GH-30663)

(cherry picked from commit 32398294fb3fcf4ee74da54722fd0221c4e6cb74)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
3 years ago[3.10] bpo-45680: Clarify documentation on ``GenericAlias`` objects (GH-29335) (GH...
Miss Islington (bot) [Wed, 19 Jan 2022 15:24:14 +0000 (07:24 -0800)] 
[3.10] bpo-45680: Clarify documentation on ``GenericAlias`` objects (GH-29335) (GH-30688)

The documentation on ``GenericAlias`` objects implies at multiple points that
only container classes can define ``__class_getitem__``. This is misleading.
This PR proposes a rewrite of the documentation to clarify that non-container
classes can define ``__class_getitem__``, and to clarify what it means when a
non-container class is parameterized.

See also: initial discussion of issues with this piece of documentation in
GH-29308, and previous BPO issue [42280]().

Also improved references in glossary and typing docs. Fixed some links.

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
(cherry picked from commit 0eae9a2a2db6cc5a72535f61bb988cc417011640)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Automerge-Triggered-By: GH:Fidget-Spinner
3 years agobpo-22039: [doc] clarify that there are no plans to disable deleting an attribute...
Miss Islington (bot) [Wed, 19 Jan 2022 12:34:17 +0000 (04:34 -0800)] 
bpo-22039: [doc] clarify that there are no plans to disable deleting an attribute via PyObject_SetAttr (GH-30639) (GH-30684)

(cherry picked from commit 3bf6315c4cabf72d64e65e6f85bf72c65137255a)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
3 years ago[3.10] bpo-46402: Promote SQLite URI tricks in sqlite3 docs (GH-30660) (GH-30671)
Erlend Egeberg Aasland [Tue, 18 Jan 2022 21:57:33 +0000 (22:57 +0100)] 
[3.10] bpo-46402: Promote SQLite URI tricks in sqlite3 docs (GH-30660) (GH-30671)

* bpo-46402: Promote SQLite URI tricks in `sqlite3` docs (GH-30660)

Provide some examples of URI parameters in sqlite connect().

Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
(cherry picked from commit bdf2ab1887a2edfb089a3c2a1590cf1e84ea0048)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
* Update suspicious rules

3 years agobpo-45554: Document multiprocessing.Process.exitcode values (GH-30142)
Miss Islington (bot) [Tue, 18 Jan 2022 21:51:30 +0000 (13:51 -0800)] 
bpo-45554: Document multiprocessing.Process.exitcode values (GH-30142)

This addresses [bpo-45554]() by expanding the `exitcode` documentation to also describe what `exitcode` will be in cases of normal termination, `sys.exit()` called, and on uncaught exceptions.

Automerge-Triggered-By: GH:pitrou
(cherry picked from commit 3852269b91fcc8ee668cd876b3669eba6da5b1ac)

Co-authored-by: John Marshall <jmarshall@hey.com>
3 years agobpo-20823: Clarify copyreg.pickle() documentation (GH-30230)
Miss Islington (bot) [Tue, 18 Jan 2022 20:16:54 +0000 (12:16 -0800)] 
bpo-20823: Clarify copyreg.pickle() documentation (GH-30230)

(cherry picked from commit 65940fa5c12a4b4a0650c7845044ffd63b94e227)

Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
3 years agobpo-46411: Remove unnecessary calls to sys.exc_info() in tests (GH-30638)
Miss Islington (bot) [Tue, 18 Jan 2022 07:33:00 +0000 (23:33 -0800)] 
bpo-46411: Remove unnecessary calls to sys.exc_info() in tests (GH-30638)

(cherry picked from commit a287b31bcb065e4122400cb59167340d25480e6d)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
3 years agobpo-46383: Fix signature of zoneinfo module_free function (GH-30607) (GH-30610)
Miss Islington (bot) [Mon, 17 Jan 2022 13:47:51 +0000 (05:47 -0800)] 
bpo-46383: Fix signature of zoneinfo module_free function (GH-30607) (GH-30610)

(cherry picked from commit cfbde65df318eea243706ff876e5ef834c085e5f)

Co-authored-by: Christian Heimes <christian@python.org>
Co-authored-by: Christian Heimes <christian@python.org>
3 years agobpo-13886: Skip PTY non-ASCII tests if readline is loaded (GH-30631)
Miss Islington (bot) [Mon, 17 Jan 2022 13:35:07 +0000 (05:35 -0800)] 
bpo-13886: Skip PTY non-ASCII tests if readline is loaded (GH-30631)

Skip test_builtin PTY tests on non-ASCII characters if the readline
module is loaded. The readline module changes input() behavior, but
test_builtin is not intented to test the readline module.

When the readline module is loaded, PyOS_Readline() uses the readline
implementation. In some cases, the Python readline callback
rlhandler() is called by readline with a string without non-ASCII
characters.
(cherry picked from commit ad6e640f910787e73fd00f59117fbd22cdf88c78)

Co-authored-by: Victor Stinner <vstinner@python.org>