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>
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>
* Mention issue in which ByByteArray_Init() has been removed.
* Fix typo
(cherry picked from commit af41c567af)
Co-authored-by: Victor Stinner <vstinner@redhat.com>
Add a missing single quote character in the documentation for `io.TextIOWrapper.reconfigure`.
(cherry picked from commit 35068bd059)
Co-authored-by: Harmon <Harmon758@gmail.com>
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
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>
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>
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>
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>
* Update PyCompilerFlags structure documentation.
* Document the new cf_feature_version field in the Changes in the C
API section of the What's New in Python 3.8 doc.
(cherry picked from commit 2c9b498759)
Python 3.6 changed the size of bytecode instruction, while the documentation for `EXTENDED_ARG` was not updated accordingly.
(cherry picked from commit 405f648db7)
Co-authored-by: Yao Zuo <laike9m@users.noreply.github.com>
(A single int is still allowed, but undocumented.)
https://bugs.python.org/issue35766
(cherry picked from commit 10b55c1643)
Co-authored-by: Guido van Rossum <guido@python.org>
Based on the source code 4a686504eb/Lib/multiprocessing/pool.pyGH-L755 AsyncResult.successful() raises a ValueError, not an AssertionError.
(cherry picked from commit d4cf099dff)
Co-authored-by: Benjamin Yeh <bentyeh@users.noreply.github.com>