Commit Graph

97720 Commits

Author SHA1 Message Date
Serhiy Storchaka 8e5b52a8da bpo-30017: Allowed calling the close() method of the zip entry writer object (#1041) (#1092)
multiple times.  Writing to closed zip entry writer object now always produce
a ValueError.
(cherry picked from commit 4c0d9ea995)
2017-04-16 12:04:45 +03:00
Xiang Zhang d5fa5f3ce7 bpo-30068: add missing iter(self) in _io._IOBase.readlines when hint is present (#1130) (#1150) 2017-04-15 13:25:15 +08:00
Michael Seifert 05bfbcd233 [3.6] bpo-30059: Include Py_Ellipsis in C API documentation (GH-1018) (GH-1149) 2017-04-14 19:03:41 -07:00
Mariatta 8e7201342d [3.6] bpo-29738: Fix memory leak in _get_crl_dp (GH-526) (GH-1142)
* 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:34:11 -07:00
Benjamin Peterson 2e30eb6a98 improve alignment autoconf test (#1129) (#1139)
Replace the deprecated AC_TRY_RUN with AC_RUN_IFELSE. Also, standardize the
variable name and allow for caching of the result.
2017-04-14 09:59:34 -07:00
Jack McCracken 7ac96ec60e Fix misplaced positional argument in OS X support library (#1137) 2017-04-14 17:44:34 +03:00
Antoine Pitrou 413a8913ae Relax test timing (bpo-29861) to avoid sporadic failures (#1120) (#1132)
(cherry picked from commit 685cdb9acc)
2017-04-14 13:37:46 +02:00
Mariatta cbc46afa59 [3.6] bpo-29694: race condition in pathlib mkdir with flags parents=True (GH-1089). (GH-1126)
(cherry picked from commit 22a594a004)
2017-04-13 19:26:16 -07:00
Mariatta 2cdf087d1f [3.6] bpo-29869: Allow underscores in numeric literals in lib2to3. (GH-1119) (GH-1122)
* Allow underscores in numeric literals in lib2to3.
* Stricter literal parsing for Python 3.6 in lib2to3.pgen2.tokenize.
* Add test case for underscores in literals in Python 3.
(cherry picked from commit a6e395dffa)
2017-04-13 16:54:49 -07:00
Mariatta c5c24cfaf9 [3.6] Fix a typo in Doc/library/functions.rst (GH-1117) (GH-1123)
Replace `For object's ... ` with `For objects ...`
(cherry picked from commit 873ef20d00)
2017-04-13 16:37:51 -07:00
Benjamin Peterson 04ac853945 convert from long long to PyLong loselessly (#1106) (#1121) 2017-04-13 14:11:48 -07:00
Serhiy Storchaka 9366332822 bpo-30021: Add examples for re.escape(). (#1048) (#1115)
And fix the parameter name.

(cherry picked from commit 8fc7bc2b76)
2017-04-13 19:41:19 +03:00
Berker Peksag 119d94ad37 bpo-29791: Clarify that flush is keyword-only argument (GH-1093)
Reported by Lucio Ricardo Montero Valenzuela.

(cherry picked from commit 61b9ac9371)
2017-04-13 16:17:01 +03:00
Mariatta 84c2d75489 Revert "bpo-29869: Allow underscores in numeric literals in lib2to3. (GH-752)" (GH-1109)
This reverts commit 97a40b7a5b.
The commit is supposed to go to the master branch first.
2017-04-13 04:03:16 -07:00
Nevada Sanchez 97a40b7a5b bpo-29869: Allow underscores in numeric literals in lib2to3. (GH-752) 2017-04-13 03:21:05 -07:00
Mariatta 9b409ff41c [3.6] bpo-29692: contextlib.contextmanager may incorrectly unchain RuntimeError (GH-949) (#1105)
contextlib._GeneratorContextManager.__exit__ includes a special case to deal with
PEP 479 RuntimeErrors created when `StopIteration` is thrown into the context
manager body.

Previously this check was too permissive, and undid one level of chaining on *all*
RuntimeError instances, not just those that wrapped a StopIteration instance.
(cherry picked from commit 00c75e9a45)
2017-04-13 02:50:21 -07:00
Mariatta bd1173f202 [3.6] Clarify exception handler scope in contextlib (GH-1103)
Moved explicit raise from inside try to try...else.
(cherry picked from commit 680e20beee)
2017-04-12 20:52:39 -07:00
Mariatta bc9025012f [3.6] Remove superfluous comment in urllib.error. (GH-1076) (GH-1101)
(cherry picked from commit 6fab78e902)
2017-04-12 20:45:54 -07:00
Xiang Zhang 14944c6230 bpo-26985: Add missing info of code object in inspect documentation (GH-1090) (GH-1099) 2017-04-13 11:14:17 +08:00
Mariatta f0c416799b [3.6] bpo-30047: Fix a typo in Doc/library/select.rst (GH-1086) (GH-1098)
(cherry picked from commit 3e0f1fc4e0)
2017-04-12 20:02:21 -07:00
Senthil Kumaran 03066a05f5 Remove OSError related comment in urllib.request. (#1072)
(cherry picked from commit 6dfcc81f6b)
2017-04-09 20:37:44 -07:00
Mariatta 28ddd3c905 [3.6] Improvements to typing documentation (GH-967) (GH-1053)
Documents a few omitted classes and adds NamedTuple methods.
(cherry picked from commit 45d22c256b)
2017-04-09 15:17:28 -07:00
Mariatta 577fc04a71 [3.6] bpo-29549: Fixes docstring for str.index (GH-256) (GH-1028)
(cherry picked from commit 43ba8861e0)
2017-04-09 15:17:06 -07:00
Mariatta 90eb7a9ff4 [3.6] Correct typo in configparser.rst (GH-1012) (GH-1025)
(cherry picked from commit 01fa9ae546)
2017-04-09 15:15:57 -07:00
Senthil Kumaran 854ca174a9 Remove invalid comment in urllib.request. (#1055)
(cherry picked from commit a2a9ddd923)
2017-04-09 10:15:06 -07:00
Nick Coghlan a524d63072 bpo-29506: Clarify deep copy note in copy module
The reference to administrative data was confusing to readers,
so this simplifies the note to explain that deep copying may copy
more then you intended, such as data that you expected to be
shared between copies.
(cherry picked from commit 19e0494256)
2017-04-09 20:57:04 +10:00
Nick Coghlan 4c116cb3b3 bpo-29798: Handle git worktree in patchcheck (#1058) (#1060)
The original attempted fix missed an `isdir()` call in
`get_base_branch()`.
(cherry picked from commit 2abfdf5a81)
2017-04-09 19:22:36 +10:00
Serhiy Storchaka af685f9050 bpo-29998: Pickling and copying ImportError now preserves name and path (#1010) (#1042)
attributes.
(cherry picked from commit b785396ab4)
2017-04-08 11:25:47 +03:00
Serhiy Storchaka c26b19d5c7 Expand the PySlice_GetIndicesEx macro. (#1023) (#1044)
(cherry picked from commit b879fe82e7)
2017-04-08 11:18:14 +03:00
Vinay Sajip d0d575a6db bpo-29939: suppress compiler warnings in _ctypes_test (#1038)
bpo-29939: Changed test code to suppress a compiler warning, while taking care to avoid the code being optimized out by the compiler.
(cherry picked from commit 164d30eb1e)
2017-04-07 23:23:08 +01:00
Barry Warsaw 616d3eb7ef Fix a minor typo. (#1032) (#1037)
(cherry picked from commit dd9a0a14c8)
2017-04-07 16:50:13 -04:00
Senthil Kumaran 19d61b265f Remove Invalid comment in test_urllib2.py. (#1022)
(cherry picked from commit fd0cd07a5a)
2017-04-07 00:56:59 -07:00
Senthil Kumaran ed278448da correct parse_qs and parse_qsl test case descriptions. (#968) (#997)
(cherry picked from commit 257b980b31)
2017-04-06 08:38:38 -07:00
Serhiy Storchaka ba980e8ef0 Miscellaneous minor fixes of Misc/NEWS formatting. (#1002) (#1003)
(cherry picked from commit a0157b5f11)
2017-04-05 13:18:18 +03:00
Mariatta ce92be1825 remove merge=union attribute for Misc/NEWS (GH-460) (GH-988)
(cherry picked from commit 060d2d776a)
2017-04-04 11:49:14 +02:00
Senthil Kumaran cb1e002c07 bpo-29725: DOC: add text for arraysize in sqlite3.Cursor (#947) (#985)
(cherry picked from commit 02e1213800)
2017-04-03 22:27:15 -07:00
cocoatomo d184c20e35 Keep the c-api exception doc up-to-date (#966)
cherry-pick'ed from ec1f5df..e3d6db3
2017-04-03 19:26:32 +03:00
Senthil Kumaran c4e557ed99 Minor spell fix and formatting fixes in urllib tests. (#959) (#961)
(cherry picked from commit efbd4ea65d)
2017-04-02 01:36:58 -07:00
T. Wouters 90e3518225 bpo-29941: Assert fixes (#886) (#955)
Make a non-Py_DEBUG, asserts-enabled build of CPython possible. This means
making sure helper functions are defined when NDEBUG is not defined, not
just when Py_DEBUG is defined.

Also fix a division-by-zero in obmalloc.c that went unnoticed because in
Py_DEBUG mode, elsize is never zero.

(cherry picked from commit a00c3fd12d and 06bb4873d6)
2017-04-01 20:20:05 -07:00
Senthil Kumaran a71a3ad54d bpo-26947: DOC: clarify wording on hashable in glossary (#948) (#957)
(cherry picked from commit 64c887ab3a)
2017-04-01 20:00:36 -07:00
Senthil Kumaran 4415b823a0 Add helpful explaination to test_password_manager tests. (#936) (#941)
Also uncomment and fix a path test.
(cherry picked from commit 1f5425ff69)
2017-04-01 19:57:04 -07:00
INADA Naoki efde51ad54 bpo-29949: Fix set memory usage regression (GH-945)
Revert "Minor factoring:  move redundant resize scaling logic into the resize function."

This reverts commit 4897300276.
(cherry picked from commit e82cf8675b)
2017-04-01 23:29:31 +09:00
Serhiy Storchaka 7d5d13d8d0 bpo-29953: Fix memory leaks in the replace() method of datetime and t… (#933)
objects when pass out of bound fold argument.
(cherry picked from commit 314d6fca36)
2017-03-31 23:23:49 +03:00
Mariatta 0a17e58446 bpo-28810: Update lnotab_notes.txt (GH-665) (GH-919)
(cherry picked from commit 9135275cba)
2017-03-31 02:12:18 -07:00
INADA Naoki 4c75fbb485 bpo-29952: Use usual terminology of dict (GH-922)
s/keys and elements/keys and values/
(cherry picked from commit cdcac039fb)
2017-03-31 15:43:10 +09:00
Senthil Kumaran 8d1f935945 Remove catching OSError in ftphandler test. Only URLError is raised in urllib.request module. (#918) (#920)
(cherry picked from commit ed3dd1c02a)
2017-03-30 23:15:51 -07:00
T. Wouters 599bb18103 bpo-29942: Fix the use of recursion in itertools.chain.from_iterable. (#911)
* bpo-29942: Fix the use of recursion in itertools.chain.from_iterable.

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:48:23 -07:00
Mariatta 7b5b1379ac bpo-29928: Add f-string to the Glossary (GH-864) (GH-914)
(cherry picked from commit 33db068dac)
2017-03-30 12:27:19 -07:00
Serhiy Storchaka bf4bb2e430 bpo-29935: Fixed error messages in the index() method of tuple, list and deque (#887) (#907)
when pass indices of wrong type.
(cherry picked from commit d4edfc9abf)
2017-03-30 19:46:59 +03:00
Serhiy Storchaka a6b4e19022 bpo-27863: Fixed multiple crashes in ElementTree. (#765) (#903)
(cherry picked from commit 576def096e)
2017-03-30 18:08:21 +03:00