summaryrefslogtreecommitdiffstats
path: root/Modules
Commit message (Collapse)AuthorAgeFilesLines
* bpo-46784: Add newly exported expat symbols to the namespace. (GH-31397) ↵Miss Islington (bot)2022-03-081-0/+5
| | | | | | | | | | | | | | | | | | | | (GH-31419) The libexpat 2.4.1 upgrade from introduced the following new exported symbols: * `testingAccountingGetCountBytesDirect` * `testingAccountingGetCountBytesIndirect` * `unsignedCharToPrintable` * `XML_SetBillionLaughsAttackProtectionActivationThreshold` * `XML_SetBillionLaughsAttackProtectionMaximumAmplification` We need to adjust [Modules/expat/pyexpatns.h](https://github.com/python/cpython/blob/master/Modules/expat/pyexpatns.h) (The newer libexpat upgrade has no new symbols). Automerge-Triggered-By: GH:gpshead (cherry picked from commit 6312c1052c0186b4596fc45c42fd3ade9f8f5911) Co-authored-by: Yilei "Dolee" Yang <yileiyang@google.com>
* bpo-46932: Update bundled libexpat to 2.4.7 (GH-31736) (GH-31740)Miss Islington (bot)2022-03-082-14/+155
| | | | | (cherry picked from commit 176835c3d5c70f4c1b152cc2062b549144e37094) Co-authored-by: Steve Dower <steve.dower@python.org>
* bpo-46794: Bump up the libexpat version into 2.4.6 (GH-31487) (GH-31520)Miss Islington (bot)2022-03-025-62/+132
| | | | | (cherry picked from commit 1935e1cc284942bec8006287c939e295e1a7bf13) Co-authored-by: Dong-hee Na <donghee.na@python.org>
* bpo-46400: Update libexpat from 2.4.1 to 2.4.4 (GH-31022) (GH-31297)Dong-hee Na2022-02-215-29/+235
| | | Co-authored-by: Cyril Jouve <jv.cyril@gmail.com>
* bpo-44689: ctypes.util.find_library() now finds macOS 11+ system libraries ↵Miss Islington (bot)2021-08-301-3/+26
| | | | | | | | when built on older macOS systems (GH-27251) (GH-28054) Previously, when built on older macOS systems, `find_library` was not able to find macOS system libraries when running on Big Sur due to changes in how system libraries are stored. (cherry picked from commit 71853a73024a98aa38a3c0444fe364dbd9709134) Co-authored-by: Tobias Bergkvist <tobias@bergkv.ist>
* bpo-44394: Update libexpat copy to 2.4.1 (GH-26945) (GH-28033)Miss Islington (bot)2021-08-2920-176/+1367
| | | | | | | | | | Update the vendored copy of libexpat to 2.4.1 (from 2.2.8) to get the fix for the CVE-2013-0340 "Billion Laughs" vulnerability. This copy is most used on Windows and macOS. Co-authored-by: Łukasz Langa <lukasz@langa.pl> (cherry picked from commit 3fc5d84046ddbd66abac5b598956ea34605a4e5d) Co-authored-by: Victor Stinner <vstinner@python.org>
* Fix typo in a comment in Modules/_ssl.c: s/validata/validate/ (GH-27993) ↵Miss Islington (bot)2021-08-271-1/+1
| | | | | | | (GH-27999) (cherry picked from commit 28db1f61f20352c02e4ae1518e5aeb6505df3045) Co-authored-by: Adam Dangoor <adamdangoor@gmail.com>
* bpo-43434: Move sqlite3.connect audit events to sqlite3.Connection.__init__ ↵Erlend Egeberg Aasland2021-05-022-9/+5
| | | | | | | (GH-25818) (cherry picked from commit c96cc089f60d2bf7e003c27413c3239ee9de2990) Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
* bpo-32745: Fix a regression in the handling of ctypes' c_wchar_p type ↵Miss Islington (bot)2021-05-021-1/+2
| | | | | | | | | | (GH-8721) (#25811) 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>
* [3.8] bpo-41100: Support macOS 11 Big Sur and Apple Silicon Macs (#25806)Ned Deily2021-05-026-26/+178
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * bpo-41100: Support macOS 11 and Apple Silicon on Python 3.8 This is a partial backport of bpo-41100 changes `e8b1c038b14b5fc8120aab62c9bf5fb840274cb6` and `96d906b144e6e6aa96c5ffebecbcc5d38034bbda` for Python 3.8. We introduce the ability to build Python from source for `arm64` on macOS, but we do not make a promise of support. This allows us to omit support for Universal2 binaries as well as weak-linking of symbols from the macOS SDK based on the deployment target, which are larger changes much more difficult to merge. This also includes a backport of subsequent bpo-42688 change `7e729978fa08a360cbf936dc215ba7dd25a06a08` to fix build errors with external `libffi`. * bpo-41116: Ensure system supplied libraries are found on macOS 11 (GH-23301) (GH-23455) On macOS system provided libraries are in a shared library cache and not at their usual location. This PR teaches distutils to search in the SDK, even if there was no "-sysroot" argument in the compiler flags. (cherry picked from commit 404a719b5127602c1a948f8e189ab61cd3f147d8) * bpo-42504: fix for MACOSX_DEPLOYMENT_TARGET=11 (GH-23556) macOS releases numbering has changed as of macOS 11 Big Sur. Previously, major releases were of the form 10.x, 10.x+1, 10.x+2, etc; as of Big Sur, they are now x, x+1, etc, so, for example, 10.15, 10.15.1, ..., 10.15.7, 11, 11.0.1, 11.1, ..., 12, 12.1, etc. Allow Python to build with single-digit deployment target values. Patch provided by FX Coudert. (cherry picked from commit 5291639e611dc3f55a34666036f2c3424648ba50) * bpo-42504: Ensure that get_config_var('MACOSX_DEPLOYMENT_TARGET') is a string (GH-24341) (GH-24410) * bpo-42504: Ensure that get_config_var('MACOSX_DEPLOYMENT_TARGET') is a string (cherry picked from commit 49926cf2bcc8b44d9b8f148d81979ada191dd9d5) Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com> Co-authored-by: FX Coudert <fxcoudert@gmail.com> Co-authored-by: Max Bélanger <aeromax@gmail.com>
* Fix thread locks in zlib module may go wrong in rare case (#22132)Ma Lin2021-04-261-4/+4
| | | Setting `next_in` before acquiring the thread lock may mix up compress/decompress state in other threads.
* [3.8] bpo-43920: Make load_verify_locations(cadata) error message consistent ↵Christian Heimes2021-04-231-7/+16
| | | | | | | | (GH-25554) (GH-25556) 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>
* bpo-43472: Ensure PyInterpreterState_New audit events are raised when called ↵Miss Islington (bot)2021-04-211-1/+1
| | | | | | | through _xxsubinterpreters module (GH-25506) (cherry picked from commit 7b86e47617d81a4b14d929743425f448971e8c86) Co-authored-by: Steve Dower <steve.dower@python.org>
* [3.8] bpo-43522: Fix SSLContext.hostname_checks_common_name (GH-24899) ↵Christian Heimes2021-04-171-0/+5
| | | | | | | | (GH-25452) Fix problem with ssl.SSLContext.hostname_checks_common_name. OpenSSL does not copy hostflags from *struct SSL_CTX* to *struct SSL*. (cherry picked from commit 330b49e397168df789fd0dd20cfe7e81b8e47258)
* [3.8] bpo-43799: OpenSSL 3.0.0: declare OPENSSL_API_COMPAT 1.1.1 (GH-25329) ↵Christian Heimes2021-04-132-20/+22
| | | | | | (GH-25383) Signed-off-by: Christian Heimes <christian@python.org>. (cherry picked from commit a4833883c9b81b6b272cc7c5b67fa1658b65304c)
* bpo-43105: Importlib now resolves relative paths when creating module spec ↵Steve Dower2021-04-092-1/+102
| | | | objects from file locations (GH-25121)
* [3.8] bpo-43788: Generate version specific _ssl_data.h (GH-25300) (GH-25311)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>
* [3.8] bpo-43789: OpenSSL 3.0.0 Don't call passwd callback again in error ↵Miss Islington (bot)2021-04-091-0/+7
| | | | | | | case (GH-25303) (GH-25306) (cherry picked from commit d3b73f32ef7c693a6ae8c54eb0e62df3b5315caf) Co-authored-by: Christian Heimes <christian@python.org>
* 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>
* [3.8] bpo-43439: Wrapt the tuple in the audit events for the gc module ↵Pablo Galindo2021-03-141-2/+2
| | | | | | | (GH-24836) (GH24854) (cherry picked from commit 9c376bc1c4c8bcddb0bc4196b79ec8c75da494a8) Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
* [3.8] bpo-43439: Add audit hooks for gc functions (GH-24794). (GH-24810)Pablo Galindo2021-03-101-0/+11
| | | | | (cherry picked from commit b4f9089d4aa787c5b74134c98e5f0f11d9e63095) Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
* [3.8] bpo-43406: Fix possible race condition where ``PyErr_CheckSignals`` ↵Antoine Pitrou2021-03-061-15/+39
| | | | | | | | tries to execute a non-Python signal handler (GH-24756) (GH-24762) 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-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 01806d5beba3d208bb56adba6829097d803bf54f)
* bpo-42819, readline: Disable bracketed paste (GH-24108)Miss Islington (bot)2021-02-151-0/+23
| | | | | (cherry picked from commit 755f3c1521b422bc2177013d289f5439975fdc4f) Co-authored-by: Dustin Rodrigues <dust.rod@gmail.com>
* bpo-43108: Fix a reference leak in the curses module (GH-24420) (GH-24429)Miss Islington (bot)2021-02-151-1/+3
| | | | | | | (cherry picked from commit bb739ec922c6992a2be38f9fd3c544c2cc322dde) Co-authored-by: Pablo Galindo <Pablogsal@gmail.com> Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
* bpo-43204: Fix LibTomCrypt URL in md5module.c and sha*module.c comments ↵Miss Islington (bot)2021-02-144-4/+4
| | | | | | | | | | (GH-24507) (GH-24516) Automerge-Triggered-By: GH:tiran (cherry picked from commit 5ec7d535581bc99918e032891167a96abd224ed6) Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no> Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
* [3.9] bpo-41604: Don't decrement the reference count of the previous ↵Miss Islington (bot)2021-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> (cherry picked from commit 3c8d6934436e20163be802f5239c5b4e4925eeec) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* closes bpo-42938: Replace snprintf with Python unicode formatting in ctypes ↵Miss Islington (bot)2021-01-181-32/+19
| | | | | | | | | param reprs. (GH-24248) (cherry picked from commit 916610ef90a0d0761f08747f7b0905541f0977c7) Co-authored-by: Benjamin Peterson <benjamin@python.org> Co-authored-by: Benjamin Peterson <benjamin@python.org>
* [3.8] [3.9] bpo-42681: Fix test_curses failures related to color pairs ↵Serhiy Storchaka2021-01-051-8/+18
| | | | | | | | | | (GH-24089) (GH-24113) (GH-24116) 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) (cherry picked from commit 9b3a53a8264d4c469a3f3d8c037e74c010be3e5c)
* [3.8] [3.9] bpo-42681: Fix range checks for color and pair numbers in curses ↵Serhiy Storchaka2021-01-042-41/+29
| | | | | | | (GH-23874). (GH-24077) (GH-24079) (cherry picked from commit 1470edd6131c29b8a09ce012cdfee3afa269d553) (cherry picked from commit b0ee2b492dbf550fbd2a63b82de0a4dc9d67f32e)
* [3.8] bpo-26407: Do not mask errors in csv. (GH-20536) (GH-24021)Serhiy Storchaka2021-01-011-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)
* [3.8] bpo-36589: Fix the error handling in curses.update_lines_cols(). ↵Serhiy Storchaka2021-01-012-21/+24
| | | | | | | | | (GH-12766) (GH-24023) Return None instead of 1. (cherry picked from commit 2bc343417a4de83fa6998ff91303877734ecd366) Co-authored-by: Zackery Spytz <zspytz@gmail.com>
* [3.8] bpo-42318: Fix support of non-BMP characters in Tkinter on macOS ↵Miss Islington (bot)2020-12-251-1/+53
| | | | | | | (GH-23281). (GH-23784) (GH-23787) (cherry picked from commit a26215db11cfcf7b5f55cab9e91396761a0e0bcf) (cherry picked from commit 28bf6ab61f77c69b732a211c398ac882bf3f65f4)
* 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-23389)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-42536: GC track recycled tuples (GH-23623) (GH-23652)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)
* 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
| | | | | | | | | | (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)
* [3.8] bpo-42237: Fix os.sendfile() on illumos (GH-23154). (GH-23246)Jakub Stasiak2020-11-121-0/+18
| | | | | (cherry picked from commit fd4ed57674c675e05bd5d577dd5047a333c76c78) Co-authored-by: Jakub Stasiak <jakub@stasiak.at>
* [3.8] bpo-35455: Fix thread_time for Solaris OS (GH-11118). (GH-23145)Jakub Kulík2020-11-041-0/+17
| | | | | (cherry picked from commit 9568622c9983b682b2a2a7bacfd3c341028ea099) Co-authored-by: Jakub Kulík <Kulikjak@gmail.com>
* bpo-41662: Fix bugs in binding parameters in sqlite3 (GH-21998)Miss Skeleton (bot)2020-10-261-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-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>
* 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-22707)Miss Skeleton (bot)2020-10-151-0/+20
| | | (cherry picked from commit c13b847a6f913b72eeb71651ff626390b738d973)