| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
(cherry picked from commit 32937d6aa414ec7db5c63ef277f21db1880b3af4)
Co-authored-by: Charlie Zhao <zhaoyu_hit@qq.com>
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
|
| |
|
|
|
| |
(cherry picked from commit 9a8b66b58c74236959a01d579e2c156d9c2e7cb3)
Co-authored-by: 谭九鼎 <109224573@qq.com>
|
| |
|
|
|
|
|
|
|
| |
The test.support.wait_process() function now uses a timeout of
LONG_TIMEOUT seconds by default, instead of SHORT_TIMEOUT. It
doesn't matter if a Python buildbot is slower, it only matters that
the process completes. The timeout should just be shorter than
"forever".
(cherry picked from commit f09da28768b77713566e932e912f107b6b57e8fd)
|
| |
|
|
|
| |
(GH-98743) (GH-98746)
Co-authored-by: Henry Schreiner <HenrySchreinerIII@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Integer to and from text conversions via CPython's bignum `int` type is not safe against denial of service attacks due to malicious input. Very large input strings with hundred thousands of digits can consume several CPU seconds.
This PR comes fresh from a pile of work done in our private PSRT security response team repo.
This backports https://github.com/python/cpython/pull/96499 aka 511ca9452033ef95bc7d7fc404b8161068226002
Signed-off-by: Christian Heimes [Red Hat] <christian@python.org>
Tons-of-polishing-up-by: Gregory P. Smith [Google] <greg@krypto.org>
Reviews via the private PSRT repo via many others (see the NEWS entry in the PR).
<!-- gh-issue-number: gh-95778 -->
* Issue: gh-95778
<!-- /gh-issue-number -->
I wrote up [a one pager for the release managers](https://docs.google.com/document/d/1KjuF_aXlzPUxTK4BMgezGJ2Pn7uevfX7g0_mvgHlL7Y/edit#).
|
| |
|
|
|
| |
(cherry picked from commit 68393248947adaa61962cd44e9d49c44017ba94f)
Co-authored-by: Christian Heimes <christian@python.org>
|
| |
|
|
|
|
|
|
| |
``os.geteuid() == 0`` is not a reliable check whether the current user
has the capability to bypass permission checks. Tests now probe for DAC
override.
(cherry picked from commit 7e0d98ecb3f049841de9854e7a3eca3e2638e4b2)
Co-authored-by: Christian Heimes <christian@python.org>
|
| |
|
|
|
|
|
|
| |
importers. (GH-93962) (GH-94118)
Co-authored-by: Brett Cannon <brett@python.org>
(cherry picked from commit c029b552f39200977325d4351803bdd13ddccc4f)
Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
|
| |
|
|
|
|
|
|
|
|
|
| |
* Fix the compatibility of the Python C API with C++ older than C++11.
* _Py_NULL is only defined as nullptr on C++11 and newer.
(cherry picked from commit 4caf5c2753f1aa28d6f4bc1aa377975fd2a62331)
* test_cppext now builds the C++ extension with setuptools.
* Add @test.support.requires_venv_with_pip.
(cherry picked from commit ca0cc9c433830e14714a5cc93fb4e7254da3dd76)
|
| |
|
|
|
|
| |
WASI does not have the ``chmod(2)`` syscall yet.
(cherry picked from commit 22fed605e096eb74f3aa33f6d25aee76fdc2a3fa)
Co-authored-by: Christian Heimes <christian@python.org>
|
| |
|
|
|
| |
(cherry picked from commit 4c71d22c4f9fdde6f2234e7dc6a862419cd6fd98)
Co-authored-by: Christian Heimes <christian@python.org>
|
| |
|
|
|
| |
(cherry picked from commit 6f8367d3489eff07139bc908fdf666fc904ca445)
Co-authored-by: Christian Heimes <christian@python.org>
|
| |
|
|
|
| |
(cherry picked from commit 1a8a0ddb1c62ef9aff598e7e3e3a65cf35353932)
Co-authored-by: Christian Heimes <christian@python.org>
|
| |
|
|
|
|
|
|
|
| |
- WASI's ``gethostname()`` is a stub that always fails with OSError
``ENOTSUP``
- skip mailcap ``test`` if subprocess is not available
- WASI process_time clock does not work.
(cherry picked from commit 760ec8940aabd6a7fc471bd913ea1ac501cc604b)
Co-authored-by: Christian Heimes <christian@python.org>
|
| |
|
|
|
| |
(cherry picked from commit 137fd3d88aa46669f5717734e823f4c594ab2843)
Co-authored-by: Christian Heimes <christian@python.org>
|
| |
|
|
|
| |
(GH-92846) (GH-92851)
Co-authored-by: Christian Heimes <christian@python.org>
|
| |
|
|
|
| |
(cherry picked from commit d81d57e9598dea741e049f3876ccd87072a38906)
Co-authored-by: Christian Heimes <christian@python.org>
|
| | |
|
| |
|
| |
Co-authored-by: Victor Stinner <vstinner@python.org>
|
| | |
|
| |
|
| |
Co-authored-by: Brett Cannon <brett@python.org>
|
| |
|
| |
Co-authored-by: Christian Heimes <christian@python.org>
|
| |
|
|
|
| |
This reverts commit a941e5927f7f2540946813606c61c6aea38db426 (GH-30194).
Automerge-Triggered-By: GH:jaraco
|
| |
|
| |
Automerge-Triggered-By: GH:tiran
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
| |
- Add requires_fork and requires_subprocess to more tests
- Skip extension import tests if dlopen is not available
- Don't assume that _testcapi is a shared extension
- Skip a lot of socket tests that don't work on Emscripten
- Skip mmap tests, mmap emulation is incomplete
- venv does not work yet
- Cannot get libc from executable
The "entire" test suite is now passing on Emscripten with EMSDK from git head (91 suites are skipped).
|
| | |
|
| |
|
| |
Co-authored-by: Victor Stinner <vstinner@python.org>
|
| | |
|
| |
|
|
|
|
|
| |
- fd inheritance can't be modified because Emscripten doesn't support subprocesses anyway.
- setpriority always fails
- geteuid no longer causes problems with latest emsdk
- umask is a stub
- geteuid / getuid always return 0, but process cannot chown to random uid.
|
| |
|
|
|
|
|
|
|
| |
- getgroups always fails.
- geteuid and getegid always return 0 (root), which confuse tarfile and
tests.
- hardlinks (link, linkat) always fails.
- non-encodable file names are not supported by NODERAWFS layer.
- mark more tests with dependency on subprocess and multiprocessing.
Mocking does not work if the module fails to import.
|
| |
|
|
|
|
|
| |
Lib/test/support/import_helper.py (GH-31204)
In [Lib/test/support/import_helper.py](https://github.com/python/cpython/blob/master/Lib/test/support/import_helper.py), the function `make_legacy_pyc` makes a call to `os.rename` which can fail when the source and target live on different devices. This happens (for example) when `PYTHONPYCACHEPREFIX` is set to a directory anywhere on disk, while a ramdisk is mounted on `/tmp` (the latter of which is the default on various Linux distros). Replacing `os.rename` with `shutil.move` fixes this.
Automerge-Triggered-By: GH:brettcannon
|
| |
|
|
|
| |
skip_if_buggy_ucrt_strfptime() of test.support now uses
locale.getpreferredencoding(False) instead of
locale.getdefaultlocale() to get the Windows code page.
|
| |
|
| |
Co-authored-by: Brett Cannon <brett@python.org>
|
| |
|
|
|
|
|
| |
It was added as part of #29222 to avoid running freeze tool tests on the
buildbots but the logic was wrong so it did not skip tests on typical posix
setup buildbots where the worker is launched from cron via an @reboot task and
thus have no USER environment variable. This uses the canonical
`getpass.getuser()` API rather than rolling its own attempt.
|
| |
|
|
| |
them (GH-30897)
|
| |
|
|
|
|
|
| |
* Refactor sanitizer skip tests into test.support
* fixup! Refactor sanitizer skip tests into test.support
* fixup! fixup! Refactor sanitizer skip tests into test.support
|
| | |
|
| | |
|
| |
|
|
|
|
|
| |
Ensure that directory file descriptors refer to directories different
from the current directory, and that src_dir_fd and dst_dir_fd refer
to different directories.
Add context manager open_dir_fd() in test.support.os_helper.
|
| | |
|
| |
|
|
|
| |
(GH-29951)
This reverts commit 9bf2cbc4c498812e14f20d86acb61c53928a5a57.
|
| |
|
|
|
|
|
| |
Rename PyConfig.no_debug_ranges to PyConfig.code_debug_ranges and
invert the value.
Document -X no_debug_ranges and PYTHONNODEBUGRANGES env var in
PyConfig.code_debug_ranges documentation.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Remove the asyncore and asynchat modules, deprecated in Python
3.6: use the asyncio module instead.
Remove the smtpd module, deprecated in Python 3.6: the aiosmtpd
module can be used instead, it is based on asyncio.
* Remove asyncore, asynchat and smtpd documentation
* Remove test_asyncore, test_asynchat and test_smtpd
* Rename Lib/asynchat.py to Lib/test/support/_asynchat.py
* Rename Lib/asyncore.py to Lib/test/support/_asyncore.py
* Rename Lib/smtpd.py to Lib/test/support/_smtpd.py
* Remove DeprecationWarning from private _asyncore, _asynchat and
_smtpd modules
* _smtpd: remove deprecated properties
|
| | |
|
| |
|
|
|
|
|
| |
The "freeze" tool has been part of the repo for a long time. However, it hasn't had any tests in the test suite to guard against regressions. We add such a test here. This is especially important as there has been a lot of change recently related to frozen modules, with more to come.
Note that as part of the test we build Python out-of-tree and install it in a temp dir.
https://bugs.python.org/issue45629
|
| |
|
|
|
|
|
|
|
|
|
|
| |
support.print_warning() now stores the original value of
sys.__stderr__ and uses it to log warnings. libregrtest uses the same
stream to log unraisable exceptions and uncaught threading
exceptions.
Partially revert commit dbe213de7ef28712bbfdb9d94a33abb9c33ef0c2:
libregrtest no longer replaces sys.__stdout__, sys.__stderr__, and
stdout and stderr file descriptors.
Remove also a few unused imports in libregrtest.
|
| |
|
|
|
|
|
|
|
|
|
| |
libregrtest -W/--verbose3 now also replace sys.__stdout__,
sys.__stderr__, and stdout and stderr file descriptors (fd 1 and fd
2).
support.print_warning() messages are now logged in the expected
order.
The "./python -m test test_eintr -W" command no longer logs into
stdout if the test pass.
|
| |
|
| |
support.print_warning() now flushs sys.stdout.
|
| |
|
|
|
| |
Fix typos in the Lib directory as identified by codespell.
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
|