I didn't find any entries in the docs about these functions, so I just mentioned them, in "What's New".
(cherry picked from commit 47c2de7725)
Co-authored-by: Ivan Levkivskyi <levkivskyi@gmail.com>
https://bugs.python.org/issue33416
Tab now moves focus across and down for Help Source and Custom Run.
(cherry picked from commit 54cf2e0780)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
For datetime.datetime.strptime(), the leading zero for some two-digit formats is optional.
This adds a footnote to the strftime/strptime documentation to reflect this fact, and adds some tests to ensure that it is true.
bpo-34903
(cherry picked from commit 6b9c204ee7)
Co-authored-by: Mike Gleen <mike.gleen@gmail.com>
The initialize options are 1) add command line options, which are appended to sys.argv as if passed on a real command line, and 2) skip the shell restart. The customization dialog is accessed by a new entry on the Run menu.
(cherry picked from commit 201bc2d18b)
Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
Many PyRun_XXX() functions like PyRun_String() were no longer
exported in libpython38.dll by mistake. Export them again to fix the
ABI compatibiliy.
(cherry picked from commit 343ed0ffe0)
Co-authored-by: Victor Stinner <vstinner@redhat.com>
test_pre_initialization_sys_options() of test_embed now removes
PYTHON* environment variables like PYTHONWARNINGS.
(cherry picked from commit dbdc991a62)
Co-authored-by: Victor Stinner <vstinner@redhat.com>
Measure required height by quickly maximizing once per screen.
A search for a better method failed.
(cherry picked from commit 5bff3c86ab)
Co-authored-by: Tal Einat <taleinat+github@gmail.com>
bpo-35031, bpo-35998: Reintroduce workaround on Windows and FreeBSD
in test_start_tls_server_1() of test_asyncio: disable TLS v1.3 on the
client context.
(cherry picked from commit c034b7824f)
Co-authored-by: Victor Stinner <vstinner@redhat.com>
On Windows, os.dup() no longer creates an inheritable fd when handling a
character file.
(cherry picked from commit 28fca0c422)
Co-authored-by: Zackery Spytz <zspytz@gmail.com>
The patch needed for 2.7 should make the test more stable on 3.x also.
(cherry picked from commit 66d47da86a)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
uuid could try fallback methods that had no chance of working on a particular
platform, and this could cause spurious test failures, as well as degraded
performance as fallback options were tried and failed.
This fixes both the uuid module and its test's SkipUnless logic to use a
prefiltered list of techniques that may at least potentially work on that platform.
Patch by Michael Felt (aixtools).
(cherry picked from commit 3a1d50e7e5)
Co-authored-by: Michael Felt <aixtools@users.noreply.github.com>
bpo-35537, bpo-35876: Fix also test_start_new_session() of
test_subprocess: use os.getsid() rather than os.getpgid().
(cherry picked from commit 5884043252)
Co-authored-by: Victor Stinner <vstinner@redhat.com>
Document reference cycle and resurrected objects issues in
sys.unraisablehook() and threading.excepthook() documentation.
Fix test.support.catch_unraisable_exception(): __exit__() no longer
ignores unraisable exceptions.
Fix test_io test_writer_close_error_on_close(): use a second
catch_unraisable_exception() to catch the BufferedWriter unraisable
exception.
(cherry picked from commit 212646cae6)
Co-authored-by: Victor Stinner <vstinner@redhat.com>
This PR adds missing details in the [`concurrent.futures`](https://docs.python.org/3/library/concurrent.futures.html) documentation:
* the mention that `Future.cancel` also returns `False` if the call finished running;
* the mention of the states for `Future` that did not complete: pending or running.
(cherry picked from commit 431478d5d7)
Co-authored-by: Géry Ogam <gery.ogam@gmail.com>
Join the thread to prevent leaking a running thread and leaking a
reference.
Cleanup also the test:
* asyncioWindowsProactorEventLoopPolicy became the default policy,
there is no need to set it manually.
* Only start the thread once the loop is running.
* Use a shorter sleep in the thread (100 ms rather than 1 sec).
* Use close_loop(loop) rather than loop.close().
* Use longer variable names.
(cherry picked from commit 07559450b2)
Co-authored-by: Victor Stinner <vstinner@redhat.com>
Fix a regression introduced by af8646c805 that was causing code of the form:
if True and False:
do_something()
to be optimized incorrectly, eliminating the block.
(cherry picked from commit 05f8318655)
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
The peephole optimizer was not optimizing correctly bytecode after negative deltas were introduced. This is due to the fact that some special values (255) were being searched for in both instruction pointer delta and line number deltas.
(cherry picked from commit 3498c642f4)
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
It would raise ValueError("Paths don't have the same drive") if the paths on different drivers, which is not documented.
os.path.commonpath raises ValueError when the *paths* are in different drivers, but it is not documented.
Update the document according @Windsooon 's suggestion.
It actually raise ValueError according line 355 of [test of path](https://github.com/python/cpython/blob/master/Lib/test/test_ntpath.py)
https://bugs.python.org/issue6689
(cherry picked from commit 95492032c4)
Co-authored-by: Makdon <makdon@makdon.me>
The __exit__() method of test.support.catch_unraisable_exception
context manager now ignores unraisable exception raised when clearing
self.unraisable attribute.
(cherry picked from commit 6d22cc8e90)
Co-authored-by: Victor Stinner <vstinner@redhat.com>
Calling setlocale(LC_CTYPE, "") on a system where GetACP() returns CP_UTF8 results in empty strings in _tzname[].
This causes time.tzname to be an empty string.
I have reported the bug to the UCRT team and will follow up, but it will take some time get a fix into production.
In the meantime one possible workaround is to temporarily change the locale by calling setlocale(LC_CTYPE, "C") before calling _tzset and restore the current locale after if the GetACP() == CP_UTF8 or CP_UTF7
@zooba
https://bugs.python.org/issue36779
(cherry picked from commit b4c7defe58)
Co-authored-by: Paul Monson <paulmon@users.noreply.github.com>