| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
split() (GH-3866) (#3874)
when pass a string larger than 2 GiB.
Decrease memory requirements for Tcl's bigmem tests.
(cherry picked from commit 27c623c845dd6e4b8e1782666ca3a956636da266)
|
|
|
|
|
| |
(GH-3864). (#3873)
(cherry picked from commit 929b40a601db868530d6beaafb3256822103a7fb)
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* init commit, with initial tests for from_param and fields __set__ and __get__, and some additions to from_buffer and from_buffer_copy
* added the rest of tests and patches. probably only a first draft.
* removed trailing spaces
* replace ctype with ctypes in error messages
* change back from ctypes instance to ctype instance
(cherry picked from commit 1bea762d9ec823544c530d567330a47f64d93d4f)
|
|
|
|
|
| |
has a bad __abs__() method. (GH-3596) (#3794)
(cherry picked from commit d780b2d588e68bd7047ef5d1f04e36da38b7a350)
|
|
|
|
|
| |
_json.make_encoder() received a bad encoder() argument. (GH-3643) (#3777)
(cherry picked from commit 2b382dd6121bb1e4b75470fb3ef8555665df3eb6)
|
|
|
|
|
| |
attr is defined only outside _fields_. (GH-3615) (#3774)
(cherry picked from commit 30b61b51e05d2d43e8e2e783b0a9df738535423b)
|
|
|
| |
(cherry picked from commit 31aca4bf79217e6ec4c1d056d3ad7ed4dd469c78)
|
|
|
|
|
| |
itertools.groupby() iterators. (GH-1557) (#3770)
(cherry picked from commit c740e4fe8a9bc5815dc18c38d7f7600b128c3c51)
|
|
|
|
|
| |
ctypes._CData.__setstate__(), in case of a bad __dict__. (GH-3254) (#3743)
(cherry picked from commit 57c2561c8c5663aef55b00e3f29cba575ff36ccd)
|
|
|
| |
(cherry picked from commit 49392c63a243052c8013bef80d35202bb6d7c404)
|
|
|
|
|
| |
(GH-3712) (#3714)
(cherry picked from commit d6238a76c655e0feb13478505220dc9049f1682f)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(#3681)
Fix a memory corruption in getpath.c due to mixed memory allocators
between Py_GetPath() and Py_SetPath().
The fix use the Raw allocator to mimic the windows version.
This patch should be used from python3.6 to the current version
for more details, see the bug report and
https://github.com/pyinstaller/pyinstaller/issues/2812
(cherry picked from commit 3d1e2ab584ed0175592b5be2a0bc98dc1723776a)
|
|
|
|
|
| |
with a bad as_integer_ratio() method. (GH-3227) (#3654)
(cherry picked from commit 865e4b4f630e2ae91e61239258abb58b488f1d65)
|
|
|
|
|
|
|
|
|
|
| |
* bpo-31499, xml.etree: Fix xmlparser_gc_clear() crash
xml.etree: xmlparser_gc_clear() now sets self.parser to NULL to prevent a
crash in xmlparser_dealloc() if xmlparser_gc_clear() was called previously
by the garbage collector, because the parser was part of a reference cycle.
Co-Authored-By: Serhiy Storchaka <storchaka@gmail.com>
(cherry picked from commit e727d41ffcd91b21ce82026ec8c8381d34a16209)
|
|
|
|
|
|
|
|
| |
(GH-3545) (#3585)
* Avoid calling "PyObject_GetAttrString()" (and potentially executing user code) with a live exception set.
* Ignore only AttributeError on attribute lookups in ElementTree.XMLParser() and propagate all other exceptions.
(cherry picked from commit c8d8e15bfc24abeeaaf3d8be9073276b0c011cdf)
|
|
|
|
|
| |
case env has a bad keys() method. (GH-3580) (#3584)
(cherry picked from commit 0b3a87ef54a0112b74e8a1d8c6f87d10db4239ab)
|
|
|
|
|
|
|
|
| |
Cast Py_buffer.len (Py_ssize_t, signed) to size_t (unsigned) to
prevent the following warning:
Modules/_ssl.c:3089:21: warning: comparison between signed and
unsigned integer expressions [-Wsign-compare].
(cherry picked from commit 5a61559fb0776a9a0f08294ec9003cea13940430)
|
|
|
|
| |
struct (#3561)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
gcc-7.0 (#3518)
* bpo-30923: Disable warning that has been part of -Wextra since gcc-7.0. (#3142)
(cherry picked from commit d73a960c575207539c3f9765cff26d4fff400b45)
* bpo-30923: Silence fall-through warnings included in -Wextra since gcc-7.0. (#3157)
(cherry picked from commit f432a3234f9f2ee09bd40be03e06bf72865ee375)
* bpo-31275: Small refactoring to silence a fall-through warning. (#3206)
(cherry picked from commit 138753c1b96b5e06a5c5d409fa4cae5e2fe1108b)
|
|
|
|
|
| |
(GH-3477) (#3479)
(cherry picked from commit 3cedf46cdbeefc019f4a672c1104f3d5e94712bd)
|
|
|
|
|
|
| |
* bpo-31392: Improve SSL error handling on Windows
* Remove unnecessary Windows mention in NEWS.
(cherry picked from commit e6eb48c10dc389d1d70657593de6a6cb3087d3d1)
|
|
|
| |
(cherry picked from commit e3b2b4b8d9e751b49e3550cb83ba39b54fdc377c)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* bpo-29136: Add TLS 1.3 support
TLS 1.3 introduces a new, distinct set of cipher suites. The TLS 1.3
cipher suites don't overlap with cipher suites from TLS 1.2 and earlier.
Since Python sets its own set of permitted ciphers, TLS 1.3 handshake
will fail as soon as OpenSSL 1.1.1 is released. Let's enable the common
AES-GCM and ChaCha20 suites.
Additionally the flag OP_NO_TLSv1_3 is added. It defaults to 0 (no op) with
OpenSSL prior to 1.1.1. This allows applications to opt-out from TLS 1.3
now.
Signed-off-by: Christian Heimes <christian@python.org>.
(cherry picked from commit cb5b68abdeb1b1d56c581d5b4d647018703d61e3)
|
|
|
|
| |
Signed-off-by: Christian Heimes <christian@python.org>
(cherry picked from commit 17c9ac9)
|
|
|
|
|
|
|
| |
SSLObject.version() now correctly returns None when handshake over BIO has
not been performed yet.
Signed-off-by: Christian Heimes <christian@python.org>
(cherry picked from commit 6877111)
|
|
|
|
|
|
|
| |
_PyUnicode_FromId() can return NULL: replace Py_INCREF() with
Py_XINCREF().
Fix coverity report: CID 1417269.
(cherry picked from commit af46eb8)
|
|
|
|
|
|
|
|
|
|
| |
* bpo-31170: Update libexpat from 2.2.3 to 2.2.4
Fix copying of partial characters for UTF-8 input (libexpat bug 115):
https://github.com/libexpat/libexpat/issues/115
* Add NEWS entry.
(cherry picked from commit 759e30ec47048cb9835c62aaeac48748c8151390)
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Drop handshake_done and peer_cert members from PySSLSocket struct. The
peer certificate can be acquired from *SSL directly.
SSL_get_peer_certificate() does not trigger any network activity.
Instead of manually tracking the handshake state, simply use
SSL_is_init_finished().
In combination these changes fix auto-handshake for non-blocking
MemoryBIO connections.
Signed-off-by: Christian Heimes <christian@python.org>.
(cherry picked from commit 66dc33b6822be93f85d84d24d3f9159ff568fbbb)
|
|
|
| |
(cherry picked from commit e503ca52889bf66ac502702569e726caa7970299)
|
|
|
|
|
|
|
|
|
| |
The ssl and hashlib modules now call OPENSSL_add_all_algorithms_noconf() on
OpenSSL < 1.1.0. The function detects CPU features and enables optimizations
on some CPU architectures such as POWER8. Patch is based on research from
Gustavo Serra Scalet.
Signed-off-by: Christian Heimes <christian@python.org>
(cherry picked from commit c941e62)
|
|
|
|
|
|
|
| |
Include sys/sysmacros.h for major(), minor(), and makedev(). GNU C libray
plans to remove the functions from sys/types.h.
Signed-off-by: Christian Heimes <christian@python.org>
(cherry picked from commit 75b9618)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Change NPN detection:
Version breakdown, support disabled (pre-patch/post-patch):
- pre-1.0.1: OPENSSL_NPN_NEGOTIATED will not be defined -> False/False
- 1.0.1 and 1.0.2: OPENSSL_NPN_NEGOTIATED will not be defined ->
False/False
- 1.1.0+: OPENSSL_NPN_NEGOTIATED will be defined and
OPENSSL_NO_NEXTPROTONEG will be defined -> True/False
Version breakdown support enabled (pre-patch/post-patch):
- pre-1.0.1: OPENSSL_NPN_NEGOTIATED will not be defined -> False/False
- 1.0.1 and 1.0.2: OPENSSL_NPN_NEGOTIATED will be defined and
OPENSSL_NO_NEXTPROTONEG will not be defined -> True/True
- 1.1.0+: OPENSSL_NPN_NEGOTIATED will be defined and
OPENSSL_NO_NEXTPROTONEG will not be defined -> True/True
* Refine NPN guard:
- If NPN is disabled, but ALPN is available we need our callback
- Make clinic's ssl behave the same way
This created a working ssl module for me, with NPN disabled and ALPN
enabled for OpenSSL 1.1.0f.
Concerns to address:
The initial commit for NPN support into OpenSSL [1], had the
OPENSSL_NPN_* variables defined inside the OPENSSL_NO_NEXTPROTONEG
guard. The question is if that ever made it into a release.
This would need an ugly hack, something like:
GH-if defined(OPENSSL_NO_NEXTPROTONEG) && \
!defined(OPENSSL_NPN_NEGOTIATED)
GH- define OPENSSL_NPN_UNSUPPORTED 0
GH- define OPENSSL_NPN_NEGOTIATED 1
GH- define OPENSSL_NPN_NO_OVERLAP 2
GH-endif
[1] https://github.com/openssl/openssl/commit/68b33cc5c7
(cherry picked from commit b2d096b)
|
|
|
| |
(cherry picked from commit 1c1f8f30c03ca119528)
|
|
|
| |
(cherry picked from commit a6296d34a478b4f697ea9db798146195075d496c)
|
|
|
|
|
|
|
|
|
|
| |
* [3.6] bpo-9146: Raise a ValueError if OpenSSL fails to init a hash func. (GH-1777)
This helps people in weird FIPS mode environments where common things
like MD5 are not available in the binary as a matter of policy.
(cherry picked from commit 07244a83014fad42da937c17d98474b47a570bf7)
* Include a NEWS entry.
|
|
|
| |
(cherry picked from commit bca4939d806170c3ca5d05f23710d11a8f1669cf)
|
|
|
|
|
|
|
|
|
| |
(#2934) (#3267)
* Fixes #30581 by adding a path to use newer GetMaximumProcessorCount API on Windows calls to os.cpu_count()
* Add NEWS.d entry for bpo-30581, os.cpu_count on Windows.
* Tweak NEWS entry
|
|
|
|
|
|
| |
zipimport.zipimporter.get_data() (GH-3226) (#3243)
if pathname.replace('/', '\\') returns non-string.
(cherry picked from commit 631fdee6e61b4ba8ce800f827fecdd536bfb04f3)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-31) (#3241)
Ctypes currently produces wrong pep3118 type codes for several types.
E.g. memoryview(ctypes.c_long()).format gives "<l" on 64-bit platforms,
but it should be "<q" instead for sizeof(c_long) == 8
The problem is that the '<>' endian specification in the struct syntax
also turns on the "standard size" mode, which makes type characters have
a platform-independent meaning, which does not match with the codes used
internally in ctypes. The struct module format syntax also does not
allow specifying native-size non-native-endian items.
This commit adds a converter function that maps the internal ctypes
codes to appropriate struct module standard-size codes in the pep3118
format strings. The tests are modified to check for this.
(cherry picked from commit 07f1658aa09f6798793c473c72b2951b7fefe220)
|
|
|
| |
(cherry picked from commit ba7d7365215d791025d1efd25393c91404f2cfc8)
|
|
|
|
|
| |
(GH-3201) (#3209)
(cherry picked from commit a5b4ea15b61e3f3985f4f0748a18f8b888a63532)
|
|
|
|
| |
to parse non-args. (#3210)
|
|
|
|
|
|
|
| |
(#501) (#3190)
FreeBSD is the only platforms with unsigned FD_SETSIZE.
(cherry picked from commit 783d0c1a1c723733adcdf4249240246fc35a5bcb)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* bpo-30947: Update libexpat from 2.2.1 to 2.2.3
* Add NEWS entry
* Add new loadlibrary.c
* expat_external.h: restore include "pyexpatns.h"
* PCbuild: add expat/loadlibrary.c
* Define XML_POOR_ENTROPY to compile expat
(cherry picked from commit 93d0cb58b4da2a88c56f472c6c19491cc7a390df)
|
|
|
|
|
|
|
| |
(#3102)
Use only the LongLong form for the conversions
(cherry picked from commit 50e86033de85294d87b7e942701d456342abde8e)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The current test_child_terminated_in_stopped_state() function test
creates a child process which calls ptrace(PTRACE_TRACEME, 0, 0) and
then crash (SIGSEGV). The problem is that calling os.waitpid() in the
parent process is not enough to close the process: the child process
remains alive and so the unit test leaks a child process in a
strange state. Closing the child process requires non-trivial code,
maybe platform specific.
Remove the functional test and replaces it with an unit test which
mocks os.waitpid() using a new _testcapi.W_STOPCODE() function to
test the WIFSTOPPED() path.
(cherry picked from commit 7b7c6dcfff6a35333988a3c74c895ed19dff2e09)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-2417) (#3007)
* Improve signal delivery
Avoid using Py_AddPendingCall from signal handler, to avoid calling signal-unsafe functions.
* Remove unused function
* Improve comments
* Use _Py_atomic API for concurrency-sensitive signal state
* Add blurb
(cherry picked from commit 2c8a5e4c968217f9672340e520942c4ed788d8de)
|
|
|
| |
(cherry picked from commit de34cbe9cdaaf7b85fed86f99c2fd071e1a7b1d2)
|
|
|
|
|
| |
(#2868)
(cherry picked from commit 39243779f4c97ec6f700fa73c007ca66dfa9408e)
|
|
|
| |
(cherry picked from commit 4ed5ad79ec6c6270e6018bd0a55656305ee60907)
|