summaryrefslogtreecommitdiffstats
path: root/Modules
Commit message (Collapse)AuthorAgeFilesLines
* bpo-43434: Move sqlite3.connect audit event to sqlite3.Connection.__init__ ↵Erlend Egeberg Aasland2021-05-022-9/+5
| | | | (GH-25818)
* bpo-32745: Fix a regression in the handling of ctypes' c_wchar_p type ↵Miss Islington (bot)2021-05-021-1/+2
| | | | | | | | | | (GH-8721) (#25812) Embedded nulls would cause a ValueError to be raised. Thanks go to Eryk Sun for their analysis. Co-authored-by: Łukasz Langa <lukasz@langa.pl> (cherry picked from commit 73766b0341674f3920f4ea86a6f8288b801960f9) Co-authored-by: Zackery Spytz <zspytz@gmail.com>
* bpo-43472: Ensure PyInterpreterState_New audit events are raised when called ↵Miss Islington (bot)2021-04-281-1/+1
| | | | | | | | | through _xxsubinterpreters module (GH-25506) (GH-25508) (cherry picked from commit 7b86e47617d81a4b14d929743425f448971e8c86) Co-authored-by: Steve Dower <steve.dower@python.org> Co-authored-by: Steve Dower <steve.dower@python.org>
* Fix thread locks in zlib module may go wrong in rare case (#22130)Ma Lin2021-04-261-4/+4
| | | Setting `next_in` before acquiring the thread lock may mix up compress/decompress state in other threads.
* [3.9] bpo-43920: Make load_verify_locations(cadata) error message consistent ↵Christian Heimes2021-04-231-7/+16
| | | | | | | | (GH-25554) (GH-25555) Signed-off-by: Christian Heimes <christian@python.org>. (cherry picked from commit b9ad88be0304136c3fe5959c65a5d2c75490cd80) Co-authored-by: Christian Heimes <christian@python.org>
* bpo-38822: Check specifically for a drive, not just a colon (GH-25540)Miss Islington (bot)2021-04-221-2/+2
| | | | | (cherry picked from commit e07d8098892e85ecc56969d2c9a5afb3ea33ce8f) Co-authored-by: Steve Dower <steve.dower@python.org>
* bpo-38822: Fixed os.stat failing on inaccessible directories. (GH-25527)Miss Islington (bot)2021-04-221-2/+21
| | | | | | It would just fail if the path was inaccessible and had a trailing slash. It should fall back to the parent directory's metadata. (cherry picked from commit fe63a401a9b3ca1751b81b5d6ddb2beb7f3675c1) Co-authored-by: Steve Dower <steve.dower@python.org>
* bpo-26227: Fixes decoding of host names on Windows from ANSI instead of ↵Miss Islington (bot)2021-04-211-1/+1
| | | | | | | UTF-8 (GH-25510) (cherry picked from commit dc516ef8395d15da0ab225eb0dceb2e0581f51ca) Co-authored-by: Steve Dower <steve.dower@python.org>
* [3.9] bpo-43522: Fix SSLContext.hostname_checks_common_name (GH-24899) ↵Christian Heimes2021-04-171-0/+5
| | | | | | | | | | | (GH-25451) Fix problem with ssl.SSLContext.hostname_checks_common_name. OpenSSL does not copy hostflags from *struct SSL_CTX* to *struct SSL*. Signed-off-by: Christian Heimes <christian@python.org>. (cherry picked from commit b467d9a24011992242c95d9157d3455f8a84466b) Co-authored-by: Christian Heimes <christian@python.org>
* [3.9] bpo-43799: OpenSSL 3.0.0: declare OPENSSL_API_COMPAT 1.1.1 (GH-25329) ↵Miss Islington (bot)2021-04-132-24/+24
| | | | | | | | | | | (GH-25382) Signed-off-by: Christian Heimes <christian@python.org> (cherry picked from commit a4833883c9b81b6b272cc7c5b67fa1658b65304c) Co-authored-by: Christian Heimes <christian@python.org> Automerge-Triggered-By: GH:tiran
* [3.9] bpo-43788: Generate version specific _ssl_data.h (GH-25300) (GH-25310)Christian Heimes2021-04-093-0/+14966
| | | | | (cherry picked from commit 150af7543214e1541fa582374502ac1cd70e8eb4) Co-authored-by: Christian Heimes <christian@python.org>
* bpo-43794: OpenSSL 3.0.0: set OP_IGNORE_UNEXPECTED_EOF by default (GH-25309)Miss Islington (bot)2021-04-091-0/+8
| | | | | | Signed-off-by: Christian Heimes <christian@python.org> (cherry picked from commit 6f37ebc61e9e0d13bcb1a2ddb7fc9723c04b6372) Co-authored-by: Christian Heimes <christian@python.org>
* bpo-43789: OpenSSL 3.0.0 Don't call passwd callback again in error case ↵Miss Islington (bot)2021-04-091-0/+7
| | | | | | | (GH-25303) (cherry picked from commit d3b73f32ef7c693a6ae8c54eb0e62df3b5315caf) Co-authored-by: Christian Heimes <christian@python.org>
* bpo-43105: Importlib now resolves relative paths when creating module spec ↵Steve Dower2021-04-072-1/+95
| | | | objects from file locations (GH-25121)
* bpo-33164: blake2: Fix Coverity scan (GH-25060)Miss Islington (bot)2021-03-304-4/+4
| | | | | (cherry picked from commit 068ebf9729d440cef03e4c57e3db83c851146172) Co-authored-by: Inada Naoki <songofacandy@gmail.com>
* bpo-43577: Fix deadlock with SSLContext._msg_callback and sni_callback ↵Miss Islington (bot)2021-03-212-0/+6
| | | | | | | | | | | | | | | (GH-24957) OpenSSL copies the internal message callback from SSL_CTX->msg_callback to SSL->msg_callback. SSL_set_SSL_CTX() does not update SSL->msg_callback to use the callback value of the new context. PySSL_set_context() now resets the callback and _PySSL_msg_callback() resets thread state in error path. Signed-off-by: Christian Heimes <christian@python.org> (cherry picked from commit 77cde5042a2f1eae489c11a67540afaf43cd5cdf) Co-authored-by: Christian Heimes <christian@python.org>
* bpo-43499: Silence compiler warnings about using legacy C API on Windows ↵Serhiy Storchaka2021-03-163-0/+18
| | | | (GH-24873)
* bpo-39943: Fix MSVC warnings in sre extension (GH-20508)Miss Islington (bot)2021-03-142-3/+10
| | | | | (cherry picked from commit 06e3a27a3c863495390a07c695171a8e62a6e0d2) Co-authored-by: Ammar Askar <ammar@ammaraskar.com>
* [3.9] bpo-43439: Wrapt the tuple in the audit events for the gc module ↵Pablo Galindo2021-03-141-2/+2
| | | | | | | | | | | | | | (GH-24836) (GH-24855) * [3.9] bpo-43439: Wrapt the tuple in the audit events for the gc module (GH-24836). (cherry picked from commit 9c376bc1c4c8bcddb0bc4196b79ec8c75da494a8) Co-authored-by: Pablo Galindo <Pablogsal@gmail.com> * Update gcmodule.c * Update gcmodule.c * Update gcmodule.c
* [3.9] bpo-43439: Add audit hooks for gc functions (GH-24794). (GH-24811)Pablo Galindo2021-03-101-0/+12
| | | | | (cherry picked from commit b4f9089d4aa787c5b74134c98e5f0f11d9e63095) Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
* [3.9] bpo-43406: Fix possible race condition where ``PyErr_CheckSignals`` ↵Miss Islington (bot)2021-03-061-1/+25
| | | | | | | | | tries to execute a non-Python signal handler (GH-24756) (GH-24761) We can receive signals (at the C level, in `trip_signal()` in signalmodule.c) while `signal.signal` is being called to modify the corresponding handler. Later when `PyErr_CheckSignals()` is called to handle the given signal, the handler may be a non-callable object and would raise a cryptic asynchronous exception. (cherry picked from commit 68245b7a1030287294c65c298975ab9026543fd2) Co-authored-by: Antoine Pitrou <antoine@python.org>
* bpo-43335: Update macro to check gcc version (GH-24662)Miss Islington (bot)2021-02-281-2/+2
| | | | | (cherry picked from commit bf9de7ab24d9d7068645b202bc47146b9a4f2726) Co-authored-by: Dong-hee Na <donghee.na@python.org>
* bpo-43260: io: Prevent large data remains in textio buffer. (GH-24592)Inada Naoki2021-02-221-3/+17
| | | | | | | | | When very large data remains in TextIOWrapper, flush() may fail forever. So prevent that data larger than chunk_size is remained in TextIOWrapper internal buffer. Co-Authored-By: Eryk Sun (cherry picked from commit 01806d5)
* bpo-42819, readline: Disable bracketed paste (GH-24108) (GH-24545)Miss Islington (bot)2021-02-161-0/+23
| | | | | | | (cherry picked from commit 755f3c1521b422bc2177013d289f5439975fdc4f) Co-authored-by: Dustin Rodrigues <dust.rod@gmail.com> Co-authored-by: Dustin Rodrigues <dust.rod@gmail.com>
* bpo-43204: Fix LibTomCrypt URL in md5module.c and sha*module.c comments ↵Miss Islington (bot)2021-02-124-4/+4
| | | | | | | | (GH-24507) Automerge-Triggered-By: GH:tiran (cherry picked from commit 5ec7d535581bc99918e032891167a96abd224ed6) Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
* bpo-43132: Fix incorrect handling of PyObject_RichCompareBool() in _zoneinfo ↵Miss Islington (bot)2021-02-051-6/+17
| | | | | | | | | | | (GH-24450) (GH-24457) PyObject_RichCompareBool() returns -1 on error, but this case is not handled by the find_in_strong_cache() function. Any exception raised by PyObject_RichCompareBool() should be propagated. (cherry picked from commit effaec0bb54f381db8ccfa62514bc26b00946b40) Co-authored-by: Zackery Spytz <zspytz@gmail.com>
* bpo-43108: Fix a reference leak in the curses module (GH-24420)Miss Islington (bot)2021-02-031-1/+3
| | | | | (cherry picked from commit bb739ec922c6992a2be38f9fd3c544c2cc322dde) Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
* bpo-42688: Fix ffi alloc/free when using external libffi on macos (GH-23868) ↵Miss Islington (bot)2021-02-011-2/+10
| | | | | | | | | (GH-23888) Automerge-Triggered-By: GH:ronaldoussoren (cherry picked from commit b3c77ecbbe0ad3e3cc6dbd885792203e9e6ec858) Co-authored-by: erykoff <erykoff@stanford.edu>
* [3.9] bpo-41604: Don't decrement the reference count of the previous ↵Serhiy Storchaka2021-01-311-1/+3
| | | | | | | | user_ptr when set_panel_usertpr fails (GH-21933). (GH-24403) (cherry picked from commit 3243e8a4b4b4cf321f9b28335d565742a34b1976) Co-authored-by: Anonymous Maarten <madebr@users.noreply.github.com>
* bpo-43083: Fix error handling in _sqlite3 (GH-24395)Miss Islington (bot)2021-01-312-7/+19
| | | | | (cherry picked from commit 9073180db521dc83e6216ff0da1479d00167f643) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* bpo-42979: _zoneinfo exec function checks for PyDateTime_IMPORT failure ↵Miss Islington (bot)2021-01-271-0/+3
| | | | | | | | | | (GH-24333) (GH-24351) Importing datetime can fail. (cherry picked from commit eeb701adc0fc29ba803fddf133d917ff45639a00) Co-authored-by: Hai Shi <shihai1992@gmail.com> Co-authored-by: Hai Shi <shihai1992@gmail.com>
* bpo-43033: Fix the handling of PyObject_SetAttrString() in _zoneinfo.c ↵Miss Islington (bot)2021-01-271-1/+5
| | | | | | | | (GH-24345) (GH-24349) (cherry picked from commit 5327f370344a627f1578d8183d197feb286371c6) Co-authored-by: Zackery Spytz <zspytz@gmail.com>
* bpo-41995: Handle allocation failure in _tracemalloc and _zoneinfo (GH-22635)Miss Islington (bot)2021-01-201-0/+12
| | | | | (cherry picked from commit f1ff800db1f9fa5ff8f2fa2863796a46bfa9ee46) Co-authored-by: Yunlongs <lylgood@foxmail.com>
* closes bpo-42938: Replace snprintf with Python unicode formatting in ctypes ↵Miss Islington (bot)2021-01-181-32/+19
| | | | | | | | | param reprs. (GH-24247) (cherry picked from commit 916610ef90a0d0761f08747f7b0905541f0977c7) Co-authored-by: Benjamin Peterson <benjamin@python.org> Co-authored-by: Benjamin Peterson <benjamin@python.org>
* [3.9] bpo-42681: Fix test_curses failures related to color pairs (GH-24089) ↵Serhiy Storchaka2021-01-051-8/+18
| | | | | | | | | (GH-24113) On ncurses 6.1 pair numbers are limited by SHORT_MAX-1. Improve error reporting and tests for color functions. (cherry picked from commit 59f9b4e4509be67494f3d45489fa55523175ff69)
* bpo-42692: fix __builtin_available check on older compilers (GH-23873) ↵Miss Islington (bot)2021-01-041-1/+7
| | | | | | | | | | | | (GH-24090) A compiler that doesn't define `__has_builtin` will error out when it is used on the same line as the check for it. Automerge-Triggered-By: GH:ronaldoussoren (cherry picked from commit df21f502fdccec234282bf0a211af979fd23def4) Co-authored-by: Joshua Root <jmr@macports.org>
* [3.9] bpo-42681: Fix range checks for color and pair numbers in curses ↵Serhiy Storchaka2021-01-032-41/+29
| | | | | | (GH-23874). (GH-24077) (cherry picked from commit 1470edd6131c29b8a09ce012cdfee3afa269d553)
* bpo-42655: Fix subprocess extra_groups gid conversion (GH-23762)Miss Islington (bot)2020-12-293-11/+7
| | | | | (cherry picked from commit 0159e5efeebd12b3cf365c8569ca000eac7cb03e) Co-authored-by: Jakub Kulík <Kulikjak@gmail.com>
* bpo-42620: Improve socket.getsockname doc string (GH-23742)Miss Islington (bot)2020-12-231-2/+3
| | | | | | Signed-off-by: Christian Heimes <christian@python.org> (cherry picked from commit cf3565ca9a7ed0f7decd000e41fa3de400986e4d) Co-authored-by: Christian Heimes <christian@python.org>
* bpo-42375: subprocess DragonFlyBSD build update. (GH-23320) (GH-23388)Miss Islington (bot)2020-12-171-4/+4
| | | | | | | | Same as FreeBSD, file descriptors in /dev/fd id from 0 to 63. (cherry picked from commit 13b865f0e17c88b081c23f7f05cf91166d220a50) Co-authored-by: David CARLIER <devnexen@gmail.com> Co-authored-by: David CARLIER <devnexen@gmail.com>
* bpo-40686: Fix compiler warnings on _zoneinfo.c (GH-23614) (GH-23804)Miss Islington (bot)2020-12-161-10/+4
| | | | | | | | | | | | | "uint8_t day" is unsigned and so "day < 0" test is always true. Remove the test to fix the following warnings on Windows: modules\_zoneinfo.c(1224): warning C4068: unknown pragma modules\_zoneinfo.c(1225): warning C4068: unknown pragma modules\_zoneinfo.c(1227): warning C4068: unknown pragma (cherry picked from commit aefb69b23f056c61e82ad228d950f348de090c70) Co-authored-by: Victor Stinner <vstinner@python.org> Co-authored-by: Victor Stinner <vstinner@python.org>
* [3.9] bpo-42318: Fix support of non-BMP characters in Tkinter on macOS ↵Serhiy Storchaka2020-12-151-1/+53
| | | | | | (GH-23281). (GH-23784) (cherry picked from commit a26215db11cfcf7b5f55cab9e91396761a0e0bcf)
* bpo-42536: GC track recycled tuples (GH-23623) (GH-23651)Brandt Bucher2020-12-072-0/+32
| | | | | | | | | | | | | | | | | 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)
* Add GCC pragmas to silence compiler warning about ffi_prep_closure ↵Miss Islington (bot)2020-12-011-2/+9
| | | | | | | | | (GH-23327) (GH-23590) (cherry picked from commit cce3f0b0c88eba98bc11abe703a444bee7880ff8) Co-authored-by: Pablo Galindo <Pablogsal@gmail.com> Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
* [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