summaryrefslogtreecommitdiffstats
path: root/Modules
Commit message (Collapse)AuthorAgeFilesLines
* [3.6] bpo-31675: Fix memory leaks in Tkinter's methods splitlist() and ↵Miss Islington (bot)2017-10-031-2/+10
| | | | | | | | 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)
* [3.6] bpo-31673: Fixed typo in the name of Tkinter's method adderrorinfo(). ↵Serhiy Storchaka2017-10-032-13/+13
| | | | | (GH-3864). (#3873) (cherry picked from commit 929b40a601db868530d6beaafb3256822103a7fb)
* bpo-28129: fix ctypes crashes (#386) (#3799)Victor Stinner2017-09-282-9/+34
| | | | | | | | | | | | | * 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)
* [3.6] bpo-31478: Fix an assertion failure in random.seed() in case a seed ↵Serhiy Storchaka2017-09-281-2/+5
| | | | | has a bad __abs__() method. (GH-3596) (#3794) (cherry picked from commit d780b2d588e68bd7047ef5d1f04e36da38b7a350)
* [3.6] bpo-31505: Fix an assertion failure in json, in case ↵Miss Islington (bot)2017-09-271-3/+13
| | | | | _json.make_encoder() received a bad encoder() argument. (GH-3643) (#3777) (cherry picked from commit 2b382dd6121bb1e4b75470fb3ef8555665df3eb6)
* [3.6] bpo-31490: Fix an assertion failure in ctypes in case an _anonymous_ ↵Miss Islington (bot)2017-09-271-1/+9
| | | | | attr is defined only outside _fields_. (GH-3615) (#3774) (cherry picked from commit 30b61b51e05d2d43e8e2e783b0a9df738535423b)
* [3.6] bpo-31586: Use _count_element fast path for real dicts. (#3776)Miss Islington (bot)2017-09-271-1/+3
| | | (cherry picked from commit 31aca4bf79217e6ec4c1d056d3ad7ed4dd469c78)
* [3.6] bpo-30347: Stop crashes when concurrently iterate over ↵Miss Islington (bot)2017-09-261-36/+31
| | | | | itertools.groupby() iterators. (GH-1557) (#3770) (cherry picked from commit c740e4fe8a9bc5815dc18c38d7f7600b128c3c51)
* [3.6] bpo-31311: Fix a SystemError and a crash in ↵Miss Islington (bot)2017-09-251-0/+10
| | | | | ctypes._CData.__setstate__(), in case of a bad __dict__. (GH-3254) (#3743) (cherry picked from commit 57c2561c8c5663aef55b00e3f29cba575ff36ccd)
* [3.6] bpo-27385: Clarify docstring for groupby() (GH-3738) (#3744)Miss Islington (bot)2017-09-251-2/+3
| | | (cherry picked from commit 49392c63a243052c8013bef80d35202bb6d7c404)
* [3.6] bpo-25359: Add missed "goto error" after setting an exception. ↵Miss Islington (bot)2017-09-241-0/+1
| | | | | (GH-3712) (#3714) (cherry picked from commit d6238a76c655e0feb13478505220dc9049f1682f)
* [3.6] closes bpo-31532: Fix memory corruption due to allocator mix (GH-3679) ↵Miss Islington (bot)2017-09-211-1/+1
| | | | | | | | | | | | | | (#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)
* [3.6] bpo-31293: Fix crashes in truediv and mul of a timedelta by a float ↵Miss Islington (bot)2017-09-191-4/+33
| | | | | with a bad as_integer_ratio() method. (GH-3227) (#3654) (cherry picked from commit 865e4b4f630e2ae91e61239258abb58b488f1d65)
* [3.6] bpo-31499, xml.etree: Fix xmlparser_gc_clear() crash (GH-3641) (#3645)Miss Islington (bot)2017-09-181-1/+5
| | | | | | | | | | * 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)
* [3.6] bpo-31455: Fix an assertion failure in ElementTree.XMLParser(). ↵Miss Islington (bot)2017-09-141-2/+33
| | | | | | | | (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)
* [3.6] bpo-31471: Fix assertion failure in subprocess.Popen() on Windows, in ↵Miss Islington (bot)2017-09-141-1/+5
| | | | | case env has a bad keys() method. (GH-3580) (#3584) (cherry picked from commit 0b3a87ef54a0112b74e8a1d8c6f87d10db4239ab)
* [3.6] _ssl_: Fix compiler warning (GH-3559) (#3569)Christian Heimes2017-09-141-0/+6
| | | | | | | | 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)
* [3.6] bpo-30246: fix several error messages which only mention bytes in ↵Xiang Zhang2017-09-141-4/+5
| | | | struct (#3561)
* [3.6] bpo-30923: Silence fall-through warnings included in -Wextra since ↵Victor Stinner2017-09-123-9/+9
| | | | | | | | | | | | | | | | 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)
* [3.6] bpo-31406: Fix crash due to lack of type checking in subclassing. ↵Miss Islington (bot)2017-09-101-5/+14
| | | | | (GH-3477) (#3479) (cherry picked from commit 3cedf46cdbeefc019f4a672c1104f3d5e94712bd)
* [3.6] bpo-31400: Improve SSL error handling on Windows (GH-3463) (#3466)Christian Heimes2017-09-091-10/+47
| | | | | | * bpo-31392: Improve SSL error handling on Windows * Remove unnecessary Windows mention in NEWS. (cherry picked from commit e6eb48c10dc389d1d70657593de6a6cb3087d3d1)
* [3.6] bpo-31393: Fix the use of PyUnicode_READY(). (GH-3451). (#3453)Serhiy Storchaka2017-09-081-1/+4
| | | (cherry picked from commit e3b2b4b8d9e751b49e3550cb83ba39b54fdc377c)
* [3.6] bpo-29136: Add TLS 1.3 cipher suites and OP_NO_TLSv1_3 (GH-1363) (#3444)Christian Heimes2017-09-081-0/+13
| | | | | | | | | | | | | | | | * 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)
* [3.6] bpo-28958: Improve SSLContext error reporting. (GH-3414) (#3432)Christian Heimes2017-09-071-2/+1
| | | | Signed-off-by: Christian Heimes <christian@python.org> (cherry picked from commit 17c9ac9)
* [3.6] bpo-29781: Fix SSLObject.version before handshake (GH-3364) (#3381)Christian Heimes2017-09-061-0/+4
| | | | | | | 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)
* [3.6] _pickle: Fix whichmodule() (GH-3358) (#3361)Christian Heimes2017-09-061-1/+1
| | | | | | | _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 (#3315) (#3350)Victor Stinner2017-09-0519-57/+567
| | | | | | | | | | * 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)
* [3.6] bpo-29334: Fix ssl.getpeercert for auto-handshake (GH-1769) (#1778)Christian Heimes2017-09-051-21/+12
| | | | | | | | | | | | | 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)
* [3.6] bpo-30502: Fix handling of long oids in ssl. (GH-2909) (#3321)Christian Heimes2017-09-051-43/+47
| | | (cherry picked from commit e503ca52889bf66ac502702569e726caa7970299)
* [3.6] bpo-30102: Call OPENSSL_add_all_algorithms_noconf (GH-3112) (#3342)Christian Heimes2017-09-052-2/+9
| | | | | | | | | 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)
* [3.6] bpo-31343: Include sys/sysmacros.h (GH-3318) (#3344)Christian Heimes2017-09-051-0/+5
| | | | | | | 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)
* [3.6] bpo-30622: Change NPN detection: (GH-2079) (#3314)Christian Heimes2017-09-052-10/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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)
* [3.6] Add missing _sha3 module to Setup.dist (GH-2395) (#3280)Segev Finer2017-09-041-0/+1
| | | (cherry picked from commit 1c1f8f30c03ca119528)
* bpo-31095: fix potential crash during GC (GH-3195)INADA Naoki2017-09-047-4/+24
| | | (cherry picked from commit a6296d34a478b4f697ea9db798146195075d496c)
* [3.6] bpo-9146: Raise a ValueError if OpenSSL fails to init a hash func (#3274)Gregory P. Smith2017-09-031-9/+36
| | | | | | | | | | * [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.
* bpo-31185: Fixed miscellaneous errors in asyncio speedup module. (#3076) (#3269)Serhiy Storchaka2017-09-032-217/+217
| | | (cherry picked from commit bca4939d806170c3ca5d05f23710d11a8f1669cf)
* bpo-30581: Windows: os.cpu_count() returns wrong number of processors ↵Christopher Wilcox2017-09-011-3/+16
| | | | | | | | | (#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
* [3.6] bpo-31291: Fixed an assertion failure in ↵Oren Milman2017-08-301-1/+2
| | | | | | zipimport.zipimporter.get_data() (GH-3226) (#3243) if pathname.replace('/', '\\') returns non-string. (cherry picked from commit 631fdee6e61b4ba8ce800f827fecdd536bfb04f3)
* [3.6] bpo-10746: Fix ctypes PEP 3118 type codes for c_long, c_bool, c_int ↵Pauli Virtanen2017-08-301-2/+67
| | | | | | | | | | | | | | | | | | (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)
* [3.6] bpo-31243: Fixed PyArg_ParseTuple failure checks. (GH-3171) (#3233)Oren Milman2017-08-292-21/+43
| | | (cherry picked from commit ba7d7365215d791025d1efd25393c91404f2cfc8)
* [3.6] bpo-31271: Fix an assertion failure in io.TextIOWrapper.write. ↵Oren Milman2017-08-261-0/+7
| | | | | (GH-3201) (#3209) (cherry picked from commit a5b4ea15b61e3f3985f4f0748a18f8b888a63532)
* [3.6] bpo-28261: Prevent raising SystemError where PyArg_ParseTuple is used ↵Oren Milman2017-08-262-2/+28
| | | | to parse non-args. (#3210)
* bpo-28667: Fix a compile warning on FreeBSD when compare with FD_SETSIZE. ↵Victor Stinner2017-08-221-4/+4
| | | | | | | (#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 (#3106) (#3143)Victor Stinner2017-08-187-101/+719
| | | | | | | | | | | | | | | * 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)
* bpo-29619: Do not use HAVE_LARGEFILE_SUPPORT for type conversions (GH-1666) ↵Victor Stinner2017-08-171-18/+5
| | | | | | | (#3102) Use only the LongLong form for the conversions (cherry picked from commit 50e86033de85294d87b7e942701d456342abde8e)
* bpo-31173: Rewrite WSTOPSIG test of test_subprocess (#3055) (#3070)Victor Stinner2017-08-111-0/+21
| | | | | | | | | | | | | | 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)
* [3.6] bpo-30808: Use _Py_atomic API for concurrency-sensitive signal state ↵Antoine Pitrou2017-08-061-18/+20
| | | | | | | | | | | | | | | | (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)
* bpo-31061: fix crash in asyncio speedup module (GH-2984)INADA Naoki2017-08-021-0/+4
| | | (cherry picked from commit de34cbe9cdaaf7b85fed86f99c2fd071e1a7b1d2)
* [3.6] bpo-31018: Switch to GH-pragma pack from __declspec(align) (GH-2848) ↵Segev Finer2017-07-251-1/+4
| | | | | (#2868) (cherry picked from commit 39243779f4c97ec6f700fa73c007ca66dfa9408e)
* bpo-30961: Fix decrementing a borrowed reference in tracemalloc. (#2747) (#2748)Xiang Zhang2017-07-181-2/+1
| | | (cherry picked from commit 4ed5ad79ec6c6270e6018bd0a55656305ee60907)