| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* [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
|
|
|
|
|
|
|
|
|
|
| |
* 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>
|
|
|
|
|
|
| |
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 fd4ed57674c675e05bd5d577dd5047a333c76c78)
Co-authored-by: Jakub Stasiak <jakub@stasiak.at>
|
|
|
|
|
|
|
| |
(cherry picked from commit 9568622c9983b682b2a2a7bacfd3c341028ea099)
Co-authored-by: Jakub Kulík <Kulikjak@gmail.com>
Co-authored-by: Jakub Kulík <Kulikjak@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
(cherry picked from commit c32f2976b8f4034724c3270397aa16f38daf470f)
Co-authored-by: Zackery Spytz <zspytz@gmail.com>
|
|
|
|
|
| |
and 1 (GH-22870). (GH-22963)
(cherry picked from commit 8cd1dbae32d9303caac3a473d3332f17bc98c921)
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
Co-authored-by: Christian Heimes <christian@python.org>
(cherry picked from commit 5456e78f4593edc277ab72fb9a9db1ebae7d4c2d)
Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
|
|
|
| |
(cherry picked from commit c13b847a6f913b72eeb71651ff626390b738d973)
|
|
|
|
|
|
|
| |
Fix a null pointer dereference in tracemalloc_copy_trace()
of _tracemalloc.
(cherry picked from commit 66c28f50c76e4f23af7146e0e580457c5fd6bde7)
Co-authored-by: Yunlongs <lylgood@foxmail.com>
|
|
|
|
|
|
|
| |
methods (GH-22418)
(cherry picked from commit 52301312bb9de2299b0c42468fd1936d869e651c)
Co-authored-by: Ram Rachum <ram@rachum.com>
|
|
|
|
|
|
|
|
| |
pymain_run_module (GH-21956) (#22397)
Closes bpo issue 41602.
(cherry picked from commit a68a2ad19c891faa891904b3da537911cc77df21)
Co-authored-by: Thomas Grainger <tagrain@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
GH- [bpo-41815](): SQLite: fix segfault if backup called on closed database
Attempting to backup a closed database will trigger segfault:
```python
import sqlite3
target = sqlite3.connect(':memory:')
source = sqlite3.connect(':memory:')
source.close()
source.backup(target)
```
(cherry picked from commit bfee9fad84531a471fd7864e88947320669f68e2)
Co-authored-by: Peter McCormick <peter@pdmccormick.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>
|
|
|
|
|
|
|
|
|
|
| |
I just realized that my recent PR with sendfile on Solaris ([PR 22040](https://github.com/python/cpython/pull/22040)) has broken error handling.
Sorry for that, this simple followup fixes that.
Automerge-Triggered-By: @1st1
(cherry picked from commit fa8c9e70104b0aef966a518eb3a80a4881906ae0)
Co-authored-by: Jakub Kulík <Kulikjak@gmail.com>
|
|
|
|
|
|
|
| |
(GH-22273)
(cherry picked from commit 8c0be6fd9101746235b63ddfb84106d1e9ca286b)
Co-authored-by: Jakub Kulík <Kulikjak@gmail.com>
|
|
|
|
|
|
|
| |
(GH-21072)
(cherry picked from commit 930f4518aea7f3f0f914ce93c3fb92831a7e1d2a)
Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Fix refleak in C module __init_subclass__
This was leaking a reference to the weak cache dictionary for every
ZoneInfo subclass created.
* Fix refleak in ZoneInfo subclass's clear_cache
The previous version of the code accidentally cleared the global
ZONEINFO_STRONG_CACHE variable (and inducing `ZoneInfo` to create a new
strong cache) on calls to a subclass's `clear_cache()`. This would not
affect guaranteed behavior, but it's still not the right thing to do
(and it caused reference leaks).
(cherry picked from commit c3dd7e45cc5d36bbe2295c2840faabb5c75d83e4)
Co-authored-by: Paul Ganssle <paul@ganssle.io>
|
|
|
|
|
|
|
| |
This applies to the default "extc99" mode. Python does not compile with "stdc99".
(cherry picked from commit 40e700ad042089120456cc2ee79b8ca69479416b)
Authored-by: Stefan Krah <skrah@bytereef.org>
|
|
|
|
|
|
|
|
|
|
| |
when peer closes connection during TLS negotiation (GH-18772)
[bpo-31122](): ssl.wrap_socket() now raises ssl.SSLEOFError rather than OSError when peer closes connection during TLS negotiation
Reproducer: http://tiny.cc/f4ztnz (tiny url because some bot keeps renaming b.p.o.-nnn as bpo links)
(cherry picked from commit 495bd035662fda29639f9d52bb6baebea31d72fa)
Co-authored-by: Dima Tisnek <dimaqq@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Prior to this change, attempting to subclass the C implementation of
zoneinfo.ZoneInfo gave the following error:
TypeError: unbound method ZoneInfo.__init_subclass__() needs an argument
https://bugs.python.org/issue41025
(cherry picked from commit 87d8287865e5c9f137f6b5cf8c34c2c509eb5e9d)
Co-authored-by: Paul Ganssle <paul@ganssle.io>
|
|
|
|
|
|
|
| |
Do not call PyObject_CallMethod() with a live exception (like
KeyboardInterrupt).
(cherry picked from commit eca2549f5a5048b44ca88b9555f1c62f094e3c12)
Co-authored-by: Zackery Spytz <zspytz@gmail.com>
|
|
|
|
|
|
|
| |
(GH-19686)
(cherry picked from commit af4eda46d1538b1da700a86588bdb94b0a4d1ff2)
Co-authored-by: Zackery Spytz <zspytz@gmail.com>
|
|
|
|
|
| |
(cherry picked from commit 0108b2a2401d0ffffe7c07e5ab69a3b0c7593070)
Co-authored-by: Benjamin Peterson <benjamin@python.org>
|
|
|
|
|
|
|
|
|
|
| |
Move definition of UNUSED from modified headers of libmpdec to
_decimal.c itself. This makes the vendored source closer to the
standalone library and fixes build with --with-system-libmpdec.
Tested to build fine with either system libmpdec or the vendored one.
(cherry picked from commit 015efdbef7454a522e88cd79ba2b4cd77a5fb2a2)
Co-authored-by: Felix Yan <felixonmars@archlinux.org>
|
|
|
|
|
|
| |
Automerge-Triggered-By: @tiran
(cherry picked from commit 4f309abf55f0e6f8950ac13d6ec83c22b8d47bf8)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
|
|
|
|
| |
(GH-21407)
(cherry picked from commit ee96f32ca24779656d3c8736d26671fc3689f0a3)
Co-authored-by: Zackery Spytz <zspytz@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
The running loop holder cache variable was always set to NULL when
calling set_running_loop.
Now set_running_loop saves the newly created running loop holder in the
cache variable for faster access in get_running_loop.
Automerge-Triggered-By: @1st1
(cherry picked from commit 529f42645d38b6b0075f256814dfb3d220ac7d92)
Co-authored-by: Tony Solomonik <tony.solomonik@gmail.com>
|
|
|
|
|
|
|
| |
(GH-21385)
(cherry picked from commit aebc0495572c5bb85d2bd97d27cf93ab038b5a6a)
Co-authored-by: Zackery Spytz <zspytz@gmail.com>
|
|
|
|
|
|
|
|
|
| |
is embedded (GH-21297)
Also enables using debug build of `python3_d.dll`
Reference: CVE-2020-15523
(cherry picked from commit dcbaa1b49cd9062fb9ba2b9d49555ac6cd8c60b5)
Co-authored-by: Steve Dower <steve.dower@python.org>
|
|
|
|
|
|
|
|
| |
PyUnicode_EncodeDecimal and PyUnicode_TransformDecimalToASCII
are deprecated since Python 3.3.
But Py_DEPRECATED(3.3) was commented out.
(cherry picked from commit 13c90e82b6a1c3baff7f48f1bdc38058f6072f04)
Co-authored-by: Inada Naoki <songofacandy@gmail.com>
|
|
|
|
|
|
|
|
| |
"tp_setattro()" (GH-21092)
Automerge-Triggered-By: @gvanrossum
(cherry picked from commit 148f32913573c29250dfb3f0d079eb8847633621)
Co-authored-by: scoder <stefan_ml@behnel.de>
|
|
|
|
|
|
|
| |
asyncio.Task.all_tasks() (GH-20874)
(cherry picked from commit 004e64e8059fe68a72890314673282f2e60d5ce1)
Co-authored-by: Rémi Lapeyre <remi.lapeyre@lenstra.fr>
|
|
|
|
|
|
|
| |
(GH-21202)
(cherry picked from commit 8bea91b5e9ea07ca93958e131b436024f0b1b1cf)
Authored-by: Stefan Krah <skrah@bytereef.org>
|
|
|
|
| |
(#21022)
|
|
|
|
|
|
|
|
| |
tracemalloc_get_frame() checked filename == NULL two times in a row.
Signed-off-by: Christian Heimes <christian@python.org>
(cherry picked from commit 9cfcdb7d6e4d09bde63bc7116b2ab0d96724527e)
Co-authored-by: Christian Heimes <christian@python.org>
|
|
|
|
|
|
| |
characters. (GH-21035). (GH-21156)
(cherry picked from commit 700cfa8c90a90016638bac13c4efd03786b2b2a0)
|
|
|
|
|
| |
(cherry picked from commit a7dc71470156680f1fd5243290c6d377824b7ef4)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
|
|
| |
(cherry picked from commit 6c6810d98979add7a89391c3c38990d0859f7a29)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
|
|
|
|
|
| |
This was detected by our Coverity scan as a REVERSE_INULL issue.
Automerge-Triggered-By: @gpshead
(cherry picked from commit d780fa7)
Co-authored-by: Gregory P. Smith <greg@krypto.org>
|
|
|
|
|
|
|
| |
select module (GH-21066) (GH-21097)
(cherry picked from commit d051801052211b533c46a593b1c1bccf649a171c)
Automerge-Triggered-By: @vstinner
|
|
|
|
|
|
|
| |
Fix integer overflow in the :meth:`array.array.index` method on 64-bit Windows
for index larger than ``2**31``.
(cherry picked from commit 1d3dad5f96ed445b958ec53dfa0d46812f2162d9)
Co-authored-by: WildCard65 <WildCard65@users.noreply.github.com>
|
|
|
|
|
|
|
|
| |
Unexpected errors in calling the __iter__ method are no longer
masked by TypeError in csv.reader(), csv.writer.writerow() and
csv.writer.writerows().
(cherry picked from commit c88239f864a27f673c0f0a9e62d2488563f9d081)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
|
|
|
| |
Signed-off-by: Christian Heimes <christian@python.org>
(cherry picked from commit 4901ea952691ad70aae21cfe04b6bd363b5a6aff)
Co-authored-by: Christian Heimes <christian@python.org>
|
|
|
|
|
|
|
|
| |
module. (GH-21009)
Detected by Coverity.
(cherry picked from commit eb0d5c38de7f970d8cd8524f4163d831c7720f51)
Co-authored-by: Gregory P. Smith <greg@krypto.org>
|
|
|
|
|
|
|
| |
(GH-21002). (GH-21030)
(cherry picked from commit 6989af0bc7ea1e9a1acea16794e6f723d7b44110)
Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>
|
|
|
|
|
| |
Co-authored-by: Kyle Stanley <aeros167@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
(cherry picked from commit 2c4928d37edc5e4aeec3c0b79fa3460b1ec9b60d)
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On Windows, GH-include "pyerrors.h" no longer defines "snprintf" and
"vsnprintf" macros.
PyOS_snprintf() and PyOS_vsnprintf() should be used to get portable
behavior.
Replace snprintf() calls with PyOS_snprintf() and replace vsnprintf()
calls with PyOS_vsnprintf().
(cherry picked from commit e822e37946f27c09953bb5733acf3b07c2db690f)
Co-authored-by: Victor Stinner <vstinner@python.org>
|