Commit Graph

6241 Commits

Author SHA1 Message Date
Xiang Zhang 6e1b832a6c bpo-30003: Fix handling escape characters in HZ codec (#1720) (#1556) 2017-05-23 01:04:27 +08:00
Serhiy Storchaka 955b6760cf [2.7] bpo-30363: Backport warnings in the re module. (#1577)
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.
2017-05-18 12:34:40 +03:00
Serhiy Storchaka 09b52471f3 bpo-30365: Backport warnings and fix bugs in ElementTree. (#1581)
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.
2017-05-17 10:08:11 +03:00
Xiang Zhang 982a17e02d bpo-30242: resolve some undefined behaviours in struct (#1418) (#1588) 2017-05-15 13:17:54 +08:00
Zachary Ware f6c6d1e230 bpo-11681: Document the `-b` and `-bb` options (GH-1562) 2017-05-13 09:30:20 -05:00
Victor Stinner d2aff60719 [2.7] bpo-30283: Backport test_regrtest from master to 2.7 (#1513)
* 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
2017-05-09 13:57:20 +02:00
Xiang Zhang 4e7457b853 bpo-29990: Fix range checking in GB18030 decoder (#1509) 2017-05-09 12:18:56 +08:00
Serhiy Storchaka 5d7a18f3b6 [2.7] bpo-30243: Fixed the possibility of a crash in _json. (GH-1420) (#1471)
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 76a3e51a40)
2017-05-05 11:21:45 +03:00
Victor Stinner 2c27731901 bpo-30257: _bsddb: Fix newDBObject() (#1428)
Don't set cursorSetReturnsNone to DEFAULT_CURSOR_SET_RETURNS_NONE
anymore if self->myenvobj is set.

Fix a GCC warning on the strange indentation.
2017-05-03 18:04:18 +02:00
Victor Stinner 2c7085fd7b bpo-27593: Get SCM build info from git instead of hg (#1327)
Based on commit 5c4b0d063a 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.
2017-05-02 16:55:50 +02:00
Serhiy Storchaka 2a1bf0633c [2.7] [3.5] bpo-30070: Fixed leaks and crashes in errors handling in the parser module. (GH-1131). (GH-1185) (#1189)
(cherry picked from commit a79f4c2195).
(cherry picked from commit 952a05e4e2)
2017-04-20 00:48:57 +03:00
Serhiy Storchaka 64aa4df850 [2.7] bpo-30061: Check if PyObject_Size()/PySequence_Size()/PyMapping_Size() (GH-1096) (GH-1180) (#1183)
raised an error.

(cherry picked from commit bf623ae884)
(cherry picked from commit 680fea4)
2017-04-19 22:34:58 +03:00
Serhiy Storchaka 5e79321742 bpo-30074: Fix compile warnings of _PySlice_Unpack and convert missed (#1154)
PySlice_GetIndicesEx in _ctypes.c.
2017-04-15 20:11:12 +03:00
Xiang Zhang 5fbdfc36f3 bpo-30068: add missing iter(self) in _io._IOBase.readlines when hint is present (#1152) 2017-04-15 13:18:22 +08:00
Mariatta b2b00e039c [2.7] bpo-29738: Fix memory leak in _get_crl_dp (GH-526) (GH-1144)
* 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 2849cc34a8)
2017-04-14 18:24:22 -07:00
Serhiy Storchaka e41390aca5 bpo-27867: Expand the PySlice_GetIndicesEx macro. (#1023) (#1046)
(cherry picked from commit b879fe8)
2017-04-08 11:48:57 +03:00
Serhiy Storchaka 9c2c42c221 bpo-27863: Fixed multiple crashes in ElementTree. (#765) (#903) (#963)
(cherry picked from commit 576def096e)

(cherry picked from commit a6b4e19022)
2017-04-02 20:37:03 +03:00
T. Wouters d694a06206 bpo-29942: Fix the use of recursion in itertools.chain.from_iterable. (#913)
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 5466d4af5f)
2017-03-30 12:49:22 -07:00
Xiang Zhang 9c0408d9b6 bpo-29876: fix DECREF for NULL value in subelement() (GH-760) 2017-03-22 14:32:52 +08:00
Xiang Zhang e6a55dd839 bpo-29874: fix INCREF for possible NULL values in select_select() (GH-758) 2017-03-22 12:46:14 +08:00
Xiang Zhang 827c78326a bpo-29873: fix INCREF for possible NULL value in element_getattr() (GH-757) 2017-03-22 12:25:51 +08:00
Serhiy Storchaka 1aa1803b3d bpo-27880: Fixed integer overflow in cPickle when pickle large strings or (#662)
too many objects.
2017-03-14 07:29:33 +02:00
Serhiy Storchaka 0c2ed76fda [2.7] bpo-29768: Fixed compile-time check for expat version. (#577)
(cherry picked from commit 22e707fa04)
2017-03-09 10:52:50 +02:00
svelankar de1c7d5252 Issue #29682:Possible missing NULL check in pyexpat (#573) 2017-03-09 07:27:48 +02:00
Donald Stufft f1a696efd6 bpo-29697: Don't use OpenSSL <1.0.2 fallback on 1.1+ (GH-399) 2017-03-02 12:37:07 -05:00
INADA Naoki 0f48ecddfb Update URL of Mersenne Twister Home Page (GH-116) 2017-02-16 01:00:54 +09:00
doko@ubuntu.com dbbc9d37a9 update zlib ChangeLog file 2017-01-31 13:56:50 +01:00
doko@ubuntu.com 80b24a9354 - Issue #29169: Update zlib to 1.2.11. 2017-01-31 13:30:58 +01:00
Benjamin Peterson 9ce1564cd9 revert dd13098a5dc2 (#29006, #10513) 2017-01-16 00:07:27 -08:00
Benjamin Peterson ebcf338a69 generate spaces instead of tabs into config.c 2017-01-16 00:05:12 -08:00
Benjamin Peterson 888a29fedb fix _testcapi to work when statically linked into python 2017-01-15 23:57:56 -08:00
Martin Panter c7496ee6da Fix spelling and markup in documentation and code comment
* Mark up ``--help`` to avoid generating an en dash
* Use forward slash in Unix command line with a dollar sign ($) prompt
2017-01-14 08:51:49 +00:00
Serhiy Storchaka 99ba17f553 Issue #29082: Fixed loading libraries in ctypes by unicode names on Windows.
Original patch by Chi Hsuan Yen.
2017-01-12 17:00:32 +02:00
Benjamin Peterson c8a752eaff merge heads 2017-01-11 23:40:23 -08:00
Benjamin Peterson 0897a557f4 revert 030e100f048a (#29006, #10513) 2017-01-11 23:39:58 -08:00
doko@ubuntu.com 54dc428657 - Issue #29169: Update zlib to 1.2.10. 2017-01-05 17:26:35 +01:00
Steve Dower f85dbfc3d2 Issue #28768: Fix implicit declaration of function _setmode. Patch by Masayuki Yamamoto 2016-12-28 15:41:09 -08:00
Serhiy Storchaka f04790a4b7 Fixed possible reference leaks in the _json module. 2017-01-03 11:17:53 +02:00
Serhiy Storchaka 1451874e6b Backed out changeset 78bf34b6a713 2016-12-28 09:23:17 +02:00
Antoine Pitrou f939b3c0f7 Issue #28427: old keys should not remove new values from
WeakValueDictionary when collecting from another thread.
2016-12-27 15:08:27 +01:00
Serhiy Storchaka 994f04dbf5 Issue #28998: More APIs now support longs as well as ints. 2016-12-27 15:09:36 +02:00
Martin Panter 3698bd262f Issue #29004: Document binascii.crc_hqx() implements CRC-CCITT 2016-12-24 07:53:57 +00:00
Serhiy Storchaka 85add4783e Issue #28871: Fixed a crash when deallocate deep ElementTree.
Fixed running MiscTests in test_xml_etree_c.
2016-12-21 12:55:28 +02:00
Serhiy Storchaka 6560e22c66 Issue #28925: cPickle now correctly propagates errors when unpickle instances
of old-style classes.
2016-12-15 12:51:34 +02:00
Benjamin Peterson 9ea8fafd6a fix function name 2016-12-03 13:07:47 -08:00
Benjamin Peterson e95048e8bb also do not leak the mode string if creating the file fails 2016-12-03 13:05:40 -08:00
Benjamin Peterson d3035d5d3d do not leak the FILE * pointer in error cases of fdopen() 2016-12-03 13:03:18 -08:00
Benjamin Peterson 5726b6316b inline constant into its single use 2016-12-03 12:32:38 -08:00
Benjamin Peterson 26c985a8aa fix refleak in null-containing error case (#21147) 2016-12-03 12:01:32 -08:00
Benjamin Peterson d7324bcf29 when you enter repr, you must leave, too (#25455) 2016-12-03 11:30:04 -08:00