| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
| |
(cherry picked from commit c266736ec1f9ebef38b134ceb4832df015711b38)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Several built-in and standard library types now ensure that their internal result tuples are always tracked by the garbage collector:
- collections.OrderedDict.items
- dict.items
- enumerate
- functools.reduce
- itertools.combinations
- itertools.combinations_with_replacement
- itertools.permutations
- itertools.product
- itertools.zip_longest
- zip
Previously, they could have become untracked by a prior garbage collection.
(cherry picked from commit 226a012d1cd61f42ecd3056c554922f359a1a35d)
|
|
|
|
|
|
|
| |
distutils (GH-22088)
(cherry picked from commit c0afb7fa0ebd1c0e95c0760bbe75a99a8dd12ea6)
Co-authored-by: Matti Picus <matti.picus@gmail.com>
|
|
|
|
|
|
|
|
| |
range (GH-23633)
This can happen when a file was edited after it was imported.
(cherry picked from commit 2e0760bb2edb595050aff82f236cd32b44d3dfb3)
Co-authored-by: Irit Katriel <iritkatriel@yahoo.com>
|
|
|
|
|
| |
(cherry picked from commit 6e1eec71f59c344fb23c7977061dc2c97b77d51b)
Co-authored-by: Irit Katriel <iritkatriel@yahoo.com>
|
|
|
|
|
|
|
| |
https://bugzilla.redhat.com/show_bug.cgi?id=1866884 is fixed in gdb
10.1 (failed to reproduce on gdb-10.1-1.fc34.aarch64).
(cherry picked from commit 066394018a8463643cc63d933493f0afa99d72cc)
Co-authored-by: Victor Stinner <vstinner@python.org>
|
|
|
|
|
|
|
|
| |
Fix test_asyncio.test_call_later() race condition: don't measure
asyncio performance in the call_later() unit test. The test failed
randomly on the CI.
(cherry picked from commit 7e5e13d113798117d5ef25c5ffdbd0eb39420f98)
Co-authored-by: Victor Stinner <vstinner@python.org>
|
|
|
|
|
| |
(cherry picked from commit 427613f005f0f412d12f0d775d2b609bae0ae1ad)
Co-authored-by: Irit Katriel <iritkatriel@yahoo.com>
|
|
|
|
|
|
|
|
|
| |
* bpo-42406: Fix whichmodule() with multiprocessing
Signed-off-by: Renato L. de F. Cunha <renatoc@br.ibm.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
(cherry picked from commit 86684319d3dad8e1a7b0559727a48e0bc50afb01)
Co-authored-by: Renato Cunha <renatocunha@acm.org>
|
|
|
|
|
|
|
| |
(GH-21925) (#23540)
Co-Authored-By: Tyler Bell <mrbell321@gmail.com>
(cherry picked from commit 8085f742f4adfbc85f13fc734dfab036aa23acfb)
Co-authored-by: Zackery Spytz <zspytz@gmail.com>
|
|
|
|
|
|
| |
Restore fix from 011525ee92eb1c13ad1a62d28725a840e28f8160.
(cherry picked from commit 4fedd7123eaf147edd55eabbbd72e0bcc8368e47)
Co-authored-by: Julien Palard <julien@palard.fr>
|
|
|
|
|
|
|
|
|
| |
The function accepts now the representation of the default state as
empty sequence (as returned by Style.map()).
The structure of the result is now the same on all platform
and does not depend on the value of wantobjects.
(cherry picked from commit dd844a2916fb3a8f481ec7c732802c13c3375691)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
|
|
| |
(cherry picked from commit 453bc1da2023d6cbe362637a2e0b06d0521f013c)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
|
|
|
| |
As [bpo-38443]() says the error message from configure when specifying --enable-universalsdk with a set of architectures that is not supported by the compiler is not very helpful. This PR explicitly checks if the compiler works and bails out if it doesn't.
(cherry picked from commit 0f20bd9042c9b7fce20c3b9511cd0820b30094c3)
Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
|
|
|
|
|
|
|
|
|
|
| |
* bpo-40791: Make compare_digest more constant-time.
The existing volatile `left`/`right` pointers guarantee that the reads will all occur, but does not guarantee that they will be _used_. So a compiler can still short-circuit the loop, saving e.g. the overhead of doing the xors and especially the overhead of the data dependency between `result` and the reads. That would change performance depending on where the first unequal byte occurs. This change removes that optimization.
(This is change GH-1 from https://bugs.python.org/issue40791 .)
(cherry picked from commit 31729366e2bc09632e78f3896dbce0ae64914f28)
Co-authored-by: Devin Jeanpierre <jeanpierreda@google.com>
|
|
|
|
|
|
| |
Inspect.getdoc(ob) sometimes gets docstrings when ob.__doc__ is None.
(cherry picked from commit 7ddbaa7a1b3e61847ee99658be6a7268a049e302)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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-23349)
bpo-41686, bpo-41713: On Windows, the SIGINT event,
_PyOS_SigintEvent(), is now created even if Python is configured to
not install signal handlers (PyConfig.install_signal_handlers=0 or
Py_InitializeEx(0)).
(cherry picked from commit 05a5d697f4f097f37c5c1e2ed0e2338a33c3fb6a)
|
|
|
|
|
| |
(cherry picked from commit 9cc9e277254023c0ca08e1a9e379fd89475ca9c2)
Co-authored-by: Steve Dower <steve.dower@python.org>
|
|
|
|
|
|
| |
The University of Washington stopped hosting the IMAP documents. Link to a rescued copy on GitHub.
(cherry picked from commit aa01011003bb855cd52abfd49f2443446590d913)
Co-authored-by: Yash Shete <universeyash4@gmail.com>
|
|
|
|
|
| |
(cherry picked from commit 9b6934230c35e24d8582ea8c58456fa8eab72ae2)
Co-authored-by: Steve Dower <steve.dower@python.org>
|
|
|
|
|
| |
(cherry picked from commit fd4ed57674c675e05bd5d577dd5047a333c76c78)
Co-authored-by: Jakub Stasiak <jakub@stasiak.at>
|
|
|
|
|
|
|
|
|
|
| |
The onerror is supposed to be called with failed function, but in this case lstat is wrongly used instead of open.
Not sure if this needs bug or not...
Automerge-Triggered-By: GH:hynek
(cherry picked from commit e59b2deffde61e5641cabd65034fa11b4db898ba)
Co-authored-by: Michal Čihař <michal@cihar.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>
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-23075) (GH-23198)
It is not clear why this can happen, but several users have mentioned
getting this exception on macOS.
(cherry picked from commit 23831a7a90956e38b7d70304bb6afe30d37936de)
Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
|
|
|
|
|
| |
(cherry picked from commit 9568622c9983b682b2a2a7bacfd3c341028ea099)
Co-authored-by: Jakub Kulík <Kulikjak@gmail.com>
|
|
|
|
|
| |
(cherry picked from commit 212d32f45c91849c17a82750df1ac498d63976be)
Co-authored-by: Serhiy Storchaka <storchaka@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)
|
|
|
|
|
|
|
|
|
| |
They were occurring with both repeated 'force-calltip' invocations and by typing parentheses
in expressions, strings, and comments in the argument code.
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
(cherry picked from commit da7bb7b4d769350c5fd03e6cfb16b23dc265ed72)
Co-authored-by: Tal Einat <taleinat+github@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
|
|
|
|
|
|
|
|
| |
func object (GH-22953)
func_dealloc() does not handle partially-created objects. Best not to give it any.
(cherry picked from commit 350526105fa9b131d8b941ae753378b741dabb2f)
Co-authored-by: Yonatan Goldschmidt <yon.goldschmidt@gmail.com>
|
|
|
|
|
|
|
|
|
| |
* When the parameters argument is a list, correctly handle the case
of changing it during iteration.
* When the parameters argument is a custom sequence, no longer
override an exception raised in ``__len__()``.
(cherry picked from commit 0b419b791077414bbc011a412698ebb362b63761)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
| |
(cherry picked from commit 54636355805dd2877bb54fbad8d967e1ddd8b553)
|
|
|
|
|
| |
(cherry picked from commit 5df6c99cb450fe2f30be681dbf68cd1d34d3bbe4)
Co-authored-by: Mark Roseman <mark@markroseman.com>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
object.__ne__ (GH-22874) (#22877)
See Objects/typeobject.c:object_richcompare() for the implementation of this in CPython.
Co-authored-by: Brett Cannon <brett@python.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
representations of numeric classes (GH-18111) (GH-22861)
[[bpo-39416]()](): Document string representations of the Numeric classes
This is a change to the specification of the Python language.
The idea here is to put sane minimal limits on the Python language's default
representations of its Numeric classes. That way "Marty's Robotic Massage Parlor
and Python Interpreter" implementation of Python won't do anything too
crazy.
Some discussion in the email thread:
Subject: Documenting Python's float.__str__()
https://mail.python.org/archives/list/python-dev@python.org/thread/FV22TKT3S2Q3P7PNN6MCXI6IX3HRRNAL/
(cherry picked from commit c60394c7fc9cc09b16e9675a3eeb5844b6d8523f)
Co-authored-by: kpinc <kop@karlpinc.com>
Automerge-Triggered-By: GH:merwok
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
| |
(cherry picked from commit faddc7449d07e883b8ad8bb95dd68ce6dbdc06e8)
Co-authored-by: Miro Hrončok <miro@hroncok.cz>
|
|
|
|
|
|
|
| |
Andrew Clover (GH-22817)
(cherry picked from commit 6d883fbe14751b58d9ed2fd708322613d8931035)
Co-authored-by: Steve Dower <steve.dower@python.org>
|
|
|
|
|
|
|
| |
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-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>
|
|
|
|
|
|
| |
Co-authored-by: Christian Heimes <christian@python.org>
(cherry picked from commit 5456e78f4593edc277ab72fb9a9db1ebae7d4c2d)
Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
|
|
|
|
|
| |
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>
|