summaryrefslogtreecommitdiffstats
path: root/Modules
Commit message (Collapse)AuthorAgeFilesLines
* bpo-31170: Update libexpat from 2.2.3 to 2.2.4 (#3315)Victor Stinner2017-09-0619-58/+581
| | | | | | | | | | | | | | | | Fix copying of partial characters for UTF-8 input (libexpat bug 115): https://github.com/libexpat/libexpat/issues/115 (cherry picked from commit 759e30ec47048cb9835c62aaeac48748c8151390) The standard header stdbool.h is not available with old Visual Studio compilers Cherry-picked from libexpat b4b89c2ab0cc5325a41360c25ef9d2ccbe617e5c. expat: Add artificial scopes in xmltok.c utf8_toUtf8() to fix c89 compilation. Cherry-picked from libexpat commit e0b290eb3d8f4c4b45137a7d7f4f8db812145bd2
* bpo-30947: Update libexpat from 2.2.1 to 2.2.3 (#3106) (#3145)Victor Stinner2017-08-187-102/+709
| | | | | | | | | | | | | | | | | | * 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 Python 2.7 backport: add expat/loadlibrary.c to PC/VS9.0/ project files (_elementtree and pyexpat). (cherry picked from commit 93d0cb58b4da2a88c56f472c6c19491cc7a390df)
* bpo-31173: Rewrite WSTOPSIG test of test_subprocess (#3055) (#3071)Victor Stinner2017-08-111-0/+22
| | | | | | | | | | | | | | 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)
* [2.7] bpo-30797: Avoid _GNU_SOURCE redefined warning in xmlparse.c (GH-2670) ↵Segev Finer2017-07-111-1/+1
| | | | | | | | | | (#2672) * [2.7] Avoid _GNU_SOURCE redefined warning in xmlparse.c (GH-2670) (cherry picked from commit f52325598e7a9683787d76a42009fc16790a0089) * [2.7] Avoid _GNU_SOURCE redefined warning in xmlparse.c (GH-2670). (cherry picked from commit f52325598e7a9683787d76a42009fc16790a0089)
* [2.7] bpo-29854: Fix segfault in call_readline() (GH-728)Nir Soffer2017-07-101-4/+6
| | | | | | | | | | | | | | | If history-length is set in .inputrc, and the history file is double the history size (or more), history_get(N) returns NULL, and python segfaults. Fix that by checking for NULL return value. It seems that the root cause is incorrect handling of bigger history in readline, but Python should not segfault even if readline returns unexpected value. This issue affects only GNU readline. When using libedit emulation system history size option does not work. This is a backport of the actual fix from master without the test, since the test depends on new run_pty() helper which is not available in 2.7.
* [2.7] bpo-30807: signal.setitimer() may disable the timer by mistake ↵Antoine Pitrou2017-06-301-0/+4
| | | | | | | | (GH-2493) (#2499) * bpo-30807: signal.setitimer() may disable the timer by mistake * Add NEWS blurb. (cherry picked from commit 729780a810bbcb12b245a1b652302a601fc9f6fd)
* bpo-30764: Windows support.SuppressCrashReport (#2423)Victor Stinner2017-06-271-0/+51
| | | | | | * Add Windows support to test.support.SuppressCrashReport: call SetErrorMode() and CrtSetReportMode(). * _testcapi: add CrtSetReportMode() and CrtSetReportFile() functions and CRT_xxx and CRTDBG_xxx constants needed by SuppressCrashReport.
* [2.7] bpo-30746: Prohibited the '=' character in environment variable names ↵Serhiy Storchaka2017-06-251-0/+19
| | | | | | | (GH-2382) (#2393) in `os.putenv()` and `os.spawn*()`.. (cherry picked from commit 77703942c5997dff00c48f10df1b29b11645624c)
* [2.7] bpo-30730: Prevent environment variables injection in subprocess on ↵Serhiy Storchaka2017-06-241-0/+6
| | | | | | Windows. (GH-2325) (#2372) Prevent passing other invalid environment variables and command arguments.. (cherry picked from commit d174d24a5d37d1516b885dc7c82f71ecd5930700)
* [2.7] bpo-30694: Upgrade Modules/expat/ to libexpat 2.2.1 (#2300) (#2312)Victor Stinner2017-06-218-158/+889
| | | | | | | | | | | * bpo-30694: Upgrade Modules/expat/ to libexpat 2.2.1 (#2300) New file: Modules/expat/siphash.h. (cherry picked from commit 5ff7132313eb651107b179d20218dfe5d4e47f13) * siphash.h: Address lack of stdint.h for Visual Studio 2003-2008 (cherry picked from libexpat commit c74d380b8f0b5215153d840d2af9455d9c53b960)
* bpo-29591: Upgrade Modules/expat to libexpat 2.2 (#2164) (#2202)Victor Stinner2017-06-1513-477/+523
| | | | | | | | | | | | | | | | | | | | | | * bpo-29591: Upgrade Modules/expat to libexpat 2.2 * bpo-29591: Restore Python changes on expat * bpo-29591: Remove expat config of unsupported platforms Remove the configuration (Modules/expat/*config.h) of unsupported platforms: * Amiga * MacOS Classic on PPC32 * Open Watcom * bpo-29591: Remove useless XML_HAS_SET_HASH_SALT The XML_HAS_SET_HASH_SALT define of Modules/expat/expat.h became useless since our local expat copy was upgrade to expat 2.1 (it's now expat 2.2.0). (cherry picked from commit 23ec4b57e1359f9c539b8defc317542173ae087e)
* _tkinter: Fix refleak in getint() (#2153)Victor Stinner2017-06-131-2/+6
| | | | PyNumber_Int() creates a new reference: need to decrement result reference counter.
* bpo-30615: Fix the leak reference in Modules/_elementtree.c (#2129)Stéphane Wirtel2017-06-121-1/+3
|
* [2.7] bpo-28994: Fixed errors handling in atexit._run_exitfuncs(). (GH-2034) ↵Serhiy Storchaka2017-06-121-0/+346
| | | | | | (#2123) The traceback no longer displayed for SystemExit raised in a callback registered by atexit.. (cherry picked from commit 3fd54d4a7e604067e2bc0f8cfd58bdbdc09fa7f4)
* bpo-30614: testInitNonExistentFile() of test_bz2 leaks references (#2033)Stéphane Wirtel2017-06-101-25/+39
| | | | | | | | | | | | | | | | | | | | | * bpo-30614: testInitNonExistentFile() of test_bz2 leaks references Extract the code of BZ2File_dealloc and create a new BZ2File_clear() function. Call BZ2File_clear() in BZ2File_dealloc(). Define BZ2File_clear() as tp_clear. Move the lock initialization before the "self->file = PyObject_CallFunction" in BZ2File_init() and check the lock is not created twice. Call BZ2File_clear() in BZ2File_init() after the init of the lock Co-Authored-By: Victor Stinner <victor.stinner@gmail.com> * Create bz2module.c Fix after the review of Victor Stinner
* [2.7] bpo-29960 _random.Random corrupted on exception in setstate(). … (#1289)Mariatta2017-05-271-1/+4
| | | (cherry picked from commit 9616a82e7802241a4b74cf7ae38d43c37bf66e48)
* bpo-30003: Fix handling escape characters in HZ codec (#1720) (#1556)Xiang Zhang2017-05-221-13/+14
|
* [2.7] bpo-30363: Backport warnings in the re module. (#1577)Serhiy Storchaka2017-05-181-0/+14
| | | | | | Running Python with the -3 option now warns about regular expression syntax that is invalid or has different semantic in Python 3 or will change the behavior in future Python versions.
* bpo-30365: Backport warnings and fix bugs in ElementTree. (#1581)Serhiy Storchaka2017-05-171-7/+36
| | | | | | | | | | | | | | | | | | Running Python with the -3 option now emits deprecation warnings for getchildren() and getiterator() methods of the Element class in the xml.etree.cElementTree module and when pass the html argument to xml.etree.ElementTree.XMLParser(). Fixed a deprecation warning about the doctype() method of the xml.etree.ElementTree.XMLParser class. Now it is emitted only when define the doctype() method in the subclass of XMLParser. Fixed a bug in the test_bug_200708_close test method. An EchoTarget instance was incorrectly passed to XMLParser() as the html argument and silently ignored. Tests no longer failed when use the -m option for running only selected test methods. Checking warnings now is more specific, warnings are expected only when use deprecated features.
* bpo-30242: resolve some undefined behaviours in struct (#1418) (#1588)Xiang Zhang2017-05-151-5/+9
|
* bpo-11681: Document the `-b` and `-bb` options (GH-1562)Zachary Ware2017-05-131-0/+2
|
* [2.7] bpo-30283: Backport test_regrtest from master to 2.7 (#1513)Victor Stinner2017-05-091-0/+20
| | | | | | | | | | * bpo-30283: regrtest: add --testdir option * bpo-30283: Backport _testcapi.raise_signal() Function used by test_regrtest to simulate an interrupted unit test. * bpo-30283: Backport test_regrtest from master
* bpo-29990: Fix range checking in GB18030 decoder (#1509)Xiang Zhang2017-05-091-1/+3
|
* [2.7] bpo-30243: Fixed the possibility of a crash in _json. (GH-1420) (#1471)Serhiy Storchaka2017-05-051-65/+18
| | | | | | It was possible to get a core dump by using uninitialized _json objects. Now __new__ methods create initialized objects. __init__ methods are removed.. (cherry picked from commit 76a3e51a403bc84ed536921866c86dd7d07aaa7e)
* bpo-30257: _bsddb: Fix newDBObject() (#1428)Victor Stinner2017-05-031-2/+4
| | | | | | Don't set cursorSetReturnsNone to DEFAULT_CURSOR_SET_RETURNS_NONE anymore if self->myenvobj is set. Fix a GCC warning on the strange indentation.
* bpo-27593: Get SCM build info from git instead of hg (#1327)Victor Stinner2017-05-021-41/+23
| | | | | | | | | | | Based on commit 5c4b0d063aba0a68c325073f5f312a2c9f40d178 by Ned Deily, which is based on original patches by Brett Cannon and Steve Dower. Remove also the private _Py_svnversion() function and SVNVERSION variable. Note: Py_SubversionRevision() and Py_SubversionShortBranch() are unchanged, they are part of the public API.
* [2.7] [3.5] bpo-30070: Fixed leaks and crashes in errors handling in the ↵Serhiy Storchaka2017-04-191-32/+73
| | | | | | parser module. (GH-1131). (GH-1185) (#1189) (cherry picked from commit a79f4c219531c05fc8f670c1e4bbf12c081935d3). (cherry picked from commit 952a05e4e2cf082b74a1676a2804f1f43a9b7702)
* [2.7] bpo-30061: Check if PyObject_Size()/PySequence_Size()/PyMapping_Size() ↵Serhiy Storchaka2017-04-193-5/+16
| | | | | | | | | (GH-1096) (GH-1180) (#1183) raised an error. (cherry picked from commit bf623ae8843dc30b28c574bec8d29fc14be59d86) (cherry picked from commit 680fea4)
* bpo-30074: Fix compile warnings of _PySlice_Unpack and convert missed (#1154)Serhiy Storchaka2017-04-154-10/+9
| | | | PySlice_GetIndicesEx in _ctypes.c.
* bpo-30068: add missing iter(self) in _io._IOBase.readlines when hint is ↵Xiang Zhang2017-04-151-12/+21
| | | | | | present (#1152)
* [2.7] bpo-29738: Fix memory leak in _get_crl_dp (GH-526) (GH-1144)Mariatta2017-04-151-7/+1
| | | | | | | | | * Remove conditional on free of `dps`, since `dps` is now allocated for all versions of OpenSSL * Remove call to `x509_check_ca` since it was only used to cache the `crldp` field of the certificate CRL_DIST_POINTS_free is available in all supported versions of OpenSSL (recent 0.9.8+) and LibreSSL. (cherry picked from commit 2849cc34a8db93d448a62d69c462402347b50dcb)
* bpo-27867: Expand the PySlice_GetIndicesEx macro. (#1023) (#1046)Serhiy Storchaka2017-04-084-19/+18
| | | | (cherry picked from commit b879fe8)
* bpo-27863: Fixed multiple crashes in ElementTree. (#765) (#903) (#963)Serhiy Storchaka2017-04-021-41/+51
| | | | | (cherry picked from commit 576def096ec7b64814e038f03290031f172886c3) (cherry picked from commit a6b4e1902250d6f28ca6d083ce1c8d7e9b91974b)
* bpo-29942: Fix the use of recursion in itertools.chain.from_iterable. (#913)T. Wouters2017-03-301-24/+28
| | | | | | Fix the use of recursion in itertools.chain.from_iterable. Using recursion is unnecessary, and can easily cause stack overflows, especially when building in low optimization modes or with Py_DEBUG enabled. (cherry picked from commit 5466d4af5fe76ec0a5fbc8a05675287d9e8e9d14)
* bpo-29876: fix DECREF for NULL value in subelement() (GH-760)Xiang Zhang2017-03-221-1/+2
|
* bpo-29874: fix INCREF for possible NULL values in select_select() (GH-758)Xiang Zhang2017-03-221-4/+4
|
* bpo-29873: fix INCREF for possible NULL value in element_getattr() (GH-757)Xiang Zhang2017-03-221-1/+1
|
* bpo-27880: Fixed integer overflow in cPickle when pickle large strings or (#662)Serhiy Storchaka2017-03-141-10/+26
| | | too many objects.
* [2.7] bpo-29768: Fixed compile-time check for expat version. (#577)Serhiy Storchaka2017-03-091-1/+1
| | | | (cherry picked from commit 22e707fa04476710ba5cc7e2206e4ac66743931b)
* Issue #29682:Possible missing NULL check in pyexpat (#573)svelankar2017-03-091-6/+7
|
* bpo-29697: Don't use OpenSSL <1.0.2 fallback on 1.1+ (GH-399)Donald Stufft2017-03-021-2/+2
|
* Update URL of Mersenne Twister Home Page (GH-116)INADA Naoki2017-02-151-3/+3
|
* update zlib ChangeLog filedoko@ubuntu.com2017-01-311-0/+4
|
* - Issue #29169: Update zlib to 1.2.11.doko@ubuntu.com2017-01-3110-27/+33
|
* revert dd13098a5dc2 (#29006, #10513)Benjamin Peterson2017-01-161-1/+0
|
* generate spaces instead of tabs into config.cBenjamin Peterson2017-01-161-1/+1
|
* fix _testcapi to work when statically linked into pythonBenjamin Peterson2017-01-161-2/+2
|
* Fix spelling and markup in documentation and code commentMartin Panter2017-01-141-1/+1
| | | | | * Mark up ``--help`` to avoid generating an en dash * Use forward slash in Unix command line with a dollar sign ($) prompt
* Issue #29082: Fixed loading libraries in ctypes by unicode names on Windows.Serhiy Storchaka2017-01-121-1/+1
| | | | Original patch by Chi Hsuan Yen.
* merge headsBenjamin Peterson2017-01-1231-1177/+2105
|\