| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
| |
Restore fix from 011525ee92eb1c13ad1a62d28725a840e28f8160.
(cherry picked from commit 4fedd7123eaf147edd55eabbbd72e0bcc8368e47)
Co-authored-by: Julien Palard <julien@palard.fr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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)
(cherry picked from commit c53c3f400050a7edc92ccb7285a6d7eeb4c37fd2)
Co-authored-by: Victor Stinner <vstinner@python.org>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
| |
(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>
|
|
|
|
|
|
|
|
|
|
|
| |
* 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)
|
|
|
|
|
|
|
| |
(GH-23067)
(cherry picked from commit 301822859b3fc34801a06f1090d62f9f2ee5b092)
Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-23059) (GH-23070)
[[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
|
|
|
|
|
|
|
|
|
|
| |
char in PATHEXT (GH-20088) (GH-22913)
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-22807)
(cherry picked from commit 3185267400be853404f22a1e06bb9fe1210735c7)
Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
|
|
|
|
|
|
|
| |
(GH-22762) (GH-22774)
(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)
|
|
|
|
| |
urllib.parse.unquote (GH-22746)
|
|
|
|
|
|
| |
(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>
|
|
|
|
|
|
|
| |
* bpo-41855: Backport fixes from importlib_metadata 1.5.2.
* Add blurb.
* Add anchor for finders and loaders
|
|
|
| |
(cherry picked from commit c13b847a6f913b72eeb71651ff626390b738d973)
|
|
|
|
|
| |
(cherry picked from commit 6a48518e8dac3521ff387ee67cdf33783114a257)
Co-authored-by: Ned Deily <nad@python.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-22655) (GH-22656) (GH-22662)
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)
(cherry picked from commit f5393dc2a0ced7bf670ebc56b5fd10a3eb328d1a)
Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Victor Stinner <vstinner@python.org>
|
|
|
|
|
|
|
|
|
| |
codec tests (GH-22566) (GH-22577)
(cherry picked from commit 2ef5caa58febc8968e670e39e3d37cf8eef3cab8)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
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-22551)
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-22529)
(cherry picked from commit fb0a4651f1be4ad936f8277478f73f262d8eeb72)
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
|
|
|
|
|
| |
default namespace was defined. (GH-22474) (GH-22508)
(cherry picked from commit 6a412c94b6b68e7e3632562dc7358a12ffd1447f)
|
|
|
|
|
| |
(cherry picked from commit ff9147d93b868f0e13b9fe14e2a76c2879f6787b)
Co-authored-by: Jan Mazur <16736821+mzr@users.noreply.github.com>
|
|
|
|
|
|
|
|
| |
pymain_run_module (GH-21956) (#22398)
Closes bpo issue 41602.
(cherry picked from commit a68a2ad19c891faa891904b3da537911cc77df21)
Co-authored-by: Thomas Grainger <tagrain@gmail.com>
|
|
|
|
|
| |
(cherry picked from commit ae0d2a33ec05aece939a959d36fcf1df1e210a08)
Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
|
|
|
|
|
|
|
| |
fix default `_missing_` to return `None` instead of raising a `ValueError`
Co-authored-by: Andrey Darascheka <andrei.daraschenka@leverx.com>.
(cherry picked from commit c95ad7a91fbd7636f33a098d3b39964ab083bf49)
Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
|
|
|
|
|
| |
(cherry picked from commit fc23a9483ef0d7c98bea9f82392377d0b6ef7b18)
Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
|
|
|
|
|
|
| |
fix bug that let Enums be extended via multiple inheritance
(cherry picked from commit 3064dbf5df1021e85b507366a7ea448c8895efe7)
Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
|
|
|
|
|
|
|
|
| |
EnumMeta double-checks that `__repr__`, `__str__`, `__format__`, and `__reduce_ex__` are not the same as `object`'s, and replaces them if they are -- even if that replacement was intentionally done in the Enum being constructed. This patch fixes that.
Automerge-Triggered-By: @ethanfurman
(cherry picked from commit 22415ad62555d79bd583b4a7d6a96006624a8277)
Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
|
|
|
|
|
| |
(cherry picked from commit bff01f3a3aac0c15fe8fbe8b2f561f7927d117a1)
Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
|
|
|
|
|
|
| |
* bpo-37479: on Enum subclasses with mixins, __format__ uses overridden __str__.
(cherry picked from commit 2f19e82fbe98ce86bcd98a176328af2808b678e8)
Co-authored-by: thatneat <thatneat@users.noreply.github.com>
|
|
|
|
|
|
|
| |
Argument script_exec_args is usually an absolute file name,
but twice has form ['-m', 'module_name'].
(cherry picked from commit 7e711ead26fea6465e0ef2e3b8880b57ba8fc129)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
|
|
|
|
|
| |
(cherry picked from commit 58de1dd6a8677bd213802c19204b827cb7134695)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
|
|
| |
(cherry picked from commit fd4cafd4700dc03cb05fc2e5263c2666d785d6e3)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
|
|
|
|
|
| |
The error is exposed on non-UTF-8 locales.
(cherry picked from commit 67987acd5dc9776f55f4e139e2b3d9e7a6434d9f)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
(cherry picked from commit c73ee5acc96b4bbd6885156883b224b8cc3e470c)
|
|
|
|
|
|
|
| |
(cherry picked from commit 54a66ade2067c373d31003ad260e1b7d14c81564)
Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>
Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Simply closing the event loop isn't enough to avoid warnings. If we
don't also shut down the event loop's default executor, it sometimes
logs a "dangling thread" warning.
Follow-up to GH-22017
(cherry picked from commit be435ae2b064dc64f04475bec632862e1dbf605f)
Co-authored-by: Ben Darnell <ben@bendarnell.com>
Co-authored-by: Ben Darnell <ben@bendarnell.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* bpo-41696: Fix handling of debug mode in asyncio.run
This allows PYTHONASYNCIODEBUG or -X dev to enable asyncio debug mode
when using asyncio.run
* 📜🤖 Added by blurb_it.
Co-authored-by: hauntsaninja <>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
(cherry picked from commit 0770ad948cb6d9f7f6c4002efd83e27c27069808)
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Stopping and restarting a proactor event loop on windows can lead to
spurious errors logged (ConnectionResetError while reading from the
self pipe). This fixes the issue by ensuring that we don't attempt
to start multiple copies of the self-pipe reading loop.
(cherry picked from commit ea5a6363c3f8cc90b7c0cc573922b10f296073b6)
Co-authored-by: Ben Darnell <ben@bendarnell.com>
Co-authored-by: Ben Darnell <ben@bendarnell.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
subclasses (GH-22020) (GH-22046)
When allocating MemoryError classes, there is some logic to use
pre-allocated instances in a freelist only if the type that is being
allocated is not a subclass of MemoryError. Unfortunately in the
destructor this logic is not present so the freelist is altered even
with subclasses of MemoryError..
(cherry picked from commit 9b648a95ccb4c3b14f1e87158f5c9f5dbb2f62c0)
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>.
(cherry picked from commit 87e91ae2e5f81e096c32839f211c68a749a4435a)
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
|
|
|
|
|
|
|
|
|
| |
(GH-22019)
(cherry picked from commit 475a5fbb5644ea200c990d85d8c264e78ab6c7ea)
Co-authored-by: Vinay Sharma <vinay04sharma@icloud.com>
Co-authored-by: Vinay Sharma <vinay04sharma@icloud.com>
|
|
|
|
|
|
|
| |
(GH-21935) (#21976)
(cherry picked from commit 022bc7572f061e1d1132a4db9d085b29707701e7)
Co-authored-by: Irit Katriel <iritkatriel@yahoo.com>
|
|
|
|
|
| |
(cherry picked from commit 94ad6c674f7687ef22853cb8d42b440d6b42ddc8)
Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>
|
|
|
|
|
|
|
|
|
| |
0 (GH-21895) (#21967)
When I was fixing bpo-32751 back in GH-7216 I missed the case when
*timeout* is zero or negative. This takes care of that.
Props to @aaliddell for noticing the inconsistency..
(cherry picked from commit c517fc712105c8e5930cb42baaebdbe37fc3e15f)
|