summaryrefslogtreecommitdiffstats
path: root/Modules
Commit message (Collapse)AuthorAgeFilesLines
* [3.9] bpo-41100: Support macOS 11 and Apple Silicon (GH-22855) (GH-23295)Ronald Oussoren2020-11-228-254/+981
| | | | | | | | | | | | | | | | | | | | * [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. (GH-20444)Miss Islington (bot)2020-11-211-1/+1
| | | | | | | | | | * 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: Always create the SIGINT event on Windows (GH-23344) (GH-23347)Victor Stinner2020-11-171-5/+47
| | | | | | 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)).
* bpo-42237: Fix os.sendfile() on illumos (GH-23154)Miss Islington (bot)2020-11-121-0/+15
| | | | | (cherry picked from commit fd4ed57674c675e05bd5d577dd5047a333c76c78) Co-authored-by: Jakub Stasiak <jakub@stasiak.at>
* bpo-35455: Fix thread_time for Solaris OS (GH-11118) (GH-23130)Miss Skeleton (bot)2020-11-041-0/+17
| | | | | | | (cherry picked from commit 9568622c9983b682b2a2a7bacfd3c341028ea099) Co-authored-by: Jakub Kulík <Kulikjak@gmail.com> Co-authored-by: Jakub Kulík <Kulikjak@gmail.com>
* [3.9] bpo-42146: Fix memory leak in subprocess.Popen() in case of uid/gid ↵Miss Skeleton (bot)2020-10-261-2/+2
| | | | | | | | | | | | | | | | | 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
* bpo-42144: Add a missing "goto error;" in the _ssl module (GH-22959)Miss Skeleton (bot)2020-10-251-0/+1
| | | | | (cherry picked from commit c32f2976b8f4034724c3270397aa16f38daf470f) Co-authored-by: Zackery Spytz <zspytz@gmail.com>
* [3.9] bpo-41052: Fix pickling heap types implemented in C with protocols 0 ↵Serhiy Storchaka2020-10-252-35/+1
| | | | | and 1 (GH-22870). (GH-22963) (cherry picked from commit 8cd1dbae32d9303caac3a473d3332f17bc98c921)
* bpo-38324: Fix test__locale.py Windows failures (GH-20529)Miss Skeleton (bot)2020-10-201-3/+22
| | | | | | | 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>
* bpo-16396: Allow wintypes to be imported on non-Windows systems. (GH-21394)Miss Skeleton (bot)2020-10-191-3/+6
| | | | | | Co-authored-by: Christian Heimes <christian@python.org> (cherry picked from commit 5456e78f4593edc277ab72fb9a9db1ebae7d4c2d) Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
* bpo-41984: GC track all user classes (GH-22701/GH-22702)Miss Skeleton (bot)2020-10-151-0/+20
| | | (cherry picked from commit c13b847a6f913b72eeb71651ff626390b738d973)
* bpo-41995: Fix null ptr deref in tracemalloc_copy_trace() (GH-22660)Miss Skeleton (bot)2020-10-131-1/+1
| | | | | | | Fix a null pointer dereference in tracemalloc_copy_trace() of _tracemalloc. (cherry picked from commit 66c28f50c76e4f23af7146e0e580457c5fd6bde7) Co-authored-by: Yunlongs <lylgood@foxmail.com>
* [3.9] bpo-41867: List options for timespec in docstrings of isoformat ↵Miss Skeleton (bot)2020-10-031-4/+8
| | | | | | | methods (GH-22418) (cherry picked from commit 52301312bb9de2299b0c42468fd1936d869e651c) Co-authored-by: Ram Rachum <ram@rachum.com>
* [3.9] bpo-41602: raise SIGINT exit code on KeyboardInterrupt from ↵Łukasz Langa2020-09-241-0/+4
| | | | | | | | pymain_run_module (GH-21956) (#22397) Closes bpo issue 41602. (cherry picked from commit a68a2ad19c891faa891904b3da537911cc77df21) Co-authored-by: Thomas Grainger <tagrain@gmail.com>
* bpo-41815: SQLite: segfault if backup called on closed database (GH-22322)Miss Islington (bot)2020-09-211-0/+4
| | | | | | | | | | | | | | | | 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>
* bpo-41662: Fix bugs in binding parameters in sqlite3 (GH-21998)Miss Islington (bot)2020-09-171-2/+5
| | | | | | | | | * 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>
* bpo-41687: Fix error handling in Solaris sendfile implementation (GH-22128)Miss Islington (bot)2020-09-161-3/+2
| | | | | | | | | | 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>
* [3.9] bpo-41687: Fix sendfile implementation to work with Solaris (GH-22040) ↵Łukasz Langa2020-09-161-0/+19
| | | | | | | (GH-22273) (cherry picked from commit 8c0be6fd9101746235b63ddfb84106d1e9ca286b) Co-authored-by: Jakub Kulík <Kulikjak@gmail.com>
* On path with known exact float, extract the double with the fast macro. ↵Miss Islington (bot)2020-09-041-5/+10
| | | | | | | (GH-21072) (cherry picked from commit 930f4518aea7f3f0f914ce93c3fb92831a7e1d2a) Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
* bpo-41568: Fix refleaks in zoneinfo subclasses (GH-21907)Miss Islington (bot)2020-08-171-3/+3
| | | | | | | | | | | | | | | | | * 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>
* bpo-40878: xlc cannot handle C99 extern inline. (GH-21891)Miss Islington (bot)2020-08-151-1/+1
| | | | | | | 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>
* bpo-31122: ssl.wrap_socket() now raises ssl.SSLEOFError rather than OSError ↵Miss Islington (bot)2020-08-151-4/+5
| | | | | | | | | | 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>
* bpo-41025: Fix subclassing for zoneinfo.ZoneInfo (GH-20965) (GH-21876)Miss Islington (bot)2020-08-141-1/+1
| | | | | | | | | | | 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>
* bpo-41336: Fix the error handling in zoneinfo_new_instance() (GH-21546)Miss Islington (bot)2020-07-201-1/+7
| | | | | | | Do not call PyObject_CallMethod() with a live exception (like KeyboardInterrupt). (cherry picked from commit eca2549f5a5048b44ca88b9555f1c62f094e3c12) Co-authored-by: Zackery Spytz <zspytz@gmail.com>
* bpo-40150: Fix mismatched argument in RegisterWaitForSingleObject() call ↵Miss Islington (bot)2020-07-151-3/+2
| | | | | | | (GH-19686) (cherry picked from commit af4eda46d1538b1da700a86588bdb94b0a4d1ff2) Co-authored-by: Zackery Spytz <zspytz@gmail.com>
* Fix -Wstring-prototypes warnings in _zoneinfo.c. (GH-21478)Miss Islington (bot)2020-07-151-2/+2
| | | | | (cherry picked from commit 0108b2a2401d0ffffe7c07e5ab69a3b0c7593070) Co-authored-by: Benjamin Peterson <benjamin@python.org>
* bpo-41302: Fix build with system libmpdec (GH-21481)Miss Islington (bot)2020-07-152-6/+5
| | | | | | | | | | 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>
* bpo-41288: Fix a crash in unpickling invalid NEWOBJ_EX. (GH-21458)Miss Islington (bot)2020-07-131-8/+21
| | | | | | Automerge-Triggered-By: @tiran (cherry picked from commit 4f309abf55f0e6f8950ac13d6ec83c22b8d47bf8) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* bpo-41252: Fix incorrect refcounting in _ssl.c's _servername_callback() ↵Miss Islington (bot)2020-07-091-1/+2
| | | | | | | (GH-21407) (cherry picked from commit ee96f32ca24779656d3c8736d26671fc3689f0a3) Co-authored-by: Zackery Spytz <zspytz@gmail.com>
* bpo-41247: asyncio.set_running_loop() cache running loop holder (GH-21401)Miss Islington (bot)2020-07-081-3/+9
| | | | | | | | | | | | 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>
* closes bpo-41235: Fix the error handling in SSLContext.load_dh_params() ↵Miss Islington (bot)2020-07-081-2/+4
| | | | | | | (GH-21385) (cherry picked from commit aebc0495572c5bb85d2bd97d27cf93ab038b5a6a) Co-authored-by: Zackery Spytz <zspytz@gmail.com>
* bpo-29778: Ensure python3.dll is loaded from correct locations when Python ↵Miss Islington (bot)2020-07-061-1/+44
| | | | | | | | | 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>
* Uncomment Py_DEPRECATED for Py_UNICODE APIs (GH-21318)Miss Islington (bot)2020-07-051-4/+4
| | | | | | | | 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>
* bpo-39960: Allow heap types in the "Carlo Verre" hack check that override ↵Miss Islington (bot)2020-07-031-0/+80
| | | | | | | | "tp_setattro()" (GH-21092) Automerge-Triggered-By: @gvanrossum (cherry picked from commit 148f32913573c29250dfb3f0d079eb8847633621) Co-authored-by: scoder <stefan_ml@behnel.de>
* bpo-40967: Remove deprecated asyncio.Task.current_task() and ↵Miss Islington (bot)2020-07-022-170/+1
| | | | | | | asyncio.Task.all_tasks() (GH-20874) (cherry picked from commit 004e64e8059fe68a72890314673282f2e60d5ce1) Co-authored-by: Rémi Lapeyre <remi.lapeyre@lenstra.fr>
* bpo-40874 Update the required libmpdec version for the decimal module ↵Miss Islington (bot)2020-06-281-2/+2
| | | | | | | (GH-21202) (cherry picked from commit 8bea91b5e9ea07ca93958e131b436024f0b1b1cf) Authored-by: Stefan Krah <skrah@bytereef.org>
* [3.9] bpo-35975: Only use cf_feature_version if PyCF_ONLY_AST in cf_flags ↵Guido van Rossum2020-06-281-1/+3
| | | | (#21022)
* Remove dead code from tracemalloc (GH-21029)Miss Islington (bot)2020-06-271-4/+0
| | | | | | | | 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>
* [3.9] bpo-41069: Make TESTFN and the CWD for tests containing non-ascii ↵Serhiy Storchaka2020-06-251-18/+18
| | | | | | characters. (GH-21035). (GH-21156) (cherry picked from commit 700cfa8c90a90016638bac13c4efd03786b2b2a0)
* bpo-41094: Additional fix for PYTHONSTARTUP. (GH-21119)Miss Islington (bot)2020-06-241-9/+43
| | | | | (cherry picked from commit a7dc71470156680f1fd5243290c6d377824b7ef4) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* bpo-41094: Fix decoding errors with audit when open files. (GH-21095)Miss Islington (bot)2020-06-242-6/+10
| | | | | (cherry picked from commit 6c6810d98979add7a89391c3c38990d0859f7a29) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.9] bpo-41056: Fix a possible MemoryError leak within zoneinfo. (GH-21007)Paul Ganssle2020-06-241-4/+2
| | | | | | | | 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>
* [3.9] bpo-31938: Fix default-value signatures of several functions in the ↵Anthony Sottile2020-06-232-13/+17
| | | | | | | select module (GH-21066) (GH-21097) (cherry picked from commit d051801052211b533c46a593b1c1bccf649a171c) Automerge-Triggered-By: @vstinner
* bpo-41085: Fix array.array.index() on 64-bit Windows (GH-21071)Miss Islington (bot)2020-06-231-1/+1
| | | | | | | 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>
* bpo-26407: Do not mask errors in csv. (GH-20536)Miss Islington (bot)2020-06-221-8/+8
| | | | | | | | 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>
* bpo-41061: Fix incorrect expressions in hashtable (GH-21028)Miss Islington (bot)2020-06-221-2/+2
| | | | | | Signed-off-by: Christian Heimes <christian@python.org> (cherry picked from commit 4901ea952691ad70aae21cfe04b6bd363b5a6aff) Co-authored-by: Christian Heimes <christian@python.org>
* bpo-41056: Fix a NULL pointer dereference on MemoryError within the ssl ↵Miss Islington (bot)2020-06-211-6/+6
| | | | | | | | module. (GH-21009) Detected by Coverity. (cherry picked from commit eb0d5c38de7f970d8cd8524f4163d831c7720f51) Co-authored-by: Gregory P. Smith <greg@krypto.org>
* [3.9] bpo-41052: Opt out serialization/deserialization for _random.Random ↵Dong-hee Na2020-06-212-1/+36
| | | | | | | (GH-21002). (GH-21030) (cherry picked from commit 6989af0bc7ea1e9a1acea16794e6f723d7b44110) Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>
* bpo-36346: Add Py_DEPRECATED to deprecated unicode APIs (GH-20878)Inada Naoki2020-06-181-0/+10
| | | | | Co-authored-by: Kyle Stanley <aeros167@gmail.com> Co-authored-by: Victor Stinner <vstinner@python.org> (cherry picked from commit 2c4928d37edc5e4aeec3c0b79fa3460b1ec9b60d)
* bpo-36020: Remove snprintf macro in pyerrors.h (GH-20889)Miss Islington (bot)2020-06-152-5/+4
| | | | | | | | | | | | | 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>