Commit graph

109191 commits

Author SHA1 Message Date
Miss Islington (bot)
a22dd00f2d
bpo-45925: Update macOS installer to SQLite 3.37.2 (GH-30921) (GH-31057) (GH-31059)
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
(cherry picked from commit 519eb6ad74)
2022-02-01 12:12:59 -05:00
Miss Islington (bot)
7368ca1b88
[3.9] bpo-46584: remove check for py2.3 from ctypes/test_python_api (GH-31024) (GH-31053)
(cherry picked from commit 913e340a32)


Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2022-02-01 06:42:49 -08:00
Miss Islington (bot)
2e9f77f9d4
[3.9] bpo-44031: fix test_tabnanny failure in non-ascii CWD (GH-31014) (GH-31048)
(cherry picked from commit 108e66b6d2)


Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>

Automerge-Triggered-By: GH:iritkatriel
2022-02-01 03:31:49 -08:00
Miss Islington (bot)
2532b7c820
[3.9] bpo-46482: add a test for typing.Annotation.__new__ (GH-30821) (GH-31045)
(cherry picked from commit 4c0612ad00)


Co-authored-by: Nikita Sobolev <mail@sobolevn.me>

Automerge-Triggered-By: GH:Fidget-Spinner
2022-02-01 02:25:25 -08:00
Miss Islington (bot)
3046386079
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 ee0ac328d3)

Co-authored-by: Victor Stinner <vstinner@python.org>
2022-01-31 12:03:44 -08:00
Miss Islington (bot)
ad9cf2fdd3
bpo-45925: Update Windows installer to SQLite 3.37.2 (GH-30485)
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
(cherry picked from commit 4d191fcde4)

Co-authored-by: Steve Dower <steve.dower@python.org>
2022-01-28 09:57:59 -08:00
Miss Islington (bot)
ce5c637f5a
bpo-46530: add "thread_time" to test_time.test_get_clock_info (GH-30913)
(cherry picked from commit c27a33132b)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2022-01-28 08:56:26 -08:00
Miss Islington (bot)
8cd82461f9
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 e7a6285f1b)

Co-authored-by: Victor Stinner <vstinner@python.org>
2022-01-27 17:04:56 -08:00
Miss Islington (bot)
7c8d1f0238
bpo-29844: Remove obsolete paragraph from Tools/msi/README.txt (GH-29141)
(cherry picked from commit 098a33f6a6)
2022-01-27 10:59:43 -06:00
Miss Islington (bot)
37577033ba
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 ced50051bb)

Co-authored-by: Gregory Beauregard <greg@greg.red>
2022-01-27 08:47:35 -08:00
Miss Islington (bot)
8e98ccc4c3
bpo-44734: Fix floating point precision in test_turtle (GH-30910)
(cherry picked from commit aa78287bc6)

Co-authored-by: Karolina Surma <33810531+befeleme@users.noreply.github.com>
2022-01-27 06:23:52 -08:00
Miss Islington (bot)
1440dd3438
bpo-23556: [doc] Fix inaccuracy in documentation for raise without args. Improve tests for context in nested except handlers. (GH-29236)
(cherry picked from commit 08c0ed2d9c)

Co-authored-by: Kinshuk Dua <kinshukdua@gmail.com>
2022-01-27 02:50:43 -08:00
Terry Jan Reedy
287ceca2d6
bpo-46496: news39 for bpo45296 (#30949)
(cherry picked from commit 9f0881476e)
2022-01-26 23:10:00 -05:00
Miss Islington (bot)
bc7d96ee33
bpo-45296: Clarify close, quit, and exit in IDLE (GH-30936)
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 fcde0bc10d)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2022-01-26 19:41:13 -08:00
Pablo Galindo Salgado
dafada393f
[3.9] bpo-46502: Remove "How do I tell incomplete input" from FAQ (GH-30925) (GH-30934)
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 f0a648152f)

Co-authored-by: Mateusz Łoskot <mateusz@loskot.net>

Co-authored-by: Mateusz Łoskot <mateusz@loskot.net>
2022-01-27 00:16:44 +00:00
Miss Islington (bot)
ff11effab7
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 a9503ac394)

