| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
Skip the test if setlocale() fails.
(cherry picked from commit f3ab670fea75ebe177e3412a5ebe39263cd428e3)
Co-authored-by: Victor Stinner <vstinner@python.org>
|
|
|
|
|
| |
(cherry picked from commit 51a85ddce8b336addcb61b96f04c9c5edef07296)
Co-authored-by: Alex Prengère <2138730+alexprengere@users.noreply.github.com>
|
|
|
|
|
|
|
| |
sys.stderr (GH-25075)
(cherry picked from commit 09b90a037d18f5d4acdf1b14082e57bda78e85d3)
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
|
|
|
|
|
|
|
|
| |
This test checks result code of the connection directly, so it never raises an exception that can be suppressed by `support.transient_internet`. Directly support skipping the test in case of unreachable network.
(cherry picked from commit 29c451c6989c3c94fa0a9facf187c24f3cbf2420)
Co-authored-by: Carl Meyer <carl@oddbird.net>
Co-authored-by: Carl Meyer <carl@oddbird.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-24906)
Python no longer fails at startup with a fatal error if a command
line argument contains an invalid Unicode character.
The Py_DecodeLocale() function now escapes byte sequences which would
be decoded as Unicode characters outside the [U+0000; U+10ffff]
range.
Use MAX_UNICODE constant in unicodeobject.c.
(cherry picked from commit 9976834f807ea63ca51bc4f89be457d734148682)
Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Victor Stinner <vstinner@python.org>
|
|
|
|
|
|
|
|
| |
curses.update_lines_cols() is only defined when the curses library
provides either resizeterm() or resize_term() functions which are optional
and are not provided on AIX.
(cherry picked from commit c8b5738810516df5722caf049003e9b319427bec)
Co-authored-by: Michael Felt <aixtools@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
|
| |
CVE-2021-3426: Remove the "getfile" feature of the pydoc module which
could be abused to read arbitrary files on the disk (directory
traversal vulnerability). Moreover, even source code of Python
modules can contain sensitive data like passwords. Vulnerability
reported by David Schwörer.
(cherry picked from commit 9b999479c0022edfc9835a8a1f06e046f3881048)
Co-authored-by: Victor Stinner <vstinner@python.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-24957)
OpenSSL copies the internal message callback from SSL_CTX->msg_callback to
SSL->msg_callback. SSL_set_SSL_CTX() does not update SSL->msg_callback
to use the callback value of the new context.
PySSL_set_context() now resets the callback and _PySSL_msg_callback()
resets thread state in error path.
Signed-off-by: Christian Heimes <christian@python.org>
(cherry picked from commit 77cde5042a2f1eae489c11a67540afaf43cd5cdf)
Co-authored-by: Christian Heimes <christian@python.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Ubuntu 20.04 comes with a patched OpenSSL 1.1.1. Default security level
2 blocks TLS 1.0 and 1.1 connections. Regular OpenSSL 1.1.1 builds allow
TLS 1.0 and 1.1 on security level 2.
See:
See: https://bugs.launchpad.net/ubuntu/+source/openssl/+bug/1899878
See: https://bugs.launchpad.net/ubuntu/+source/openssl/+bug/1917625
Signed-off-by: Christian Heimes <christian@python.org>
(cherry picked from commit f6c6b5821bff815bdc810de53992fd1fbdb2edd4)
Co-authored-by: Christian Heimes <christian@python.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
bpo-43285: Make ftplib not trust the PASV response.
The IPv4 address value returned from the server in response to the PASV command
should not be trusted. This prevents a malicious FTP server from using the
response to probe IPv4 address and port combinations on the client network.
Instead of using the returned address, we use the IP address we're
already connected to. This is the strategy other ftp clients adopted,
and matches the only strategy available for the modern IPv6 EPSV command
where the server response must return a port number and nothing else.
For the rare user who _wants_ this ugly behavior, set a `trust_server_pasv_ipv4_address`
attribute on your `ftplib.FTP` instance to True..
(cherry picked from commit 0ab152c6b5d95caa2dc1a30fa96e10258b5f188e)
Co-authored-by: Gregory P. Smith <greg@krypto.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* bpo-27820: Fix AUTH LOGIN logic in smtplib.SMTP (GH-24118)
* Fix auth_login logic (bpo-27820)
* Also fix a longstanding bug in the SimSMTPChannel.found_terminator() method that causes inability to test
SMTP AUTH with initial_response_ok=False.
(cherry picked from commit 7591d9455eb37525c832da3d65e1a7b3e6dbf613)
* Set timeout to 15 directly.
Co-authored-by: Pandu E POLUAN <pepoluan@gmail.com>
|
|
|
|
|
|
|
|
|
|
| |
Fix a race condition of test_stress_modifying_handlers() of
test_signal: only raise signals while we are in the
catch_unraisable_exception() context manager.
Moreover, don't check if we received at least one
signal if at least one signal got ignored.
(cherry picked from commit 1fa17e8cc62775a2e34b158135ce8589f9394f03)
Co-authored-by: Victor Stinner <vstinner@python.org>
|
|
|
|
|
| |
(cherry picked from commit b4f9089d4aa787c5b74134c98e5f0f11d9e63095)
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
|
|
|
|
|
|
|
|
| |
tries to execute a non-Python signal handler (GH-24756) (GH-24762)
We can receive signals (at the C level, in `trip_signal()` in signalmodule.c) while `signal.signal` is being called to modify the corresponding handler. Later when `PyErr_CheckSignals()` is called to handle the given signal, the handler may be a non-callable object and would raise a cryptic asynchronous exception..
(cherry picked from commit 68245b7a1030287294c65c298975ab9026543fd2)
Co-authored-by: Antoine Pitrou <antoine@python.org>
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-23127) (GH-24749)
This reverts commit aca67da4fe68d5420401ac1782203d302875eb27.
(cherry picked from commit b5711c940f70af89f2b4cf081a3fcd83924f3ae7)
Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
Automerge-Triggered-By: GH:jaraco
|
|
|
|
|
|
|
|
| |
* Fail fast in shutil.move() to avoid creating destination directories on failure.
Co-authored-by: Zackery Spytz <zspytz@gmail.com>
(cherry picked from commit 132131b404e06ee1a19b040a1f96cd1118abed0c)
Co-authored-by: Winson Luk <winson.luk@gmail.com>
|
|
|
|
|
| |
(cherry picked from commit 9525a18b5bb317d9fb206c992ab62aa41559b0c8)
Co-authored-by: Inada Naoki <songofacandy@gmail.com>
|
|
|
|
|
|
|
| |
Exit code is now 1 instead of 0. A message is printed to stderr instead of stdout. This is
the proper behaviour for a tool that can be used in scripts.
(cherry picked from commit cc3df6368d4f3f6c9c9b716876c7e7b79c7abf3f)
Co-authored-by: Ruben Vorderman <r.h.p.vorderman@lumc.nl>
|
|
|
|
|
|
|
|
|
| |
When very large data remains in TextIOWrapper, flush() may fail forever.
So prevent that data larger than chunk_size is remained in TextIOWrapper internal
buffer.
Co-Authored-By: Eryk Sun.
(cherry picked from commit 01806d5beba3d208bb56adba6829097d803bf54f)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* bpo-42967: only use '&' as a query string separator (#24297)
bpo-42967: [security] Address a web cache-poisoning issue reported in
urllib.parse.parse_qsl().
urllib.parse will only us "&" as query string separator by default
instead of both ";" and "&" as allowed in earlier versions. An optional
argument seperator with default value "&" is added to specify the
separator.
Co-authored-by: Éric Araujo <merwok@netwok.org>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
Co-authored-by: Éric Araujo <merwok@netwok.org>
(cherry picked from commit fcbe0cb04d35189401c0c880ebfb4311e952d776)
* [3.8] bpo-42967: only use '&' as a query string separator (GH-24297)
bpo-42967: [security] Address a web cache-poisoning issue reported in urllib.parse.parse_qsl().
urllib.parse will only us "&" as query string separator by default instead of both ";" and "&" as allowed in earlier versions. An optional argument seperator with default value "&" is added to specify the separator.
Co-authored-by: Éric Araujo <merwok@netwok.org>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
Co-authored-by: Éric Araujo <merwok@netwok.org>.
(cherry picked from commit fcbe0cb04d35189401c0c880ebfb4311e952d776)
Co-authored-by: Adam Goldschmidt <adamgold7@gmail.com>
* Update correct version information.
* fix docs and make logic clearer
Co-authored-by: Adam Goldschmidt <adamgold7@gmail.com>
Co-authored-by: Fidget-Spinner <28750310+Fidget-Spinner@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* bpo-41748: Adds tests for unquoted attributes with comma
* bpo-41748: Handles unquoted attributes with comma
* bpo-41748: Addresses review comments
* bpo-41748: Addresses review comments
* Adds more test cases
* Simplifies the regex for handling spaces
* bpo-41748: Moves attributes tests under the right class
* bpo-41748: Addresses review about duplicate attributes
* bpo-41748: Adds NEWS.d entry for this patch
(cherry picked from commit 9eb11a139fac5514d8456626806a68b3e3b7eafb)
Co-authored-by: Karl Dubost <karl+github@la-grange.net>
|
|
|
|
|
|
| |
(cherry picked from commit a1e9a1e120a11c563e166c15721169184c802f8b)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
|
|
| |
(cherry picked from commit d64fd4bb5bb4fd2e3277f39d3ad99b5a8d193e1b).
(cherry picked from commit e9d4960d15c5282904cf26e469ce7cee39f634f7)
|
|
|
|
| |
directory changed (GH-23412) (#24323)
|
| |
|
|
|
|
|
| |
(GH-24172) (GH-24277)
(cherry picked from commit 7dc71c425cf6aa6a4070a418dce5d95ca435c79f)
|
|
|
|
|
|
|
|
|
| |
__file__ (GH-23611)
Fixes [bpo-42531]() for Python 3.8.
The issue also applies to 3.7. If this PR looks like it'll be accepted, I can cherry-pick it to the 3.7 branch and submit a follow-up PR.
Automerge-Triggered-By: GH:jaraco
|
|
|
|
|
|
|
|
|
|
| |
(GH-24089) (GH-24113) (GH-24116)
On ncurses 6.1 pair numbers are limited by SHORT_MAX-1.
Improve error reporting and tests for color functions.
(cherry picked from commit 59f9b4e4509be67494f3d45489fa55523175ff69)
(cherry picked from commit 9b3a53a8264d4c469a3f3d8c037e74c010be3e5c)
|
|
|
|
|
|
|
| |
(GH-23874). (GH-24077) (GH-24079)
(cherry picked from commit 1470edd6131c29b8a09ce012cdfee3afa269d553)
(cherry picked from commit b0ee2b492dbf550fbd2a63b82de0a4dc9d67f32e)
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-24076) (GH-24078)
If __stdout__ is not attached to terminal, try to use __stderr__
if it is attached to terminal, or open the terminal device, or
use regular file as terminal, but some functions will be untested
in the latter case.
(cherry picked from commit 607501abb488fb37e33cf9d35260ab7baefa192f)
(cherry picked from commit 0303008ebceb6ac6035cd9722d1393267304171d)
|
|
|
|
|
| |
(cherry picked from commit a25011be8c6f62cb3333903befe6295d57f0bd30)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
|
|
|
|
| |
Unexpected errors in calling the __iter__ method are no longer
masked by TypeError in csv.reader(), csv.writer.writerow() and
csv.writer.writerows().
(cherry picked from commit c88239f864a27f673c0f0a9e62d2488563f9d081)
|
|
|
|
|
| |
(cherry picked from commit ec3165320e81ac87edcb85c86c452528ddbaec1c)
Co-authored-by: Dong-hee Na <donghee.na@python.org>
|
|
|
|
|
|
|
| |
(#23992)
(cherry picked from commit 030a713183084594659aefd77b76fe30178e23c8)
Co-authored-by: Senthil Kumaran <senthil@uthcode.com>
|
|
|
|
|
|
|
| |
Tk can internally support bignum even if Tkinter is built without
support of bignum.
(cherry picked from commit 156b7f7052102ee1633a18e9a136ad8c38f66db0)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
|
|
|
|
|
| |
linked with Tk >= 8.5 (GH-23955) (GH-23962)
(cherry picked from commit b02ad2458bc127a7afdeef414fa68c9a7f1f32af)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
|
|
|
|
| |
(GH-23281). (GH-23784) (GH-23787)
(cherry picked from commit a26215db11cfcf7b5f55cab9e91396761a0e0bcf)
(cherry picked from commit 28bf6ab61f77c69b732a211c398ac882bf3f65f4)
|
|
|
|
|
|
|
| |
It did not work because the signature of code object constructor
was changed. Also, it used old format of bytecode (pre-wordcode).
(cherry picked from commit 954a7427ba9c2d02faed32c02090caeca873aeca)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When the modern text= spelling of the universal_newlines= parameter was added
for Python 3.7, check_output's special case around input=None was overlooked.
So it behaved differently with universal_newlines=True vs text=True. This
reconciles the behavior to be consistent and adds a test to guarantee it.
Also clarifies the existing check_output documentation.
Co-authored-by: Alexey Izbyshev <izbyshev@ispras.ru>
(cherry picked from commit 64abf373444944a240274a9b6d66d1cb01ecfcdd)
Co-authored-by: Gregory P. Smith <greg@krypto.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-23781) (GH-23854)
* Tkinter functions and constructors which need a default root window
raise now RuntimeError with descriptive message instead of obscure
AttributeError or NameError if it is not created yet or cannot
be created automatically.
* Add tests for all functions which use default root window.
* Fix import in the pynche script.
(cherry picked from commit 3d569fd6dccf9f582bafaca04d3535094cae393e)
|
|
|
|
|
| |
(cherry picked from commit 17ef4319a34f5a2f95e7823dfb5f5b8cff11882d)
Co-authored-by: Richard Kojedzinszky <rkojedzinszky@users.noreply.github.com>
|
|
|
|
|
|
|
|
| |
Use shorter timeout and replace send() with sendall().
(cherry picked from commit 79782fe4f8cf73d7fdf8db02073bbadf7ff817b6)
Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Victor Stinner <vstinner@python.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* bpo-42644: Validate values in logging.disable()
Technically make the value of manager a property that checks and convert
values assigned to it properly. This has the side effect of making
`logging.disable` also accept strings representing the various level of
warnings.
We want to validate the type of the disable attribute at assignment
time, as it is later compared to other levels when emitting warnings and
would generate a `TypeError: '>=' not supported between ....` in a
different part of the code base, which can make it difficult to track
down.
When assigned an incorrect value; it will raise a TypeError when the
wrong type, or ValueError if an invalid str.
Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
(cherry picked from commit b32d8b4f9bcd2e7d11240b6b9de0262cf8f5e09d)
Co-authored-by: Matthias Bussonnier <bussonniermatthias@gmail.com>
|
|
|
|
|
| |
(cherry picked from commit 68526fe258da8c01196fd7cf48e8e5f1280bf8fd)
Co-authored-by: Angelin BOOZ <9497359+lem2clide@users.noreply.github.com>
|
|
|
| |
* [3.8] [Enum] reformat and add doc strings (GH-23705).
|
|
|
| |
(cherry picked from commit 37440eef7f9a0c27e13fc9ce0850574bb00688b0)
|
|
|
| |
(cherry picked from commit c266736ec1f9ebef38b134ceb4832df015711b38)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Several built-in and standard library types now ensure that their internal result tuples are always tracked by the garbage collector:
- collections.OrderedDict.items
- dict.items
- enumerate
- functools.reduce
- itertools.combinations
- itertools.combinations_with_replacement
- itertools.permutations
- itertools.product
- itertools.zip_longest
- zip
Previously, they could have become untracked by a prior garbage collection.
(cherry picked from commit 226a012d1cd61f42ecd3056c554922f359a1a35d)
|
|
|
|
|
|
|
| |
distutils (GH-22088)
(cherry picked from commit c0afb7fa0ebd1c0e95c0760bbe75a99a8dd12ea6)
Co-authored-by: Matti Picus <matti.picus@gmail.com>
|
|
|
|
|
|
|
|
| |
range (GH-23633)
This can happen when a file was edited after it was imported.
(cherry picked from commit 2e0760bb2edb595050aff82f236cd32b44d3dfb3)
Co-authored-by: Irit Katriel <iritkatriel@yahoo.com>
|