| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
(GH-31354)
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(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>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
ElementTree.XMLParser (GH-31152)
Both implementations accept target=None now.
(cherry picked from commit 168fd6453b5de15236116f9261d64601d92571ac)
Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com>
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
(GH-30696) (GH-31262)
(cherry picked from commit 0ef08530124c5ca13a9394f4ac18bee8e6c66409)
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
test_asyncio (GH-31253) (GH-31255)
(cherry picked from commit 012e77eb5c3ba3d411f5967a7f368ebdb42ab88c)
Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
|
|
|
|
|
|
|
| |
errors (GH-31241). (GH-31242)
(cherry picked from commit b71dc71905ab674ccaa4a56230d17a28f61c325c)
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
(GH-31010). (GH-31213)
(cherry picked from commit 69e10976b2e7682c6d57f4272932ebc19f8e8859)
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
|
|
|
|
|
|
|
| |
(GH-31203) (GH-31210)
(cherry picked from commit c8b62bbe46e20d4b6dd556f2fa85960d1269aa45)
Co-authored-by: Gregory Beauregard <greg@greg.red>
|
|
|
|
|
|
|
| |
packages (GH-31130)
(cherry picked from commit 3a5afc14e16370c1f4f72d43cb553298ad9a1fa4)
Co-authored-by: Steve Dower <steve.dower@python.org>
|
|
|
|
|
|
|
| |
(#31175)
(cherry picked from commit 77b025be4a4cd5a3bfc1b1af560cc57e8e956c98)
Co-authored-by: Gregory Beauregard <greg@greg.red>
|
|
|
|
|
|
| |
va_end() must be called before returning.
(cherry picked from commit 59e004af63742361b67d1e1ae70229ff0db1059d)
Co-authored-by: Zackery Spytz <zspytz@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
@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>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
| |
(cherry picked from commit e0433c1e70254d4d0357a9e14596929a04bdf769)
Co-authored-by: Brandt Bucher <brandt@python.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
completion (GH-31086)
(cherry picked from commit 89a0a90c2e0e685bc70206fc45e4413c4f4411ed)
Co-authored-by: Steve Dower <steve.dower@python.org>
|
|
|
|
|
| |
(GH-31084)
Cherry-pick of [`b06e9ba`](https://github.com/python/cpython/pull/30952/commits/b06e9ba398fafe39028c3b2dc3943266a16b1416) from https://github.com/python/cpython/pull/30952.
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
(cherry picked from commit 53c78080573b3bae4c4e782b9f47dce48aac9688)
Co-authored-by: Wes <5124946+wesinator@users.noreply.github.com>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
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()
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>
|
|
|
|
| |
the coroutine (#30288) (#31003)
|
|
|
| |
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
| |
(GH-30914)
Co-authored-by: Christian Heimes <christian@python.org>
|
|
|
|
|
|
|
| |
lines with continuation characters (GH-30130). (GH-30898)
(cherry picked from commit a0efc0c1960e2c49e0092694d98395555270914c)
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
(cherry picked from commit 9d3c9788a6ccd4f2f53a147dd0026a316c396976)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
| |
(cherry picked from commit f7955a82e36d4c32ebdd7b7707cdf0e6ffa7a418)
|
|
|
|
|
|
|
| |
importlib_metadata 4.10.1) (GH-30803) (GH-30827)
(cherry picked from commit 51c3e28c8a163e58dc753765e3cc51d5a717e70d)
Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
|
|
|
|
|
|
|
| |
tokenizer is not finished (GH-30378). (GH-30819)
(cherry picked from commit 70f415fb8b632247e28d87998642317ca7a652ae)
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
|
|
|
|
|
|
|
| |
(cherry picked from commit e5894ca8fd05e6a6df1033025b9093b68baa718d)
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
|
|
|
|
|
|
|
|
|
| |
(GH-30285) (#30765)
(cherry picked from commit 881a763cfe07ef4a5806ec78f13a9bc99e8909dc)
Co-authored-by: Weipeng Hong <hongweichen8888@sina.com>
Co-authored-by: Weipeng Hong <hongweichen8888@sina.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(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>
|
|
|
|
|
|
|
| |
documentation file (GH-30768)
(cherry picked from commit 57d1855682dbeb9233ef3a531f9535c6442e9992)
Co-authored-by: Steve Dower <steve.dower@python.org>
|