Co-authored-by: Victor Stinner <vstinner@python.org>
2022-01-26 15:50:30 -08:00
Miss Islington (bot)
49971b2d18
bpo-43698: do not use ... as argument name in docs (GH-30502)
(cherry picked from commit b9d8980d89)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2022-01-26 04:42:39 -08:00
Christian Heimes
04772cd6f1
[3.9] bpo-46513: Remove AC_C_CHAR_UNSIGNED / __CHAR_UNSIGNED__ (GH-30851) (GH-30915)
Co-authored-by: Christian Heimes <christian@python.org>
2022-01-26 12:20:39 +01:00
Miss Islington (bot)
29eefcc9c6
bpo-46529: increase coverage of typing.Union.__repr__ method (GH-30911)
(cherry picked from commit d0c690b5f8)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2022-01-26 02:40:40 -08:00
Miss Islington (bot)
f8a805bde1
bpo-41844: Update IDLE part of What's New 3.9 to 20228 (GH-30905)
(cherry picked from commit 7cf285d82e)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2022-01-25 21:15:03 -08:00
Miss Islington (bot)
f9ff0bf515
bpo-41682: fixed flaky test test_sendfile_close_peer_in_the_middle_of_receiving (GH-30845) (#30861)
(cherry picked from commit 1c705fda8f)

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

Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
2022-01-25 18:40:34 +01:00
Miss Islington (bot)
b0b8388a1c
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 e1abffca45)

Co-authored-by: Gregory Beauregard <greg@greg.red>
2022-01-25 06:39:12 -08:00
Terry Jan Reedy
3178efbf06
[3.9] bpo-46496: Update IDLE News to 2021 Jan 24 (GH-30877)
Cherry picked from b1a3446f07
2022-01-25 03:28:53 -05:00
Terry Jan Reedy
98cabce599
bpo-41841: update idlelib News up to 3.10.0 (GH-30871) 2022-01-25 02:01:25 -05:00
Miss Islington (bot)
c314e3e829
bpo-46503: Prevent an assert from firing when parsing some invalid \N sequences in f-strings. (GH-30865) (30867)
* bpo-46503: Prevent an assert from firing.  Also fix one nearby tiny PEP-7 nit.

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

Co-authored-by: Eric V. Smith <ericvsmith@users.noreply.github.com>

Co-authored-by: Eric V. Smith <ericvsmith@users.noreply.github.com>
2022-01-24 22:08:42 -05:00
Serhiy Storchaka
3f1ea163ea
[3.9] bpo-46426: Improve tests for the dir_fd argument (GH-30668) (GH-30757)
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 54610bb448)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2022-01-24 12:14:42 +02:00
Irit Katriel
1398dca838
bpo-41403: Improve error message for invalid mock target (GH-30833) (GH-30835)
(cherry picked from commit f7955a82e3)
2022-01-23 19:35:15 +00:00
Miss Islington (bot)
94d6434ba7
[3.9] bpo-21987: Fix TarFile.getmember getting a dir with a trailing slash (GH-30283) (GH-30738)
(cherry picked from commit cfadcc31ea)

Co-authored-by: andrei kulakov <andrei.avk@gmail.com>
2022-01-23 19:54:13 +02:00
Jason R. Coombs
1514d1252f
[3.9] bpo-46474: Avoid REDoS in EntryPoint.pattern (sync with importlib_metadata 4.10.1) (GH-30803). (GH-30828)
(cherry picked from commit 51c3e28c8a)

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
2022-01-23 10:17:41 -05:00
Miss Islington (bot)
d0852c447a
Update documentation in datetime module strftime-and-strptime-behavior fix typo in '%W' format code description (GH-30232) (GH-30703)
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 d45cd2d207)

Co-authored-by: Evan <binary-signal@users.noreply.github.com>

Co-authored-by: Evan <binary-signal@users.noreply.github.com>
2022-01-23 01:59:41 +01:00
Miss Islington (bot)
d807bf2ee9
Document optional 'task'/'asyncgen' fields in call_exception_handler (GH-21735) (GH-30727)
(cherry picked from commit a1652da2c8)

Co-authored-by: Shane Harvey <shnhrv@gmail.com>

Co-authored-by: Shane Harvey <shnhrv@gmail.com>
2022-01-23 01:59:23 +01:00
Miss Islington (bot)
ba932d9024
bpo-41682: Skip unstable test_asyncio sendfile test on Windows (GH-30801)
(cherry picked from commit 1ded8ed8e8)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2022-01-22 16:20:49 -08:00
Miss Islington (bot)
b4088801db
bpo-46468: document that "-m http.server" defaults to port 8000 (GH-30776) (#30786)
Code link:
70c16468de/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 c8a536624e)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2022-01-22 17:31:40 +02:00
Miss Islington (bot)
f1796f2947
bpo-46417: Fix race condition on setting type __bases__ (GH-30788) (GH-30790)
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 f1c6ae3270)

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

