| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
| |
Co-Authored-By: Victor Stinner <vstinner@python.org>
(cherry picked from commit 95826c773a9004fc5b3c89de55f800504685ab21)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
test_openssl_version now accepts version 3.0.0.
getpeercert() no longer returns IPv6 addresses with a trailing new line.
Signed-off-by: Christian Heimes <christian@python.org>
https://bugs.python.org/issue38820
(cherry picked from commit 2b7de6696bf2f924cd2cd9ff0a539c8aa37c6244)
Co-authored-by: Christian Heimes <christian@python.org>
https://bugs.python.org/issue38820
Automerge-Triggered-By: @tiran
|
| |
|
|
|
|
|
| |
Python version (GH-17484) (GH-17494)
(cherry picked from commit 969ae7aca809a8dacafee04c261110eea0ac1945)
Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
|
| |
|
|
|
|
|
| |
Use the "volatile" keyword to prevent tail call optimization
on any compiler, rather than relying on compiler specific pragma.
(cherry picked from commit 8b787964e0a647caa0558b7c29ae501470d727d9)
Co-authored-by: Victor Stinner <vstinner@python.org>
|
| |
|
|
|
|
|
| |
Increment properly Py_True/Py_False reference counter for
_testcapi.WITH_PYMALLOC variable.
(cherry picked from commit 84c36c152a2bdf98f9cc7ce0e1db98e1f442a05e)
Co-authored-by: Victor Stinner <vstinner@python.org>
|
| |
|
|
|
| |
(GH-17097) (GH-17224)
(cherry picked from commit 106271568c58cfebae58f0c52b640dbe716ba2ce)
|
| |
|
|
|
| |
(cherry picked from commit d51a363a4379385fdfe9c09a56324631465ede29)
Co-authored-by: Brandt Bucher <brandtbucher@gmail.com>
|
| |
|
|
|
| |
(cherry picked from commit ac2235432c607ce2c0faf6dff5d9b2534d2f6652)
Co-authored-by: Brandt Bucher <brandtbucher@gmail.com>
|
| |
|
|
|
|
| |
https://bugs.python.org/issue38823
(cherry picked from commit 289cf0fbf78c4f38c38ac71ac8b772be7ec2672f)
Co-authored-by: Brandt Bucher <brandtbucher@gmail.com>
|
| |
|
|
|
|
| |
https://bugs.python.org/issue38823
(cherry picked from commit 143a97f64128070386b12a0ee589bdaad5e51f40)
Co-authored-by: Brandt Bucher <brandtbucher@gmail.com>
|
| |
|
|
|
|
| |
https://bugs.python.org/issue38823
(cherry picked from commit c3f6bdc332d23588102eba749a5929dd5bb67c9d)
Co-authored-by: Brandt Bucher <brandtbucher@gmail.com>
|
| |
|
|
|
|
|
|
| |
if parent `__init__` is not called from a constructor of object derived from `asyncio.Future`
https://bugs.python.org/issue38785
(cherry picked from commit dad6be5ffe48beb74fad78cf758b886afddc7aed)
Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
|
| |
|
|
|
|
| |
files. (GH-17137)
This change, which follows the behavior of C stdio's fdopen and Python 2's file object, allows pipes to be opened in append mode..
(cherry picked from commit 74fa9f723f700a342e582b5ad4b51a2c4801cd1c)
|
| |
|
|
|
|
|
| |
The master and 3.8 versions of the previous change work as expected
because we perform the lookup for the `from_param` after the union
check. However, in 3.7, this lookup happens before the union
validation and so we must decrease the reference for `cnv` before
returning.
|
| |
|
|
|
| |
(GH-16799) (GH-17017)
(cherry picked from commit 79d4ed102a5069c6cebaed2627cb1645637f0429)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-16658) (GH-16685)
* [bpo-38379](https://bugs.python.org/issue38379): when a finalizer resurrects an object,
nothing is actually collected in this run of gc.
Change the stats to relect that truth..
(cherry picked from commit ecbf35f9335b0420cb8adfda6f299d6747a16515)
Co-authored-by: Tim Peters <tim.peters@gmail.com>
https://bugs.python.org/issue38379
Automerge-Triggered-By: @pablogsal
|
| |
|
|
|
| |
structs/unions. (GH-16589) (GH-16672)
(cherry picked from commit e8bedbddadaa86be6bd86dc32dbdbd53933a4988)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-16545)
On Windows use UTF-16 (or UTF-32 for 32-bit Tcl_UniChar) with the
"surrogatepass" error handler for converting to/from Tcl Unicode objects.
On Linux use UTF-8 with the "surrogateescape" error handler for converting
to/from Tcl String objects.
Converting strings from Tcl to Python and back now never fails
(except MemoryError).
(cherry picked from commit 06cb94bc8419b9a24df6b0d724fcd8e40c6971d6)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
| |
|
|
|
|
| |
Fixes CVE-2019-15903. See full changelog at https://github.com/libexpat/libexpat/blob/R_2_2_8/expat/Changes..
(cherry picked from commit 52b940803860e37bcc3f6096b2d24e7c20a0e807)
Co-authored-by: Benjamin Peterson <benjamin@python.org>
|
| |
|
|
|
| |
(GH-16381) (GH-16400)
(cherry picked from commit c64af8fad3c4f5751af624647fbb0ce023f525dc)
|
| |
|
|
|
| |
(GH-15839) (GH-16369)
(cherry picked from commit 12f209eccb1587e8c98057d9c5f865c21f4a16c1)
|
| |
|
|
|
|
|
| |
(GH-16190)
(cherry picked from commit f669581a9527afb0d2325f9845a86715c0ba365d)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
| |
|
|
|
| |
(cherry picked from commit 8debfa50407107ff2329d01081cdc12d359f1d12)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-16140) (GH-16200)
``OPENSSL_VERSION_1_1`` was never defined in ``_hashopenssl.c``.
https://bugs.python.org/issue33936
(cherry picked from commit 724f1a57231f9287c37255adf0e4364d12cf693d)
Co-authored-by: Christian Heimes <christian@python.org>
https://bugs.python.org/issue33936
Automerge-Triggered-By: @tiran
|
| |
|
|
|
|
|
|
|
|
| |
(GH-16136) (GH-16175)
(cherry picked from commit 56a45142e70a1ccf3233d43cb60c47255252e89a)
Co-authored-by: Hai Shi <shihai1992@gmail.com>
Automerge-Triggered-By: @zhangyangyu
|
| |
|
|
|
|
|
|
|
|
| |
* 1. add test case with wrong behavior
* 2. fix bug when max_length == -1
* 3. allow b"" as valid input data for decompress_buf()
* 4. when max_length >= 0, let needs_input mechanism works
* add more asserts to test case
(cherry picked from commit 4ffd05d7ec47cfd0d7fc95dce851633be9663255)
Co-authored-by: animalize <animalize@users.noreply.github.com>
|
| |
|
|
|
|
|
|
| |
failure. (GH-16011)
An exception may occur during a PyObject_IsSubclass() call.
(cherry picked from commit ea683deccc505a78bbbb1eb8c6a88b0835ad5151)
Co-authored-by: Zackery Spytz <zspytz@gmail.com>
|
| |
|
|
|
|
|
| |
As described in Doc/c-api/init.rst, PyEval_InitThreads() cannot be called
before Py_Initialize() function.
(cherry picked from commit 9e61066355b4b55c873d56f5f106a22463b56862)
Co-authored-by: Kenta Murata <mrkn@users.noreply.github.com>
|
| | |
|
| |
|
|
|
|
|
|
| |
Accumulate certificates in a set instead of doing a costly list contain
operation. A Windows cert store can easily contain over hundred
certificates. The old code would result in way over 5,000 comparison
operations
Signed-off-by: Christian Heimes <christian@python.org>
|
| |
|
|
|
| |
(cherry picked from commit 09090d04ef8d2f4c94157b852d3d530a51e13d22)
Co-authored-by: Orivej Desh <orivej@gmx.fr>
|
| |
|
|
|
|
|
|
| |
ssl_collect_certificates function in _ssl.c has a memory leak.
Calling CertOpenStore() and CertAddStoreToCollection(), a store's refcnt gets incremented by 2.
But CertCloseStore() is called only once and the refcnt leaves 1.
(cherry picked from commit ed70129e15ea028469145111044a4349960a4e6f)
Co-authored-by: neonene <53406459+neonene@users.noreply.github.com>
|
| |
|
|
|
|
|
|
| |
(GH-14462)
If FormatMessageW() is passed the FORMAT_MESSAGE_FROM_SYSTEM flag without FORMAT_MESSAGE_IGNORE_INSERTS, it will fail if there are insert sequences in the message definition.
(cherry picked from commit a6563650c835d50f7302971a5b145e94f9d0dc68)
Co-authored-by: Zackery Spytz <zspytz@gmail.com>
|
| |
|
|
|
|
| |
RuntimeError is now raised in this case.
(cherry picked from commit 526a01467b3277f9fcf7f91e66c23321caa1245d)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
| |
|
|
|
|
| |
This is a complement to PR 13375.
(cherry picked from commit 3c87a667bb367ace1de6bd1577fdb4f66947da52)
Co-authored-by: HongWeipeng <hongweichen8888@sina.com>
|
| |
|
|
|
|
|
| |
seconds>=24. (GH-14307)
(cherry picked from commit 122376df550b71dd3bec0513c7483cc1714212fa)
Co-authored-by: Justin Blanchard <UncombedCoconut@gmail.com>
|
| |
|
|
|
| |
(cherry picked from commit 8bf5fef8737fdd12724b9340d76a4ed391c4ad8a)
Co-authored-by: vrajivk <3413293+vrajivk@users.noreply.github.com>
|
| |
|
|
|
|
|
|
|
|
| |
(GH-15390) (GH-15417)
https://bugs.python.org/issue37915
Automerge-Triggered-By: @pablogsal.
(cherry picked from commit 4be11c009abe88175fa164b45e4838e7267dfa97)
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
| |
This fixes an inconsistency between the Python and C implementations of
the datetime module. The pure python version of the code was not
accepting offsets greater than 23:59 but less than 24:00. This is an
accidental legacy of the original implementation, which was put in place
before tzinfo allowed sub-minute time zone offsets.
GH-14878
(cherry picked from commit 92c7e30adf5c81a54d6e5e555a6bdfaa60157a0d)
|
| |
|
|
|
|
|
|
|
|
| |
PEM_read_bio_X509 (GH-15303)
X509_AUX is an odd, note widely used, OpenSSL extension to the X509 file format. This function doesn't actually use any of the extra metadata that it parses, so just use the standard API.
Automerge-Triggered-By: @tiran
(cherry picked from commit 40dad9545aad4ede89abbab1c1beef5303d9573e)
Co-authored-by: Alex Gaynor <alex.gaynor@gmail.com>
|
| |
|
|
|
|
|
|
|
| |
faulthandler now allocates a dedicated stack of SIGSTKSZ*2 bytes,
instead of just SIGSTKSZ bytes. Calling the previous signal handler
in faulthandler signal handler uses more than SIGSTKSZ bytes of stack
memory on some platforms.
(cherry picked from commit ac827edc493d3ac3f5b9b0cc353df1d4b418a9aa)
Co-authored-by: Victor Stinner <vstinner@redhat.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
FreeBSD implementation of poll(2) restricts the timeout argument to be
either zero, or positive, or equal to INFTIM (-1).
Unless otherwise overridden, socket timeout defaults to -1. This value
is then converted to milliseconds (-1000) and used as argument to the
poll syscall. poll returns EINVAL (22), and the connection fails.
This bug was discovered during the EINTR handling testing, and the
reproduction code can be found in
https://bugs.python.org/issue23618 (see connect_eintr.py,
attached). On GNU/Linux, the example runs as expected.
This change is trivial:
If the supplied timeout value is negative, truncate it to -1.
(cherry picked from commit 28146206578ebe1b84b48e6f255738a227058c04)
Co-authored-by: Artem Khramov <akhramov@pm.me>
|
| |
|
|
|
|
|
| |
Fix the implementation of curses addch(str, color_pair): pass the
color pair to setcchar(), instead of always passing 0 as the color
pair.
(cherry picked from commit 077af8c2c93dd71086e2c5e5ff1e634b6da8f214)
|
| |
|
|
|
|
|
|
|
|
| |
datetime.timezone. (GH-14996) (GH-15104)
There was a discrepancy between the Python and C implementations.
Add singletons ALWAYS_EQ, LARGEST and SMALLEST in test.support
to test mixed type comparison.
(cherry picked from commit 17e52649c0e7e9389f1cc2444a53f059e24e6bca)
|
| |
|
|
|
| |
(cherry picked from commit c9345e382c630ddcc2b148b30954640e0e435c8a)
Co-authored-by: Anthony Sottile <asottile@umich.edu>
|
| |
|
|
|
| |
(cherry picked from commit 96e12d5f4f3c5a20986566038ee763dff3c228a1)
Co-authored-by: Min ho Kim <minho42@gmail.com>
|
| |
|
|
|
| |
(cherry picked from commit 2cd07920bb7d2d319999394092190f37935dc421)
Co-authored-by: Benjamin Peterson <benjamin@python.org>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
SSLContext.post_handshake_auth = True no longer sets
SSL_VERIFY_POST_HANDSHAKE verify flag for client connections. Although the
option is documented as ignored for clients, OpenSSL implicitly enables cert
chain validation when the flag is set.
Signed-off-by: Christian Heimes <christian@python.org>
https://bugs.python.org/issue37428
(cherry picked from commit f0f5930ac88482ef896283db5be9b8d508d077db)
Co-authored-by: Christian Heimes <christian@python.org>
https://bugs.python.org/issue37428
|
| |
|
|
|
| |
(cherry picked from commit 3b03b09fc94425915c5b1225e9200a3a95bc827b)
Co-authored-by: Benjamin Peterson <benjamin@python.org>
|
| |
|
|
|
|
|
| |
(GH-14414)
(cherry picked from commit 45a30af109f69a81576b87ea775863ba12d55316)
Co-authored-by: Brandt Bucher <brandtbucher@gmail.com>
|