Fix test_name_error_suggestions_do_not_trigger_for_too_many_locals()
of test_exceptions if a directory name contains "a1" (like
"Python-3.11.0a1"): use a stricter regular expression.
(cherry picked from commit 4e605666b0)
Co-authored-by: Victor Stinner <vstinner@python.org>
It took me longer than I expected to figure out why a random class
I dealt with didn't support weak references. I believe this addition
will make the __slots__/weakref interaction more discoverable to people
having troubles with this. (Before this patch __slots__ was not
mentioned in weakref documentation even once).
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
(cherry picked from commit b24b47e643)
Co-authored-by: Jakub Stasiak <jakub@stasiak.at>
Operating systems without support for TCP_NODELAY will raise an OSError
when trying to set the socket option, but the show can still go on.
(cherry picked from commit 0571b934f5)
Co-authored-by: rtobar <rtobarc@gmail.com>
It seems part of `gethostbyname_ex` doc was copied from `gethostbyaddr`. The latter has an `ip_address` parameter whereas the former doesn't.
(cherry picked from commit 4103280b83)
Co-authored-by: Andre Delfino <adelfino@gmail.com>
Signed-off-by: Christian Heimes <christian@python.org>
(cherry picked from commit ef6196028f)
Co-authored-by: Christian Heimes <christian@python.org>
Automerge-Triggered-By: GH:tiran
Make enter_context(foo()) / enter_async_context(foo()) equivalent to
`[async] with foo()` regarding __context__ when an exception is raised.
Previously exceptions would be caught and re-raised with the wrong
context when explicitly overriding __context__ with None..
(cherry picked from commit e6d1aa1ac6)
Co-authored-by: John Belmonte <john@neggie.net>
Automerge-Triggered-By: GH:njsmith
Add a PID to names of POSIX shared memory objects to allow
running multiprocessing tests (test_multiprocessing_fork,
test_multiprocessing_spawn, etc) in parallel.
(cherry picked from commit eb4495e8e2)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
On Unix, if the sem_clockwait() function is available in the C
library (glibc 2.30 and newer), the threading.Lock.acquire() method
now uses the monotonic clock (time.CLOCK_MONOTONIC) for the timeout,
rather than using the system clock (time.CLOCK_REALTIME), to not be
affected by system clock changes.
configure now checks if the sem_clockwait() function is available.
Add a PID to names of POSIX shared memory objects to allow
running multiprocessing tests (test_multiprocessing_fork,
test_multiprocessing_spawn, etc) in parallel.
(cherry picked from commit eb4495e8e2)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* Work correctly if an additional fresh module imports other
additional fresh module which imports a blocked module.
* Raises ImportError if the specified module cannot be imported
while all additional fresh modules are successfully imported.
* Support blocking packages.
* Always restore the import state of fresh and blocked modules
and their submodules.
* Fix test_decimal and test_xml_etree which depended on an undesired
side effect of import_fresh_module().
(cherry picked from commit ec4d917a6a)
Removed extra comma in comment that indicates state of a `Barrier` as it was confusing and breaking the flow while reading.
Co-authored-by: Priyank <5903604+cpriyank@users.noreply.github.com>
(cherry picked from commit f1ca5d7f61)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
* issue45067 - Fix _curses compilation in CentOS 7. Verify the version of ncurses
for extended color support feature usage.
The function extended_color_content was introduced in 2017. The ncurses-devel
package in CentOS 7 had a older version ncurses resulted in compilation error.
For compiling ncurses with extended color support, we verify the version of the
ncurses library.
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
(cherry picked from commit 794430700d)
Co-authored-by: Senthil Kumaran <senthil@python.org>
Update test_sysconfig.test_user_similar() for the posix_user scheme:
"platlib" doesn't use sys.platlibdir.
(cherry picked from commit 49acac00c0)
Co-authored-by: Victor Stinner <vstinner@python.org>
Fix regrtest second summary when using -w/--verbose2 command line
option: lists re-run tests in the second test summary.
(cherry picked from commit c4ea45d7d2)
Co-authored-by: Victor Stinner <vstinner@python.org>