| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
It defaults to None and is positional only.
(cherry picked from commit d1ae57027fc39ff60dcfc1b63881400e5ca3ce56)
Co-authored-by: Dennis Sweeney <36520290+sweeneyde@users.noreply.github.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
_thread.start_new_thread() no longer calls PyThread_exit_thread()
explicitly at the thread exit, the call was redundant.
On Linux with the glibc, pthread_cancel() loads dynamically the
libgcc_s.so.1 library. dlopen() can fail if there is no more
available file descriptor to open the file. In this case, the process
aborts with the error message:
"libgcc_s.so.1 must be installed for pthread_cancel to work"
pthread_cancel() unwinds back to the thread's wrapping function that
calls the thread entry point.
The unwind function is dynamically loaded from the libgcc_s library
since it is tightly coupled to the C compiler (GCC). The unwinder
depends on DWARF, the compiler generates DWARF, so the unwinder
belongs to the compiler.
Thanks Florian Weimer and Carlos O'Donell for their help on
investigating this issue.
(cherry picked from commit 45a78f906d2d5fe5381d78466b11763fc56d57ba)
|
| |
|
|
|
| |
(cherry picked from commit 31aa0dbff4c1d39c9d77c6c8f4a61d0e46c1268b)
Co-authored-by: Mark Shannon <mark@hotpy.org>
|
| |
|
|
|
|
|
|
| |
(GH-26486) (GH-26496)
This was flagged by a static analyzer, but the logic of why this is NULL on error is hard to follow for humans as well.
(cherry picked from commit bdb56902a3bfe12b10f85a941d5dd0eae739f1a8)
Co-authored-by: stratakis <cstratak@redhat.com>
|
| |
|
|
|
|
|
|
|
| |
* _testcapi.heapgctype: implement a traverse function since the type
is defined with Py_TPFLAGS_HAVE_GC.
* _decimal: PyDecSignalDictMixin_Type is no longer defined with
Py_TPFLAGS_HAVE_GC since it has no traverse function.
(cherry picked from commit 142e5c5445c019542246d93fe2f9e195d3131686)
Co-authored-by: Victor Stinner <vstinner@python.org>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-26252)
The newest gcc emmits this warning:
```
/Modules/_tkinter.c:272:9: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
272 | if(tcl_lock)PyThread_acquire_lock(tcl_lock, 1); tcl_tstate = tstate; }
| ^~
/Modules/_tkinter.c:2869:5: note: in expansion of macro ‘LEAVE_PYTHON’
2869 | LEAVE_PYTHON
| ^~~~~~~~~~~~
/Modules/_tkinter.c:243:5: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
243 | (*(PyThreadState**)Tcl_GetThreadData(&state_key, sizeof(PyThreadState*)))
| ^
/Modules/_tkinter.c:272:57: note: in expansion of macro ‘tcl_tstate’
272 | if(tcl_lock)PyThread_acquire_lock(tcl_lock, 1); tcl_tstate = tstate; }
| ^~~~~~~~~~
/Modules/_tkinter.c:2869:5: note: in expansion of macro ‘LEAVE_PYTHON’
2869 | LEAVE_PYTHON
```
that's because the macro packs together two statements at the same level
as the "if". The warning is misleading but is very noisy so it makes
sense to fix it.
(cherry picked from commit 95d04710c5fb0df5393b5add2c5c2de2412673eb)
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The newest version of gcc complains about passing un-initialized arrays
as constant pointers:
```
/Modules/expat/xmltok_ns.c: In function ‘findEncodingNS’:
/Modules/expat/xmltok.h:272:10: warning: ‘buf’ may be used uninitialized [-Wmaybe-uninitialized]
272 | (((enc)->utf8Convert)(enc, fromP, fromLim, toP, toLim))
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Modules/expat/xmltok_ns.c:95:3: note: in expansion of macro ‘XmlUtf8Convert’
95 | XmlUtf8Convert(enc, &ptr, end, &p, p + ENCODING_MAX - 1);
| ^~~~~~~~~~~~~~
/Modules/expat/xmltok.h:272:10: note: by argument 5 of type ‘const char *’ to ‘enum XML_Convert_Result(const ENCODING *, const char **, const char *, char **, const char *)’ {aka ‘enum XML_Convert_Result(const struct encoding *, const char **, const char *, char **, const char *)’}
272 | (((enc)->utf8Convert)(enc, fromP, fromLim, toP, toLim))
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Modules/expat/xmltok_ns.c:95:3: note: in expansion of macro ‘XmlUtf8Convert’
95 | XmlUtf8Convert(enc, &ptr, end, &p, p + ENCODING_MAX - 1);
| ^~~~~~~~~~~~~~
In file included from /Modules/expat/xmltok.c:1657:
/Modules/expat/xmltok_ns.c:92:8: note: ‘buf’ declared here
92 | char buf[ENCODING_MAX];
```
(cherry picked from commit be93f81e58ba3742589259ef84325a95b547e424)
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
It was always meant to be released for parallelization.
This now matches the other similar code in the module.
Thanks michaelforney for noticing!
(cherry picked from commit c10392e7ddb3eafbd11e9ffe335c07648426715f)
Co-authored-by: Gregory P. Smith <greg@krypto.org>
Automerge-Triggered-By: GH:gpshead
|
| |
|
|
|
|
|
|
|
|
|
|
| |
(GH-25928)
Contributed-By: Matthias Klose
Automerge-Triggered-By: GH:tiran
(cherry picked from commit da5c808fb50d34bc2e180d9481706072f33025da)
Co-authored-by: Gregory P. Smith <greg@krypto.org>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
|
| |
|
|
|
| |
(cherry picked from commit 2f5baa17504feb9a7613bac32fdceed4894434de)
Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
|
| |
|
|
| |
(GH-25818)
|
| |
|
|
|
|
|
|
|
|
| |
(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>
|
| |
|
|
|
|
|
|
|
| |
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>
|
| |
|
| |
Setting `next_in` before acquiring the thread lock may mix up compress/decompress state in other threads.
|
| |
|
|
|
|
|
|
| |
(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>
|
| |
|
|
|
| |
(cherry picked from commit e07d8098892e85ecc56969d2c9a5afb3ea33ce8f)
Co-authored-by: Steve Dower <steve.dower@python.org>
|
| |
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
| |
UTF-8 (GH-25510)
(cherry picked from commit dc516ef8395d15da0ab225eb0dceb2e0581f51ca)
Co-authored-by: Steve Dower <steve.dower@python.org>
|
| |
|
|
|
|
|
|
|
|
|
| |
(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>
|
| |
|
|
|
|
|
|
|
|
|
| |
(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
|
| |
|
|
|
| |
(cherry picked from commit 150af7543214e1541fa582374502ac1cd70e8eb4)
Co-authored-by: Christian Heimes <christian@python.org>
|
| |
|
|
|
|
| |
Signed-off-by: Christian Heimes <christian@python.org>
(cherry picked from commit 6f37ebc61e9e0d13bcb1a2ddb7fc9723c04b6372)
Co-authored-by: Christian Heimes <christian@python.org>
|
| |
|
|
|
|
|
| |
(GH-25303)
(cherry picked from commit d3b73f32ef7c693a6ae8c54eb0e62df3b5315caf)
Co-authored-by: Christian Heimes <christian@python.org>
|
| |
|
|
| |
objects from file locations (GH-25121)
|
| |
|
|
|
| |
(cherry picked from commit 068ebf9729d440cef03e4c57e3db83c851146172)
Co-authored-by: Inada Naoki <songofacandy@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(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>
|
| |
|
|
| |
(GH-24873)
|
| |
|
|
|
| |
(cherry picked from commit 06e3a27a3c863495390a07c695171a8e62a6e0d2)
Co-authored-by: Ammar Askar <ammar@ammaraskar.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
(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
|
| |
|
|
|
| |
(cherry picked from commit b4f9089d4aa787c5b74134c98e5f0f11d9e63095)
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
|
| |
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
| |
(cherry picked from commit bf9de7ab24d9d7068645b202bc47146b9a4f2726)
Co-authored-by: Dong-hee Na <donghee.na@python.org>
|
| |
|
|
|
|
|
|
|
| |
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)
|
| |
|
|
|
|
|
| |
(cherry picked from commit 755f3c1521b422bc2177013d289f5439975fdc4f)
Co-authored-by: Dustin Rodrigues <dust.rod@gmail.com>
Co-authored-by: Dustin Rodrigues <dust.rod@gmail.com>
|
| |
|
|
|
|
|
|
| |
(GH-24507)
Automerge-Triggered-By: GH:tiran
(cherry picked from commit 5ec7d535581bc99918e032891167a96abd224ed6)
Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
|
| |
|
|
|
|
|
|
|
|
|
| |
(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>
|
| |
|
|
|
| |
(cherry picked from commit bb739ec922c6992a2be38f9fd3c544c2cc322dde)
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
|
| |
|
|
|
|
|
|
|
| |
(GH-23888)
Automerge-Triggered-By: GH:ronaldoussoren
(cherry picked from commit b3c77ecbbe0ad3e3cc6dbd885792203e9e6ec858)
Co-authored-by: erykoff <erykoff@stanford.edu>
|
| |
|
|
|
|
|
|
| |
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 9073180db521dc83e6216ff0da1479d00167f643)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
| |
|
|
|
|
|
|
|
|
| |
(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>
|
| |
|
|
|
|
|
|
| |
(GH-24345) (GH-24349)
(cherry picked from commit 5327f370344a627f1578d8183d197feb286371c6)
Co-authored-by: Zackery Spytz <zspytz@gmail.com>
|
| |
|
|
|
| |
(cherry picked from commit f1ff800db1f9fa5ff8f2fa2863796a46bfa9ee46)
Co-authored-by: Yunlongs <lylgood@foxmail.com>
|
| |
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
| |
(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)
|
| |
|
|
|
|
|
|
|
|
|
|
| |
(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>
|
| |
|
|
|
|
| |
(GH-23874). (GH-24077)
(cherry picked from commit 1470edd6131c29b8a09ce012cdfee3afa269d553)
|
| |
|
|
|
| |
(cherry picked from commit 0159e5efeebd12b3cf365c8569ca000eac7cb03e)
Co-authored-by: Jakub Kulík <Kulikjak@gmail.com>
|
| |
|
|
|
|
| |
Signed-off-by: Christian Heimes <christian@python.org>
(cherry picked from commit cf3565ca9a7ed0f7decd000e41fa3de400986e4d)
Co-authored-by: Christian Heimes <christian@python.org>
|
| |
|
|
|
|
|
|
| |
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>
|