| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
When libregrtest spawns a worker process, stderr is now written into
stdout to keep messages order. Use a single pipe for stdout and
stderr, rather than two pipes. Previously, messages were out of order
which made analysis of buildbot logs harder
|
|
|
|
| |
pass (GH-28812)
|
|
|
|
| |
Windows (GH-28663)
|
|
|
|
| |
Fix test_sys.test_stdlib_dir() when Python is built outside the
source tree: compare normalized paths.
|
|
|
|
|
| |
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.
|
|
|
| |
This continues off rkuska's work from https://github.com/python/cpython/pull/11789 seeing as the patch wasn't updated to add tests.
|
|
|
|
|
| |
Fix typos in the Lib directory as identified by codespell.
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
|
| |
|
|
|
|
| |
share keys more freely. (GH-28520)
|
| |
|
|
|
|
|
|
|
| |
In the list of generated frozen modules at the top of Tools/scripts/freeze_modules.py, you will find that some of the modules have a different name than the module (or .py file) that is actually frozen. Let's call each case an "alias". Aliases do not come into play until we get to the (generated) list of modules in Python/frozen.c. (The tool for freezing modules, Programs/_freeze_module, is only concerned with the source file, not the module it will be used for.)
Knowledge of which frozen modules are aliases (and the identity of the original module) normally isn't important. However, this information is valuable when we go to set __file__ on frozen stdlib modules. This change updates Tools/scripts/freeze_modules.py to map aliases to the original module name (or None if not a stdlib module) in Python/frozen.c. We also add a helper function in Python/import.c to look up a frozen module's alias and add the result of that function to the frozen info returned from find_frozen().
https://bugs.python.org/issue45020
|
|
|
|
|
| |
This makes the tests a bit cleaner and makes adding more tests a little simpler.
https://bugs.python.org/issue45324
|
|
|
|
|
|
|
|
|
|
|
| |
exec_module(). (gh-28633)
Before this change we end up duplicating effort and throwing away data in FrozenImporter.find_spec(). Now we do the work once in find_spec() and the only thing we do in FrozenImporter.exec_module() is turn the raw frozen data into a code object and then exec it.
We've added _imp.find_frozen(), add an arg to _imp.get_frozen_object(), and updated FrozenImporter. We've also moved some code around to reduce duplication, get a little more consistency in outcomes, and be more efficient.
Note that this change is mostly necessary if we want to set __file__ on frozen stdlib modules. (See https://bugs.python.org/issue21736.)
https://bugs.python.org/issue45324
|
|
|
|
|
| |
sub-interpreters. (GH-27794)
Automerge-Triggered-By: GH:encukou
|
| |
|
|
|
|
|
|
|
|
|
| |
* bpo-44594: fix (Async)ExitStack handling of __context__
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.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
(GH-28650)" (GH-28667)
This reverts commit b07fddd527efe67174ce6b0fdbe8dac390b16e4e.
|
|
|
|
|
|
| |
Add a PID to names of POSIX shared memory objects to allow
running multiprocessing tests (test_multiprocessing_fork,
test_multiprocessing_spawn, etc) in parallel.
|
|
|
|
|
| |
I've added a number of test-only modules. Some of those cases are covered by the recently frozen stdlib modules (and some will be once we add encodings back in). However, I figured we'd play it safe by having a set of modules guaranteed to be there during tests.
https://bugs.python.org/issue45020
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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().
|
|
|
| |
This reverts commit d441437ee71ae174c008c23308b749b91020ba77.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add the _PyTime_AsTimespec_clamp() function: similar to
_PyTime_AsTimespec(), but clamp to _PyTime_t min/max and don't raise
an exception.
PyThread_acquire_lock_timed() now uses _PyTime_AsTimespec_clamp() to
remove the Py_UNREACHABLE() code path.
* Add _PyTime_AsTime_t() function.
* Add PY_TIME_T_MIN and PY_TIME_T_MAX constants.
* Replace _PyTime_AsTimeval_noraise() with _PyTime_AsTimeval_clamp().
* Add pytime_divide_round_up() function.
* Fix integer overflow in pytime_divide().
* Add pytime_divmod() function.
|
| |
|
|
|
|
| |
Add reprs for Semaphore, BoundedSemaphore, Event, and Barrier.
|
|
|
|
|
|
|
| |
* during tarfile parsing, a zlib error indicates invalid data
* tarfile.open now raises a descriptive exception from the zlib error
* this makes it clear to the user that they may be trying to open a
corrupted tar file
|
| |
|
|
|
|
|
| |
During runtime startup we figure out the stdlib dir but currently throw that information away. This change preserves it and exposes it via PyConfig.stdlib_dir, _Py_GetStdlibDir(), and sys._stdlib_dir.
https://bugs.python.org/issue45211
|
| |
|
|
|
|
|
| |
Fix the threading._shutdown() function when the threading module was
imported first from a thread different than the main thread: no
longer log an error at Python exit.
|
|
|
|
| |
ranges (GH-28575)
|
|
|
|
|
|
|
|
|
|
|
|
| |
This accomplishes 2 things:
* consolidates some common code between getpath.c and getpathp.c
* makes the helpers available to code in other files
FWIW, the signature of the join_relfile() function (in fileutils.c) intentionally mirrors that of Windows' PathCchCombineEx().
Note that this change is mostly moving code around. No behavior is meant to change.
https://bugs.python.org/issue45211
|
|
|
|
| |
expression in function calls (GH-28576)
|
|
|
| |
Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>
|
|
|
|
| |
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
|
|
|
|
|
|
| |
Having `operator.call(obj, arg)` mean `type(obj).__call__(obj, arg)` is
consistent with the other dunder operators. The semantics with `*args,
**kwargs` then follow naturally from the single-arg semantics.
|
|
|
| |
It now lists the bad format_spec and the type of the object.
|
|
|
|
| |
(GH-18031)
|
|
|
|
| |
(GH-16667)
|
| |
|
|
|
|
|
| |
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
|
|
|
|
| |
(GH-28484)
|
|
|
|
|
| |
shutil.copyfile() (GH-28421)
This was a regression from fixing BPO-43219.
|
|
|
|
| |
(GH-28377)
|
|
|
| |
_global_shutdown_lock should be reinitialized in forked children
|
| |
|
|
|
|
| |
Co-authored-by: Tal Einat <taleinat@gmail.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
|
|
|
| |
Alo use load_tests() for adding tests.
|