| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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 6b9c204ee77a0de87d6f51a3d4547a18604cef9e)
Co-authored-by: Mike Gleen <mike.gleen@gmail.com>
|
|
|
|
|
| |
(cherry picked from commit d8f336fdc10decdd82d3bc81a63aea8be149c0c8)
Co-authored-by: animalize <animalize@users.noreply.github.com>
|
|
|
|
|
| |
(cherry picked from commit f3fb8393e3cbbdc0ec79e0fdefaadec6977e1491)
Co-authored-by: Ned Deily <nad@python.org>
|
|
|
|
|
|
| |
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 201bc2d18b60adb05810d2a6ab396047bc527088)
Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
|
| |
|
|
|
|
|
|
| |
Mainly, add a doc reference to message in pyshell.
(cherry picked from commit 8fac1221097aaf6ac37ed9ea727ee7892085e183)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
|
|
|
|
|
|
|
| |
Measure required height by quickly maximizing once per screen.
A search for a better method failed.
(cherry picked from commit 5bff3c86ab77e9d831b3cd19b45654c7eef22931)
Co-authored-by: Tal Einat <taleinat+github@gmail.com>
|
|
|
|
|
|
|
|
|
| |
(GH-14141)
On Windows, os.dup() no longer creates an inheritable fd when handling a
character file.
(cherry picked from commit 28fca0c422b425a6be43be31add0a5328c16b0b8)
Co-authored-by: Zackery Spytz <zspytz@gmail.com>
|
|
|
|
|
| |
(cherry picked from commit 5600b5e1b24a3491e83f1b3038a7ea047a34c0bf)
Co-authored-by: Jeroen Demeyer <J.Demeyer@UGent.be>
|
|
|
|
|
|
|
|
| |
or request rate (GH-11791)
Co-Authored-By: Tal Einat <taleinat+github@gmail.com>
(cherry picked from commit 8047e0e1c620f69cc21f9ca48b24bf2cdd5c3668)
Co-authored-by: Rémi Lapeyre <remi.lapeyre@henki.fr>
|
|
|
|
|
|
|
| |
fallback mode. (GH-14075). (GH-14103)
(cherry picked from commit ef2152354f03a165c5e3adb53e2276934fabd50a)
Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
|
|
|
|
|
| |
(cherry picked from commit 0237265e8287141c40faa8719da3a2d21d511d0d)
Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
|
|
|
|
|
|
|
| |
Windows (GH-14081)
(cherry picked from commit 9765efcb39fc03d5b1abec3924388974470a8bd5)
Co-authored-by: Zackery Spytz <zspytz@gmail.com>
|
|
|
|
|
| |
(GH-14080) (GH-14086)
(cherry picked from commit f0749da9a535375f05a2015e8960e8ae54877349)
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-14071) (GH-14073)
Fix a regression introduced by af8646c8054d0f4180a2013383039b6a472f9698 that was causing code of the form:
if True and False:
do_something()
to be optimized incorrectly, eliminating the block..
(cherry picked from commit 05f831865545b08c9a21cfb7773af58b76ec64cb)
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-13073)
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 b4c7defe58695a6670a8fdeaef67a638bbb47e42)
Co-authored-by: Paul Monson <paulmon@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-14054)
* bpo-36402: Fix threading._shutdown() race condition (GH-13948)
Fix a race condition at Python shutdown when waiting for threads.
Wait until the Python thread state of all non-daemon threads get
deleted (join all non-daemon threads), rather than just wait until
Python threads complete.
* Add threading._shutdown_locks: set of Thread._tstate_lock locks
of non-daemon threads used by _shutdown() to wait until all Python
thread states get deleted. See Thread._set_tstate_lock().
* Add also threading._shutdown_locks_lock to protect access to
threading._shutdown_locks.
* Add test_finalization_shutdown() test.
(cherry picked from commit 468e5fec8a2f534f1685d59da3ca4fad425c38dd)
* bpo-36402: Fix threading.Thread._stop() (GH-14047)
Remove the _tstate_lock from _shutdown_locks, don't remove None.
(cherry picked from commit 6f75c873752a16a7ad8f35855b1e29f59d048e84)
(cherry picked from commit e40a97a721d46307dfdc2b0322028ccded6eb571)
Co-authored-by: Victor Stinner <vstinner@redhat.com>
|
|
|
|
|
| |
(cherry picked from commit 8725c83ed5ca8959195ad8326db99d564a921749)
Co-authored-by: Jeffrey Kintscher <49998481+websurfer5@users.noreply.github.com>
|
|
|
|
|
|
|
|
| |
(GH-11859)
Escape ``\r``, ``\0`` and ``\x1a`` (end-of-file on Windows) in Unicode strings.
(cherry picked from commit 38ab7d4721b422547f7b46b9d68968863fa70573)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* [bpo-36520](https://bugs.python.org/issue36520): reset the encoded word offset when starting a new
line during an email header folding operation
* 📜🤖 Added by blurb_it.
* [bpo-36520](https://bugs.python.org/issue36520): add an additional test case, and provide descriptive
comments for the test_folding_with_utf8_encoding_* tests
* [bpo-36520](https://bugs.python.org/issue36520): fix whitespace issue
* [bpo-36520](https://bugs.python.org/issue36520): changes per reviewer request -- remove extraneous
backslashes; add whitespace between terminating quotes and
line-continuation backslashes; use "bpo-" instead of
"issue GH-" in comments
(cherry picked from commit f6713e84afc5addcfa8477dbdf2c027787f711c0)
Co-authored-by: websurfer5 <49998481+websurfer5@users.noreply.github.com>
https://bugs.python.org/issue36520
|
|
|
|
|
|
|
|
| |
If internal tasks weak set is changed by another thread during iteration.
https://bugs.python.org/issue36607
(cherry picked from commit 65aa64fae89a24491aae84ba0329eb8f3c68c389)
Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
|
|
|
|
|
|
| |
(GH-13965) (GH-13968)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently, inspect.getfile(str) will report nonsense:
```pytb
>>> inspect.getfile(str)
TypeError: <module 'builtins' (built-in)> is a built-in class
```
This fixes that
https://bugs.python.org/issue37173
(cherry picked from commit d407d2a7265f6102e51a1d62b3fd28b4f7a78d16)
Co-authored-by: Philipp A <flying-sheep@web.de>
|
|
|
|
|
|
|
|
|
| |
Fix an unintended ValueError from :func:`subprocess.run` when checking for
conflicting `input` and `stdin` or `capture_output` and `stdout` or `stderr` args
when they were explicitly provided but with `None` values within a passed in
`**kwargs` dict rather than as passed directly by name.
(cherry picked from commit 8cc605acdda5aff250ab4c9b524a7560f90ca9f3)
Co-authored-by: Rémi Lapeyre <remi.lapeyre@henki.fr>
|
|
|
|
|
|
|
| |
(GH-13860) (GH-13896)
(cherry picked from commit dc2476500d91082f0c907772c83a044bf49af279)
Co-authored-by: Zackery Spytz <zspytz@gmail.com>
|
|
|
|
|
|
| |
This avoids the search dialogs being hidden behind the editor window.
(cherry picked from commit 554450fb4e95066e825bdb4a2d544a490daeebdc)
Co-authored-by: Tal Einat <taleinat@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(#13846)
* bpo-21315: Fix parsing of encoded words with missing leading ws.
Because of missing leading whitespace, encoded word would get parsed as
unstructured token. This patch fixes that by looking for encoded words when
splitting tokens with whitespace.
Missing trailing whitespace around encoded word now register a defect
instead.
Original patch suggestion by David R. Murray on bpo-21315.
(cherry picked from commit 66c4f3f38b867d8329b28c032bb907fd1a2f22d2)
Co-authored-by: Abhilash Raj <maxking@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
| |
When an attribute is deleted from a Mock, a sentinel is added rather
than just deleting the attribute. This commit checks for such sentinels
when returning the child mocks in the __dir__ method as users won't
expect deleted attributes to appear when performing dir(mock).
(cherry picked from commit 0df635c7f8aa69e56a092bd4f142f0f164741ab2)
Co-authored-by: Mario Corchero <mariocj89@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* bpo-30835: email: Fix AttributeError when parsing invalid Content-Transfer-Encoding
Parsing an email containing a multipart Content-Type, along with a
Content-Transfer-Encoding containing an invalid (non-ASCII-decodable) byte
will fail. email.feedparser.FeedParser._parsegen() gets the header and
attempts to convert it to lowercase before comparing it with the accepted
encodings, but as the header contains an invalid byte, it's returned as a
Header object rather than a str.
Cast the Content-Transfer-Encoding header to a str to avoid this.
Found using the AFL fuzzer.
Reported-by: Daniel Axtens <dja@axtens.net>
Signed-off-by: Andrew Donnellan <andrew@donnellan.id.au>
* Add email and NEWS entry for the bugfix.
(cherry picked from commit aa79707262f893428665ef45b5e879129abca4aa)
Co-authored-by: Abhilash Raj <maxking@users.noreply.github.com>
|
|
|
|
|
|
| |
Add it to the end of the first line if there is room. Tests were reworked.
(cherry picked from commit 949fe976d5c62ae63ed505ecf729f815d0baccfc)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
|
|
|
|
|
|
|
|
|
| |
(GH-13819)
test_venv.test_mutiprocessing() now explicitly calls pool.terminate()
to wait until the pool completes.
(cherry picked from commit bc6469f79ca13217b784fb47da7ec83484a3debe)
Co-authored-by: Victor Stinner <vstinner@redhat.com>
|
|
|
|
|
|
|
|
| |
What's new now mentions SSLContext.hostname_checks_common_name instead of SSLContext.host_flags.
https://bugs.python.org/issue36868
(cherry picked from commit 47eb2234061524562a4b484e3a395f4fdd6c1b76)
Co-authored-by: Christian Heimes <christian@python.org>
|
|
|
|
|
|
|
|
|
|
| |
Signed-off-by: Christian Heimes <christian@python.org>
(cherry picked from commit 06651ee418b5e4e013195d6b702763a1220706a7)
Co-authored-by: Christian Heimes <christian@python.org>
https://bugs.python.org/issue37081
|
|
|
|
|
| |
This reverts commit 2156fec1f7a8f9972e90cdbaf404e3fd9eaccb35.
Now that https://github.com/python/cpython/commit/1b85f4ec45a5d63188ee3866bd55eb29fdec7fbf is in, this change makes sense.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-13545) (GH-13753)
* bpo-37014: Update docstring and Documentation of fileinput.FileInput()
* Explain the behavior of fileinput.FileInput() when reading stdin.
* Update blurb.
* bpo-37014: Fix typo in the docstring and documentation.
(cherry picked from commit aca273e2401ca3151e15e984f400233b7f255e15)
Co-authored-by: Michele Angrisano <michele.angrisano@gmail.com>
|
|
|
|
|
|
| |
Changes in bpo- 31858 made the less informative 'context_use_ps1' redundant.
(cherry picked from commit 6bdc4dee01788599808c7858e2fe9fdd72cf6792)
Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
|
|
|
|
|
| |
(cherry picked from commit b7daabd711274a009e70556020efeae502a85f0b)
Co-authored-by: Anthony Sottile <asottile@umich.edu>
|
|
|
|
|
|
| |
Insertion in line order makes sorting keys by line order unneeded.
(cherry picked from commit 1a4d9ffa1aecd7e750195f2be06d3d16c7a3a88f)
Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
|
|
|
|
|
|
|
|
|
|
| |
Fixed QueueListener in order to avoid random deadlocks.
Unable to add regression tests atm due to time constraints, will add it in a bit.
Regarding implementation, although it's nested, it does not cause performance issues whatsoever, and does not call task_done() in case of an exception (which is the right thing to do IMHO).
https://bugs.python.org/issue36813
(cherry picked from commit 6b282e18877ec84e927b381b4ce187eaf4ba3dd7)
Co-authored-by: Bar Harel <bzvi7919@gmail.com>
|
|
|
|
|
| |
(cherry picked from commit a6ec1ce1ac05b1258931422e96eac215b6a05459)
Co-authored-by: Ammar Askar <ammar_askar@hotmail.com>
|
|
|
|
|
|
|
|
| |
(GH-13688)
msilib.Directory.start_component() was passing an extra argument to CAB.gen_id().
(cherry picked from commit c8d5bf6c3fa09b43f6a5ee779d493d251dbcc53c)
Co-authored-by: Zackery Spytz <zspytz@gmail.com>
|
|
|
|
|
| |
(cherry picked from commit 4612671df2742eade8ecf8003a6ce1247973c135)
Co-authored-by: Akshay Sharma <akshay.sharma09695@gmail.com>
|
|
|
|
|
| |
(cherry picked from commit a16387ab2d85f19665920bb6ff91a7e57f59dd2a)
Co-authored-by: Ying Wang <me@yingw787.com>
|
|
|
|
|
|
|
| |
(GH-13456) (GH-13662)
https://bugs.python.org/issue36983
Fixes issue 36983
|
|
|
|
|
|
|
|
| |
(GH-13643)
Co-Authored-By: brianquinlan <brian@sweetapp.com>
(cherry picked from commit 39889864c09741909da4ec489459d0197ea8f1fc)
Co-authored-by: Brian Quinlan <brian@sweetapp.com>
|
|
|
|
|
| |
(cherry picked from commit ab0716ed1ea2957396054730afbb80c1825f9786)
Co-authored-by: Francisco Facioni <fran6co@gmail.com>
|
|
|
|
|
|
|
| |
Fix possible overflow in wrap_lenfunc() when
sizeof(long) < sizeof(Py_ssize_t) (e.g., 64-bit Windows).
(cherry picked from commit 05f16416d99dc9fc76fef11e56f16593e7a5955e)
Co-authored-by: Zackery Spytz <zspytz@gmail.com>
|
|
|
|
|
|
|
|
| |
Fix destructor _pyio.BytesIO and _pyio.TextIOWrapper: initialize
their _buffer attribute as soon as possible (in the class body),
because it's used by __del__() which calls close().
(cherry picked from commit a3568417c49f36860393075b21c93996a5f6799b)
Co-authored-by: Victor Stinner <vstinner@redhat.com>
|