See https: //github.com/python/core-workflow/issues/380
Signed-off-by: Filipe Laíns <lains@archlinux.org>
(cherry picked from commit d20b7ed9c1)
Co-authored-by: Filipe Laíns <lains@archlinux.org>
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 dd844a2916)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Removing 'evaluate' makes it more consistent with other assertX entries.
(cherry picked from commit bd8c22e1fa)
Co-authored-by: Ram Rachum <ram@rachum.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 0f20bd9042)
Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
I believe this is a mistake. SIGCHLD is only available on Unix systems, not Windows.
(cherry picked from commit 4c24b08cd3)
Co-authored-by: Zhang Maiyun <myzhang1029@hotmail.com>
Co-authored-by: Zhang Maiyun <myzhang1029@hotmail.com>
* There were leaks if Py_tp_bases is used more than once or if some call is
failed before setting tp_bases.
* There was a crash if the bases argument or the Py_tp_bases slot is not a tuple.
* The documentation was not accurate.
(cherry picked from commit 1db76394ea)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.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 31729366e2)
Co-authored-by: Devin Jeanpierre <jeanpierreda@google.com>
Inspect.getdoc(ob) sometimes gets docstrings when ob.__doc__ is None.
(cherry picked from commit 7ddbaa7a1b)
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 8fba9523cf)
(cherry picked from commit c53c3f4000)
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 ce04e7105b)
Co-authored-by: Christian Heimes <christian@python.org>
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 05a5d697f4)
The University of Washington stopped hosting the IMAP documents. Link to a rescued copy on GitHub.
(cherry picked from commit aa01011003)
Co-authored-by: Yash Shete <universeyash4@gmail.com>
(cherry picked from commit bbeb2d266d)
Co-authored-by: Jürgen Gmach <juergen.gmach@googlemail.com>
Co-authored-by: Jürgen Gmach <juergen.gmach@googlemail.com>
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 e59b2deffd)
Co-authored-by: Michal Čihař <michal@cihar.com>
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 42d873c63a)
Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
It is not clear why this can happen, but several users have mentioned
getting this exception on macOS.
(cherry picked from commit 23831a7a90)
Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
Fixes a grammar problem by adding a missing "as", and clarifies the wording of the valid ranges for max_workers.
(cherry picked from commit fd6f6fa403)
Co-authored-by: Don Kirkby <donkirkby@users.noreply.github.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 34637a0ce2)
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 da7bb7b4d7)
Co-authored-by: Tal Einat <taleinat+github@gmail.com>
[[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 2165cea548)
Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
Automerge-Triggered-By: GH:ronaldoussoren
Sort also dependencies and remove duplicates (liblzma-dev).
(cherry picked from commit 6e03c0ad15)
Co-authored-by: Victor Stinner <vstinner@python.org>
func_dealloc() does not handle partially-created objects. Best not to give it any.
(cherry picked from commit 350526105f)
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 0b419b7910)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>