summaryrefslogtreecommitdiffstats
path: root/Misc
Commit message (Collapse)AuthorAgeFilesLines
* [3.10] bpo-46333: Honor `module` parameter in ForwardRef (GH-30536) (GH-31379)Miss Islington (bot)2022-02-172-0/+5
| | | | | | | | | | | | | | | The `module` parameter carries semantic information about the forward ref. Forward refs are different if they refer to different module even if they have the same name. This affects the `__eq__`, `__repr__` and `__hash__` methods. Co-authored-by: Andreas Hangauer <andreas.hangauer@siemens.com> Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com> Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com> (cherry picked from commit 6e7b813195f9bd6a2a15c1f00ef2c0180f6c751a) Co-authored-by: aha79 <34090357+aha79@users.noreply.github.com> Automerge-Triggered-By: GH:JelleZijlstra
* [3.10] bpo-46724: Use `JUMP_ABSOLUTE` for all backward jumps. (GH-31326) ↵Mark Shannon2022-02-161-0/+2
| | | | (GH-31354)
* bpo-46762: Fix an assert failure in f-strings where > or < is the last ↵Miss Islington (bot)2022-02-161-0/+2
| | | | | | | character if the f-string is missing a trailing right brace. (GH-31365) (cherry picked from commit ffd9f8ff84ed53c956b16d027f7d2926ea631051) Co-authored-by: Eric V. Smith <ericvsmith@users.noreply.github.com>
* bpo-46436: Fix command-line option -d/--directory in module http.server ↵Miss Islington (bot)2022-02-141-0/+3
| | | | | | | | | | | | | (GH-30701) Fix command-line option -d/--directory in http.server main function that was ignored when combined with --cgi. Automerge-Triggered-By: GH:merwok (cherry picked from commit 2d080347d74078a55c47715d232d1ab8dc8cd603) Co-authored-by: Géry Ogam <gery.ogam@gmail.com> Co-authored-by: Géry Ogam <gery.ogam@gmail.com>
* bpo-45447: Add syntax highlighting for `.pyi` files in IDLE (GH-28950)Terry Jan Reedy2022-02-131-0/+2
| | | | | | | | | | | Also add .pyi to the python extensions in the "File-open" and "File-save" dialogues. Add util.py to contain objects that are used in multiple idlelib modules and have no dependencies on any of them. Co-authored-by: E-Paine <63801254+E-Paine@users.noreply.github.com> Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu> (cherry picked from commit 50cf4991c49e19f917305dd7b9c71085c11edddb) Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* bpo-45948: Remove constructor discrepancy in C version of ↵Miss Islington (bot)2022-02-121-0/+5
| | | | | | | | ElementTree.XMLParser (GH-31152) Both implementations accept target=None now. (cherry picked from commit 168fd6453b5de15236116f9261d64601d92571ac) Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com>
* bpo-46615: Don't crash when set operations mutate the sets (GH-31120)Miss Islington (bot)2022-02-111-0/+1
| | | | | | Ensure strong references are acquired whenever using `set_next()`. Added randomized test cases for `__eq__` methods that sometimes mutate sets when called. (cherry picked from commit 4a66615ba736f84eadf9456bfd5d32a94cccf117) Co-authored-by: Dennis Sweeney <36520290+sweeneyde@users.noreply.github.com>
* [3.10] bpo-46433: _PyType_GetModuleByDef: handle static types in MRO ↵Petr Viktorin2022-02-111-0/+2
| | | | | | | (GH-30696) (GH-31262) (cherry picked from commit 0ef08530124c5ca13a9394f4ac18bee8e6c66409)
* bpo-46246: add missing __slots__ to importlib.metadata.DeprecatedList (GH-30452)Miss Islington (bot)2022-02-111-0/+2
| | | | | | | | | | Confirmed with @jaraco that this indeed needs a fix. A question that came up while I was digging into the code: I think `SelectableGroups` could similarly use `__slots__ = ()`, since its purpose seems only for convenience around `dict`, not to have attributes of its own. Automerge-Triggered-By: GH:jaraco (cherry picked from commit dd76b3f7d332dd6eced5cbc2ad2adfc397700b3d) Co-authored-by: Arie Bovenberg <a.c.bovenberg@gmail.com>
* [3.10] Fix warning: asyncio.events._event_loop_policy was modified by ↵Andrew Svetlov2022-02-101-0/+2
| | | | | | | test_asyncio (GH-31253) (GH-31255) (cherry picked from commit 012e77eb5c3ba3d411f5967a7f368ebdb42ab88c) Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
* [3.10] bpo-46707: Avoid potential exponential backtracking in some syntax ↵Pablo Galindo Salgado2022-02-101-0/+2
| | | | | | | errors (GH-31241). (GH-31242) (cherry picked from commit b71dc71905ab674ccaa4a56230d17a28f61c325c) Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
* bpo-45863: tarfile: don't zero out header fields unnecessarily (GH-29693)Miss Islington (bot)2022-02-091-0/+1
| | | | | | | | | | | | | Numeric fields of type float, notably mtime, can't be represented exactly in the ustar header, so the pax header is used. But it is helpful to set them to the nearest int (i.e. second rather than nanosecond precision mtimes) in the ustar header as well, for the benefit of unarchivers that don't understand the pax header. Add test for tarfile.TarInfo.create_pax_header to confirm correct behaviour. (cherry picked from commit bf2d44ffb06e8f49aacc6b1c140a6717df5cf897) Co-authored-by: Joshua Root <jmr@macports.org>
* bpo-46678: Fix Invalid cross device link in ↵Miss Islington (bot)2022-02-081-0/+3
| | | | | | | | | | 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.10] bpo-46521: Fix codeop to use a new partial-input mode of the parser ↵Pablo Galindo Salgado2022-02-081-0/+2
| | | | | | | (GH-31010). (GH-31213) (cherry picked from commit 69e10976b2e7682c6d57f4272932ebc19f8e8859) Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
* [3.10] bpo-46676: Make ParamSpec args and kwargs equal to themselves ↵Gregory Beauregard2022-02-081-0/+1
| | | | | | | (GH-31203) (GH-31210) (cherry picked from commit c8b62bbe46e20d4b6dd556f2fa85960d1269aa45) Co-authored-by: Gregory Beauregard <greg@greg.red>
* bpo-46638: Makes registry virtualisation setting stable when building MSIX ↵Miss Islington (bot)2022-02-071-0/+4
| | | | | | | packages (GH-31130) (cherry picked from commit 3a5afc14e16370c1f4f72d43cb553298ad9a1fa4) Co-authored-by: Steve Dower <steve.dower@python.org>
* [3.10] bpo-46655: allow stringized TypeAlias with get_type_hints (GH-31156). ↵Gregory Beauregard2022-02-071-0/+1
| | | | | | | (#31175) (cherry picked from commit 77b025be4a4cd5a3bfc1b1af560cc57e8e956c98) Co-authored-by: Gregory Beauregard <greg@greg.red>
* bpo-40479: Fix undefined behavior in Modules/_hashopenssl.c (GH-31153)Miss Islington (bot)2022-02-071-0/+1
| | | | | | va_end() must be called before returning. (cherry picked from commit 59e004af63742361b67d1e1ae70229ff0db1059d) Co-authored-by: Zackery Spytz <zspytz@gmail.com>
* bpo-14916: use specified tokenizer fd for file input (GH-31006)Miss Islington (bot)2022-02-031-0/+1
| | | | | | | | | | | | | @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>
* bpo-46630: Fix initial focus of IDLE query dialogs (GH-31112)Miss Islington (bot)2022-02-031-0/+1
| | | | | | | 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>
* bpo-45773: Remove invalid peephole optimizations (GH-31066)Miss Islington (bot)2022-02-031-0/+1
| | | | | (cherry picked from commit e0433c1e70254d4d0357a9e14596929a04bdf769) Co-authored-by: Brandt Bucher <brandt@python.org>
* [3.10] bpo-46576: bpo-46524: Disable compiler optimization within ↵Gregory P. Smith2022-02-031-0/+3
| | | | | | | | | | | | | | | | | | | | | | | 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>
* bpo-46616: Ensures test_importlib.test_windows cleans up registry keys after ↵Miss Islington (bot)2022-02-021-0/+2
| | | | | | | completion (GH-31086) (cherry picked from commit 89a0a90c2e0e685bc70206fc45e4413c4f4411ed) Co-authored-by: Steve Dower <steve.dower@python.org>
* [3.10] bpo-45173: Note configparser deprecations will be removed in 3.12 ↵Hugo van Kemenade2022-02-021-0/+1
| | | | | (GH-31084) Cherry-pick of [`b06e9ba`](https://github.com/python/cpython/pull/30952/commits/b06e9ba398fafe39028c3b2dc3943266a16b1416) from https://github.com/python/cpython/pull/30952.
* bpo-44359: Fix test_ftplib unhandled thread exceptions (GH-31069)Miss Islington (bot)2022-02-021-0/+2
| | | | | | | 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>
* bpo-46591: Make About IDLE doc link label clickable (GH-30251)Miss Islington (bot)2022-02-021-0/+1
| | | | | | Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu> (cherry picked from commit 53c78080573b3bae4c4e782b9f47dce48aac9688) Co-authored-by: Wes <5124946+wesinator@users.noreply.github.com>
* bpo-46487: Add `get_write_buffer_limits` to Write and _SSLProtocol ↵Miss Islington (bot)2022-02-011-0/+1
| | | | | | | | 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>
* bpo-45925: Update macOS installer to SQLite 3.37.2 (GH-30921) (GH-31057)Ned Deily2022-02-011-0/+1
| | | | Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com> Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
* bpo-46542: test_lib2to3 uses support.infinite_recursion() (GH-31035)Miss Islington (bot)2022-01-311-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | * 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>
* bpo-26552: Fixed case where failing `asyncio.ensure_future` did not close ↵Kumar Aditya2022-01-291-0/+1
| | | | the coroutine (#30288) (#31003)
* bpo-45925: Update Windows installer to SQLite 3.37.2 (GH-30485)Steve Dower2022-01-281-0/+1
| | | Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
* bpo-46542: test_json uses support.infinite_recursion() (GH-30972)Miss Islington (bot)2022-01-281-0/+2
| | | | | | | 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>
* bpo-46539: Pass status of special typeforms to forward references (GH-30926)Miss Islington (bot)2022-01-271-0/+1
| | | | | | | | | | | 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.10] bpo-45703: Invalidate _NamespacePath cache on ↵Petr Viktorin2022-01-271-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* bpo-44791: Fix substitution of ParamSpec in Concatenate with different ↵Miss Islington (bot)2022-01-271-0/+5
| | | | | | | | | | | 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>
* bpo-45296: Clarify close, quit, and exit in IDLE (GH-30936) (GH-30944)Miss Islington (bot)2022-01-271-0/+4
| | | | | | | | | | | 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>
* bpo-38472: setup.py uses LC_ALL=C to check the C compiler (GH-30929)Miss Islington (bot)2022-01-261-0/+2
| | | | | | | | 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.10] bpo-46513: Remove AC_C_CHAR_UNSIGNED / __CHAR_UNSIGNED__ (GH-30851) ↵Christian Heimes2022-01-261-0/+2
| | | | | (GH-30914) Co-authored-by: Christian Heimes <christian@python.org>
* [3.10] bpo-46091: Correctly calculate indentation levels for whitespace ↵Pablo Galindo Salgado2022-01-251-0/+2
| | | | | | | lines with continuation characters (GH-30130). (GH-30898) (cherry picked from commit a0efc0c1960e2c49e0092694d98395555270914c) Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
* bpo-46491: Allow Annotated on outside of Final/ClassVar (GH-30864)Miss Islington (bot)2022-01-251-0/+1
| | | | | | | | 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>
* bpo-41841: update idlelib News up to 3.10.0. (GH-30868) (GH-30870)Miss Islington (bot)2022-01-252-2/+3
| | | | | | | (cherry picked from commit 9d3c9788a6ccd4f2f53a147dd0026a316c396976) Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu> Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
* bpo-46503: Prevent an assert from firing when parsing some invalid \N ↵Miss Islington (bot)2022-01-251-0/+1
| | | | | | | | | | | | 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>
* bpo-41403: Improve error message for invalid mock target (GH-30833) (GH-30834)Irit Katriel2022-01-231-0/+3
| | | (cherry picked from commit f7955a82e36d4c32ebdd7b7707cdf0e6ffa7a418)
* [3.10] bpo-46474: Avoid REDoS in EntryPoint.pattern (sync with ↵Jason R. Coombs2022-01-231-0/+2
| | | | | | | importlib_metadata 4.10.1) (GH-30803) (GH-30827) (cherry picked from commit 51c3e28c8a163e58dc753765e3cc51d5a717e70d) Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
* [3.10] bpo-46240: Correct the error for unclosed parentheses when the ↵Pablo Galindo Salgado2022-01-231-0/+3
| | | | | | | tokenizer is not finished (GH-30378). (GH-30819) (cherry picked from commit 70f415fb8b632247e28d87998642317ca7a652ae) Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
* bpo-46266: Add calendar day of week constants to __all__ (GH-30412) (GH-30424)Miss Islington (bot)2022-01-231-0/+4
| | | | | | | (cherry picked from commit e5894ca8fd05e6a6df1033025b9093b68baa718d) Co-authored-by: Nikita Sobolev <mail@sobolevn.me> Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
* bpo-43118: Fix bug in inspect.signature around 'base.__text_signature__' ↵Miss Islington (bot)2022-01-221-0/+3
| | | | | | | | | (GH-30285) (#30765) (cherry picked from commit 881a763cfe07ef4a5806ec78f13a9bc99e8909dc) Co-authored-by: Weipeng Hong <hongweichen8888@sina.com> Co-authored-by: Weipeng Hong <hongweichen8888@sina.com>
* bpo-46417: Fix race condition on setting type __bases__ (GH-30788) (GH-30789)Miss Islington (bot)2022-01-221-0/+5
| | | | | | | | | | | | 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.10] bpo-46469: Make asyncio generic classes return GenericAlias ↵Miss Islington (bot)2022-01-221-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | (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>
* bpo-46463: Fixes escape4chm.py script used when building the CHM ↵Miss Islington (bot)2022-01-211-0/+2
| | | | | | | documentation file (GH-30768) (cherry picked from commit 57d1855682dbeb9233ef3a531f9535c6442e9992) Co-authored-by: Steve Dower <steve.dower@python.org>