Co-authored-by: Victor Stinner <vstinner@python.org>
2022-01-22 15:28:42 +01:00
Kumar Aditya
6ed874f8c5
[3.9] bpo-46469: Make asyncio generic classes return GenericAlias (GH-30777) (GH-30785)
Automerge-Triggered-By: GH:asvetlov
2022-01-22 04:52:24 -08:00
Miss Islington (bot)
3c4a3745b9
bpo-46425: fix direct invocation of asyncio tests (GH-30725)
(cherry picked from commit 5a5340044c)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2022-01-22 03:54:07 -08:00
Kumar Aditya
3e7d06a1fa
[3.9] bpo-46383: Fix signature of zoneinfo module_free function (GH-3… (GH-30611)
…0607)
2022-01-22 03:05:55 -08:00
Miss Islington (bot)
e064af564c
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 82c53229e1)

Co-authored-by: Yellow Dusk <yellow.dusk1590@fastmail.com>
2022-01-21 23:37:32 -08:00
Miss Islington (bot)
b37f3e993a
bpo-46463: Fixes escape4chm.py script used when building the CHM documentation file (GH-30768)
(cherry picked from commit 57d1855682)

Co-authored-by: Steve Dower <steve.dower@python.org>
2022-01-21 14:15:44 -08:00
Miss Islington (bot)
9e3ff821da
bpo-43118: Fix bug in inspect.signature around 'base.__text_signature__' (GH-30285)
(cherry picked from commit 881a763cfe)

Co-authored-by: Weipeng Hong <hongweichen8888@sina.com>
2022-01-21 14:06:35 -08:00
Miss Islington (bot)
c3ad850b57
bpo-46434: Handle missing docstrings in pdb help (GH-30705)
(cherry picked from commit 60705cff70)

Co-authored-by: Tom Sparrow <793763+sparrowt@users.noreply.github.com>
2022-01-21 09:33:25 -08:00
Tal Einat
656971e495
[3.9] bpo-41857: mention timeout argument units in select.poll() and select.depoll() doc-strings (GH-22406)
(cherry picked from commit 27df7566bc)

Co-authored-by: Zane Bitter <zbitter@redhat.com>
2022-01-21 11:37:39 +02:00
Miss Islington (bot)
c6691a7ccb
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 9e87c0e03f)

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-01-20 15:22:50 -08:00
Erlend Egeberg Aasland
e8e71c481a
[3.9] Mark all clinic headers as generated (GH-30679). (GH-30728)
(cherry picked from commit 71734d0b9c)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
2022-01-20 13:07:19 -08:00
Nikita Sobolev
8105dd2411
[3.9] bpo-46425: Fix direct invocation of multiple test modules (GH-30666) (GH-30700) 2022-01-20 10:43:49 +09:00
Miss Islington (bot)
3b51926ee9
bpo-46437: remove useless hasattr from test_typing (GH-30704)
(cherry picked from commit 263c0dd160)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2022-01-19 14:12:25 -08:00
Miss Islington (bot)
981c1dc8b6
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 4b99803b86)

Co-authored-by: Florian Bruhin <me@the-compiler.org>
2022-01-19 14:07:47 -08:00
Miss Islington (bot)
54feddae88
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 2d10fa9bc4)

Co-authored-by: Joshua Bronson <jabronson@gmail.com>
2022-01-19 13:57:30 -08:00
Ken Jin
00645166b6
[3.9] bpo-45680: Clarify documentation on `GenericAlias` objects (GH-29335) (GH-30689)
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](https://bugs.python.org/issue42280).

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

(cherry picked from commit 0eae9a2a2d)

Co-Authored-By: Erlend Egeberg Aasland <erlend.aasland@innova.no>
Co-Authored-By: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
Co-Authored-By: Alex Waygood <Alex.Waygood@Gmail.com>
2022-01-20 00:01:30 +08:00
Miss Islington (bot)
331378dffc
[3.9] bpo-46424: [typing] cover Annotation[arg] invalid usage in tests (GH-30663) (GH-30692)
(cherry picked from commit 32398294fb)


Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2022-01-19 07:59:46 -08:00