| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
(cherry picked from commit c0c23ea72b76b06b7db0d09415fa90bab8ded63a)
Co-authored-by: Ned Deily <nad@python.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* [3.9] bpo-41100: Support macOS 11 and Apple Silicon (GH-22855)
Co-authored-by: Lawrence D’Anna <lawrence_danna@apple.com>
* Add support for macOS 11 and Apple Silicon (aka arm64)
As a side effect of this work use the system copy of libffi on macOS, and remove the vendored copy
* Support building on recent versions of macOS while deploying to older versions
This allows building installers on macOS 11 while still supporting macOS 10.9..
(cherry picked from commit 41761933c1c30bb6003b65eef1ba23a83db4eae4)
Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
* Back port of changes to _decimal to support arm64
* temp_dir is in test.support in 3.9
|
|
|
|
| |
(GH-23272) (GH-23450)
|
|
|
|
|
|
|
|
|
|
| |
subprocess.Popen.send_signal. (GH-20010)
send_signal() now swallows the exception if the process it thought was still alive winds up not to exist anymore (always a plausible race condition despite the checks).
Co-authored-by: Gregory P. Smith <greg@krypto.org>
(cherry picked from commit 01a202ab6b0ded546e47073db6498262086c52e9)
Co-authored-by: Filipe Laíns <lains@archlinux.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
By attempting to avoid backslashes in f-string expressions.
We also now proactively raise errors for some backslashes we can't
avoid while unparsing FormattedValues
Co-authored-by: hauntsaninja <>
Co-authored-by: Shantanu <hauntsaninja@users.noreply.github.com>
Co-authored-by: Batuhan Taskaya <isidentical@gmail.com>
(cherry picked from commit a993e901ebe60c38d46ecb31f771d0b4a206828c)
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
|
| |
Fix hash implementation of `typing.Literal`.
Update docs regarding `typing.Litaral` caching.
Base implementation was done in PR GH-23294.
(cherry picked from commit 1b54077ff6f5c1379e097e9f8e8648da9826d6ec)
Co-authored-by: Yurii Karabas <1998uriyyo@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-23332) (GH-23333)
Currently walruses are not allowerd in set literals and set comprehensions:
>>> {y := 4, 4**2, 3**3}
File "<stdin>", line 1
{y := 4, 4**2, 3**3}
^
SyntaxError: invalid syntax
but they should be allowed as well per PEP 572.
(cherry picked from commit b0aba1fcdc3da952698d99aec2334faa79a8b68c)
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix a race condition in "make regen-all" when make -jN option is used
to run jobs in parallel. The clinic.py script now only use atomic
write to write files. Moveover, generated files are now left
unchanged if the content does not change, to not change the file
modification time.
The "make regen-all" command runs "make clinic" and "make
regen-importlib" targets:
* "make regen-importlib" builds object files (ex: Modules/_weakref.o)
from source files (ex: Modules/_weakref.c) and clinic files (ex:
Modules/clinic/_weakref.c.h)
* "make clinic" always rewrites all clinic files
(ex: Modules/clinic/_weakref.c.h)
Since there is no dependency between "clinic" and "regen-importlib"
Makefile targets, these two targets can be run in parallel. Moreover,
half of clinic.py file writes are not atomic and so there is a race
condition when "make regen-all" runs jobs in parallel using make -jN
option (which can be passed in MAKEFLAGS environment variable).
Fix clinic.py to make all file writes atomic:
* Add write_file() function to ensure that all file writes are
atomic: write into a temporary file and then use os.replace().
* Moreover, write_file() doesn't recreate or modify the file if the
content does not change to avoid modifying the file modification
file.
* Update test_clinic to verify these assertions with a functional
test.
* Remove Clinic.force attribute which was no longer used, whereas
Clinic.verify remains useful.
(cherry picked from commit 8fba9523cf08029dc2e280d9f48fdd57ab178c9d)
|
|
|
|
|
|
|
|
|
|
|
| |
skip test_min_max_version_mismatch when TLS 1.0 is not available
Signed-off-by: Christian Heimes <christian@python.org>
(cherry picked from commit ce04e7105bc396c32667a22b928a712ba0778a3f)
Co-authored-by: Christian Heimes <christian@python.org>
Automerge-Triggered-By: GH:tiran
|
|
|
| |
(cherry picked from commit 384b7a4bd988986bca227c7e85c32d766da74708)
|
|
|
|
|
| |
(GH-22395) (GH-23303)
* bpo-39934: backport PR 22395 to 3.9
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-23335)
Literal equality no longer depends on the order of arguments.
Fix issue related to `typing.Literal` caching by adding `typed` parameter to `typing._tp_cache` function.
Add deduplication of `typing.Literal` arguments.
(cherry picked from commit f03d318ca42578e45405717aedd4ac26ea52aaed)
Co-authored-by: Yurii Karabas <1998uriyyo@gmail.com>
|
|
|
|
|
|
|
|
|
|
| |
Skip testing of pure Python PBKDF2 when one or more builtin hash module
is not available. Otherwise the import of hashlib prints noise on
stderr.
Signed-off-by: Christian Heimes <christian@python.org>
(cherry picked from commit 975022b77b0024ea1548f19d5f91aba5ba1eed59)
Co-authored-by: Christian Heimes <christian@python.org>
|
|
|
|
|
| |
This fixes a regression that was introduced by the new parser.
(cherry picked from commit cb3e5ed0716114393696ec7201e51fe0595eab4f)
|
|
|
|
|
|
|
|
| |
Fix the threading.Thread class at fork: do nothing if the thread is
already stopped (ex: fork called at Python exit). Previously, an
error was logged in the child process.
(cherry picked from commit 5909a494cd3ba43143b28bd439773ed85a485dfc)
Co-authored-by: Victor Stinner <vstinner@python.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
GH- Improve asyncio.wait function
The original code creates the futures set two times.
We can create this set before, avoiding the second creation.
This new behaviour [breaks the aiokafka library](https://github.com/aio-libs/aiokafka/pull/672), because it gives an iterator to that function, so the second iteration become empty.
Automerge-Triggered-By: GH:1st1
(cherry picked from commit 7e5ef0a5713f968f6e942566c78bf57ffbef01de)
Co-authored-by: Diogo Dutra <diogodutradamata@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-23020)
The overflow occurs under some circumstances when a task or future
recursively returns itself.
Co-authored-by: Kyle Stanley <aeros167@gmail.com>
(cherry picked from commit 42d873c63aa9d160c132be4a34599531574db12c)
Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Noticed by @serhiy-storchaka in the bpo. `typing`'s types were not showing the parameterized generic.
Eg. previously:
```python
>>> typing.Union[dict[str, float], list[int]]
'typing.Union[dict, list]'
```
Now:
```python
>>> typing.Union[dict[str, float], list[int]]
'typing.Union[dict[str, float], list[int]]'
```
Automerge-Triggered-By: GH:gvanrossum
(cherry picked from commit 1f7dfb277e5b88cddc13e5024766be787a3e9127)
Co-authored-by: kj <28750310+Fidget-Spinner@users.noreply.github.com>
|
|
|
|
|
|
|
|
| |
Otherwise, when running the testsuite, test_peg_generator tries to compile C
code using the optimized flags and fails because it cannot find the profile
data.
(cherry picked from commit 100964e0310d3a2040d0db976f7984d0507b2dbd)
Co-authored-by: serge-sans-paille <serge.guelton@telecom-bretagne.eu>
|
|
|
|
|
|
|
|
|
|
|
| |
* Prevent some possible DoS attacks via providing invalid Plist files
with extremely large number of objects or collection sizes.
* Raise InvalidFileException for too large bytes and string size instead of returning garbage.
* Raise InvalidFileException instead of ValueError for specific invalid datetime (NaN).
* Raise InvalidFileException instead of TypeError for non-hashable dict keys.
* Add more tests for invalid Plist files.
(cherry picked from commit 34637a0ce21e7261b952fbd9d006474cc29b681f)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
|
|
|
| |
(GH-23067)
(cherry picked from commit 301822859b3fc34801a06f1090d62f9f2ee5b092)
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-23059) (GH-23071)
[[bpo-29566]()]() notes that binhex.binhex uses inconsistent line endings (both Unix and MacOS9 line endings are used). This PR changes this to use the MacOS9 line endings everywhere.
(cherry picked from commit 2165cea548f961b308050f30d1f042a377651d44)
Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
Automerge-Triggered-By: GH:ronaldoussoren
|
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-23066)
Left-recursive rules need to check for errors explicitly, since
even if the rule returns NULL, the parsing might continue and lead
to long-distance failures.
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
(cherry picked from commit 02cdfc93f82fecdb7eae97a868d4ee222b9875d9)
Automerge-Triggered-By: GH:lysnikolaou
|
|
|
|
|
|
|
| |
barry_as_flufl rule (GH-23048) (GH-23051)
(cherry picked from commit 06f8c3328dcd81c84d1ee2b3a57b5381dcb38482)
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
|
|
|
| |
(cherry picked from commit 15acc4eaba8519d7d5f2acaffde65446b44dcf79)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
overflow (GH-22966) (GH-22980)
Fix memory leak in subprocess.Popen() in case of uid/gid overflow
Also add a test that would catch this leak with `--huntrleaks`.
Alas, the test for `extra_groups` also exposes an inconsistency
in our error reporting: we use a custom ValueError for `extra_groups`,
but propagate OverflowError for `user` and `group`.
(cherry picked from commit c0590c0033e86f98cdf5f2ca6898656f98ab4053)
Co-authored-by: Alexey Izbyshev <izbyshev@ispras.ru>
Automerge-Triggered-By: GH:gpshead
|
|
|
|
|
| |
and 1 (GH-22870). (GH-22963)
(cherry picked from commit 8cd1dbae32d9303caac3a473d3332f17bc98c921)
|
|
|
|
|
|
|
|
|
|
| |
char in PATHEXT (GH-20088) (GH-22912)
shutil.which will not return None anymore for empty str in PATHEXT
Empty PATHEXT will now be defaulted to _WIN_DEFAULT_PATHEXT
(cherry picked from commit da6f098188c9825f10ae60db8987056b3a54c2e8)
Co-authored-by: Christopher Marchfelder <marchfelder@googlemail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
tarfile writes full path to FNAME field of GZIP format instead of just basename if user specified absolute path. Some archive viewers may process file incorrectly. Also it creates security issue because anyone can know structure of directories on system and know username or other personal information.
RFC1952 says about FNAME:
This is the original name of the file being compressed, with any directory components removed.
So tarfile must remove directory names from FNAME and write only basename of file.
Automerge-Triggered-By: @jaraco
(cherry picked from commit 22748a83d927d3da1beaed771be30887c42b2500)
Co-authored-by: Artem Bulgakov <ArtemSBulgakov@ya.ru>
|
|
|
|
|
|
|
| |
Use wide-char _W_* fields of lconv structure on Windows
Remove "ps_AF" from test__locale.known_numerics on Windows
(cherry picked from commit f2312037e3a974d26ed3e23884f94c6af111a27a)
Co-authored-by: TIGirardi <tiagoigirardi@gmail.com>
|
|
|
|
|
|
|
| |
(GH-22764) (GH-22806)
(cherry picked from commit 3185267400be853404f22a1e06bb9fe1210735c7)
Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
|
|
|
|
|
|
|
| |
(GH-22762) (GH-22773)
(cherry picked from commit 93a1ccabdede416425473329b8c718d507c55e29)
Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
|
|
|
|
|
| |
(cherry picked from commit 05ee790f4d1cd8725a90b54268fc1dfe5b4d1fa2)
Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
|
|
|
|
|
|
|
|
| |
(GH-22691)
Reduces the rate at which the ENV CHANGED failure occurs in test_asyncio SSL tests (due to unclosed transport), but does not 100% resolve it.
(cherry picked from commit de73d432bb29f6439f2db16cb991e15e09c70c26)
Co-authored-by: Justin Turner Arthur <justinarthur@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-18074)
This PR replaces GH-1977. The reason for the replacement is two-fold.
The fix itself is different is that if the CTE header doesn't exist in the original message, it is inserted. This is important because the new CTE could be quoted-printable whereas the original is implicit 8bit.
Also the tests are different. The test_nonascii_as_string_without_cte test in GH-1977 doesn't actually test the issue in that it passes without the fix. The test_nonascii_as_string_without_content_type_and_cte test is improved here, and even though it doesn't fail without the fix, it is included for completeness.
Automerge-Triggered-By: @warsaw
(cherry picked from commit bf838227c35212709dc43b3c3c57f8e1655c1d24)
Co-authored-by: Mark Sapiro <mark@msapiro.net>
|
|
|
|
|
| |
working dir (GH-19910)
(cherry picked from commit 3c0ac18504cfeed822439024339d5717f42bdd66)
|
|
|
|
|
|
| |
(cherry picked from commit c304c9a7efa8751b5bc7526fa95cd5f30aac2b92)
Co-authored-by: scaramallion <scaramallion@users.noreply.github.com>
|
|
|
|
|
|
|
| |
(GH-19940)
(cherry picked from commit 3635388f52b42e5280229104747962117104c453)
Co-authored-by: Max Bernstein <tekknolagi@users.noreply.github.com>
|
|
|
| |
(cherry picked from commit c13b847a6f913b72eeb71651ff626390b738d973)
|
|
|
|
|
| |
(cherry picked from commit 6a48518e8dac3521ff387ee67cdf33783114a257)
Co-authored-by: Ned Deily <nad@python.org>
|
|
|
|
|
|
|
|
|
|
| |
(GH-22619) (#22624)
There are two different `SimpleQueue` types imported (from `multiprocessing.queues` and `queue`) in `Lib/test/test_genericalias.py`, the second one shadowing the first one, making the first one not actually tested. Fix by using different names.
Automerge-Triggered-By: @gvanrossum.
(cherry picked from commit b2c0a43699bd9023a69e3fa554f5488a2e17e278)
Co-authored-by: Saiyang Gou <gousaiyang@163.com>
|
|
|
|
|
|
|
|
|
|
| |
(GH-22655) (GH-22656)
The test now waits until all threads complete to avoid leaking
running threads.
Also, use regular threads rather than daemon threads.
(cherry picked from commit 13ff396c019d548ba181cf22c6f39309a300723c)
|
|
|
|
|
|
|
| |
(GH-22039)
(cherry picked from commit 5f0769a)
Co-authored-by: Nathan M <nathanmaynes@gmail.com>
|
|
|
|
|
|
|
| |
(GH-22612)
Co-authored-by: Batuhan Taskaya <batuhanosmantaskaya@gmail.com>
Automerge-Triggered-By: @pablogsal
|
|
|
|
|
|
|
| |
imported (GH-22595) (GH-22609)
(cherry picked from commit 4a9f82f50d957b6cf3fd207de8b583d9137316b8)
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
|
|
|
|
|
|
|
| |
codec tests (GH-22566)
(cherry picked from commit 2ef5caa58febc8968e670e39e3d37cf8eef3cab8)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
|
|
|
|
| |
Call urllib.request.urlcleanup() to reset the global
urllib.request._opener.
(cherry picked from commit 1fce240d6c4b2b2cc17a86e88c65169e15b9feeb)
Co-authored-by: Victor Stinner <vstinner@python.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-22550)
Enable recursion checks which were disabled when get __bases__ of
non-type objects in issubclass() and isinstance() and when intern
strings. It fixes a stack overflow when getting __bases__ leads
to infinite recursion.
Originally recursion checks was disabled for PyDict_GetItem() which
silences all errors including the one raised in case of detected
recursion and can return incorrect result. But now the code uses
PyDict_GetItemWithError() and PyDict_SetDefault() instead.
(cherry picked from commit 9ece9cd65cdeb0a1f6e60475bbd0219161c348ac)
|
|
|
|
|
|
|
| |
symtable module (GH-22391). (GH-22528)
(cherry picked from commit fb0a4651f1be4ad936f8277478f73f262d8eeb72)
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
|