Add a versionadded for PS Core and note that `.venv` is a common virtual environment name.
(cherry picked from commit f9f8e3ce70)
Co-authored-by: Brett Cannon <54418+brettcannon@users.noreply.github.com>
Also updates some (unreleased) event names to be consistent with the others.
(cherry picked from commit 44f91c388a)
Co-authored-by: Steve Dower <steve.dower@python.org>
* Fix typo in supports_file2file_sendfile(); ensure that dst is
removed
* Fix test_copytree_custom_copy_function(): remove dst tree.
Use support.rmtree() rather than shutil.rmtree() to remove
temporary directories: support tries harder.
(cherry picked from commit 4c26abd14f)
Co-authored-by: Victor Stinner <vstinner@redhat.com>
* patched string index out of range error in get_word function of _header_value_parser.py and created tests in test__header_value_parser.py for CFWS.
* Raise HeaderParseError instead of continuing when parsing a word.
(cherry picked from commit 7213df7bbf)
Co-authored-by: Abhilash Raj <maxking@users.noreply.github.com>
Fix test_wsgiref.testEnviron() to no longer depend on the environment
variables (don't fail if "X" variable is set).
testEnviron() now overrides os.environ to get a deterministic
environment. Test full TestHandler.environ content: not only a few
selected variables.
(cherry picked from commit 5150d32792)
Co-authored-by: Victor Stinner <vstinner@redhat.com>
The os.getcwdb() function now uses the UTF-8 encoding on Windows,
rather than the ANSI code page: see PEP 529 for the rationale. The
function is no longer deprecated on Windows.
os.getcwd() and os.getcwdb() now detect integer overflow on memory
allocations. On Unix, these functions properly report MemoryError on
memory allocation failure.
(cherry picked from commit 689830ee62)
Co-authored-by: Victor Stinner <vstinner@redhat.com>
Increase robustness of test_resource_tracker(): retry for 60 seconds.
(cherry picked from commit e1a63c4f21)
Co-authored-by: Pierre Glaser <pierreglaser@msn.com>
When certain malformed messages have content-type set to 'mulitpart/*' but
still have a single part body, iter_attachments can raise AttributeError. This
patch fixes it by returning a None value instead when the body is single part.
(cherry picked from commit 02257012f6)
Co-authored-by: Abhilash Raj <maxking@users.noreply.github.com>
https://bugs.python.org/issue33972
Use os.getgroups() rather than grp.getgrall() to get groups.
Rename also the test to test_chown_gid().
(cherry picked from commit d7c87d982d)
Co-authored-by: Victor Stinner <vstinner@redhat.com>
* The UTF-8 incremental decoders fails now fast if encounter
a sequence that can't be handled by the error handler.
* The UTF-16 incremental decoders with the surrogatepass error
handler decodes now a lone low surrogate with final=False.
(cherry picked from commit 894263ba80)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
eval() was being called an extra time without a filter for
deprecation warnings.
(cherry picked from commit 9fe42b49c7)
Co-authored-by: Zackery Spytz <zspytz@gmail.com>
* regrtest: Add --cleanup option to remove "test_python_*" directories
of previous failed test jobs.
* Add "make cleantest" to run "python3 -m test --cleanup".
(cherry picked from commit 47fbc4e45b)
When the Windows default event loop changed, `asyncio-policy.rst` was updated but `asyncio-eventloop.rst` was missed.
(cherry picked from commit 9ffca670ed)
Co-authored-by: Ben Darnell <ben@bendarnell.com>
… as proposed in PEP 572; key is now evaluated before value.
https://bugs.python.org/issue35224
(cherry picked from commit c8a35417db)
Co-authored-by: Jörn Heissler <joernheissler@users.noreply.github.com>
When the test is ran with `PYTHONWARNINGS=error` the environment variable is passed to the python interpreter used in `assert_python_ok` where `DeprecationWarning` from `@asyncio.coroutine` is converted into an error. Ignore the `DeprecationWarning` in `assert_python_ok`.
https://bugs.python.org/issue37323
(cherry picked from commit 186f70905d)
Co-authored-by: Xtreak <tir.karthi@gmail.com>
test_gdb no longer fails if it gets an "unexpected" message on
stderr: it now ignores stderr. The purpose of test_gdb is to test
that python-gdb.py commands work as expected, not to test gdb.
(cherry picked from commit e56a123fd0)
Co-authored-by: Victor Stinner <vstinner@redhat.com>