Commit Graph

99078 Commits

Author SHA1 Message Date
Michael Seifert 64c8f705c0 bpo-29951: Include function name for some error messages in `PyArg_ParseTuple*` (#916)
Also changed format specifier for function name from "%s" to "%.200s"
and exception messages should start with lowercase letter.
2017-04-09 10:47:12 +03:00
Senthil Kumaran a2a9ddd923 Remove invalid comment in urllib.request. (#1054) 2017-04-08 23:27:25 -07:00
Jelle Zijlstra 45d22c256b Improvements to typing documentation (#967)
Documents a few omitted classes and adds NamedTuple methods.
2017-04-08 19:09:14 +03:00
Serhiy Storchaka b785396ab4 bpo-29998: Pickling and copying ImportError now preserves name and path (#1010)
attributes.
2017-04-08 09:55:07 +03:00
Serhiy Storchaka b879fe82e7 Expand the PySlice_GetIndicesEx macro. (#1023) 2017-04-08 09:53:51 +03:00
Serhiy Storchaka 205e00c5cf bpo-29914: Fix default implementations of __reduce__ and __reduce_ex__(). (#843)
object.__reduce__() no longer takes arguments, object.__reduce_ex__() now
requires one argument.
2017-04-08 09:52:59 +03:00
Barry Warsaw dd9a0a14c8 Fix a minor typo. (#1032) 2017-04-07 14:18:14 -04:00
Serhiy Storchaka 150cd1916a bpo-29958: Minor improvements to zipfile and tarfile CLI. (#944) 2017-04-07 18:56:12 +03:00
Senthil Kumaran fd0cd07a5a Remove Invalid comment in test_urllib2.py (#1020) 2017-04-07 00:19:08 -07:00
Stuart Berg 93b4b47e3a bpo-28837: Fix lib2to3 handling of map/zip/filter calls when followed with a 'trailer', e.g. zip()[x] (#24) 2017-04-05 22:19:40 -07:00
Alex Jordan 01fa9ae546 Correct typo in configparser.rst (#1012) 2017-04-05 22:21:30 -04:00
Mark Dickinson a0ce375e10 bpo-29962: add math.remainder (#950)
* Implement math.remainder.

* Fix markup for arguments; use double spaces after period.

* Mark up function reference in what's new entry.

* Add comment explaining the calculation in the final branch.

* Fix out-of-order entry in whatsnew.

* Add comment explaining why it's good enough to compare m with c, in spite of possible rounding error.
2017-04-05 18:34:27 +01:00
Serhiy Storchaka a0157b5f11 Miscellaneous minor fixes of Misc/NEWS formatting. (#1002) 2017-04-05 12:07:22 +03:00
Serhiy Storchaka bae6881b42 Update Argument Clinic generated code for bpo-29878. (#1001) 2017-04-05 12:00:42 +03:00
Serhiy Storchaka 5affd23e6f bpo-29762: More use "raise from None". (#569)
This hides unwanted implementation details from tracebacks.
2017-04-05 09:37:24 +03:00
Lisa Roach 43ba8861e0 bpo-29549: Fixes docstring for str.index (#256)
* Updates B.index documentation.

* Updates str.index documentation, makes it Argument Clinic compatible.

* Removes ArgumentClinic code.

* Finishes string.index documentation.

* Updates string.rindex documentation.

* Documents B.rindex.
2017-04-04 22:36:22 -07:00
Senthil Kumaran 257b980b31 correct parse_qs and parse_qsl test case descriptions. (#968)
* correct parse_qs and parse_qsl test case descriptions.
2017-04-04 21:19:43 -07:00
Andrew Nester f78b119364 bpo-29649: Improve struct.pack_into() boundary error messages (#424) 2017-04-04 13:46:25 +03:00
Victor Stinner 5de85a1702 bpo-29972: Skip tests known to fail on AIX (#979)
* bpo-29972: Fix test_eintr on AIX

On AIX, sigtimedwait(0.2) sleeps 199.8 ms, whereas the test expects
200 ms or longer.

* bpo-29972: Skip some inet_pton() tests on AIX

Skip some inet_pton() tests of test_socket on AIX.

inet_pton() on AIX is less strict than on Linux and doesn't reject
some invalid IP addresses. The unit tests test more the libc than
Python itself.

* bpo-29972: Skip tests known to fail on AIX

* test_locale.test_strcoll_with_diacritic()
* test_locale.test_strxfrm_with_diacritic()
* test_strptime.test_week_of_year_and_day_of_week_calculation()
* test_tools.test_POT_Creation_Date()
2017-04-04 10:35:15 +02:00
csabella 02e1213800 bpo-29725: DOC: add text for arraysize in sqlite3.Cursor (#947)
* bpo-29725: DOC: add text for arraysize in sqlite3.Cursor
2017-04-03 22:16:14 -07:00
Jim Fasarakis-Hilliard cf1958af4c Remove obsolete declaration in tokenizer.h (#962) 2017-04-03 19:18:32 +03:00
Angus Hollands 8614b59910 Correct typo (#976) 2017-04-03 18:16:14 +02:00
Victor Stinner 9acc6a03f1 test_locale now ignores the DeprecationWarning (#977)
Don't fail anymore if test run with python3 -Werror.

Fix also deprecation message: add a space.
2017-04-03 18:09:55 +02:00
Mark Dickinson 734125938d Fix misleading documentation for math.exp. (#951) 2017-04-02 08:30:04 -07:00
cocoatomo e8c763128f bpo-19225: Add a table of warning names and missed exception names in C API doc (#881)
Move the `.. index` directive to more appropriate place.
2017-04-02 13:45:40 +03:00
Pierre Quentel 351adda54b bpo-29654 : Support If-Modified-Since HTTP header (browser cache) (#298)
Return 304 response if file was not modified.
2017-04-02 13:26:12 +03:00
Senthil Kumaran efbd4ea65d Minor spell fix and formatting fixes in urllib tests. (#959) 2017-04-01 23:47:35 -07:00
Michael Selik 11fa3c7cd1 bpo-29957: change LBYL key lookup to dict.setdefault (#938)
* change LBYL key lookup to dict.setdefault

The ``results`` was constructed as a defaultdict and we could simply
delete the check ``if key not in results``. However, I think it's safer
to use dict.setdefault as I'm not sure whether the caller expects a
regular dict or defaultdict.

* add name to the acknowledgements file

* use defaultdict to make the key-lookup cleaner
2017-04-01 23:02:31 -07:00
csabella 64c887ab3a bpo-26947: DOC: clarify wording on hashable in glossary (#948) 2017-04-01 19:50:47 -07:00
INADA Naoki e82cf8675b bpo-29949: Fix set memory usage regression (GH-943)
Revert "Minor factoring:  move redundant resize scaling logic into the resize function."

This reverts commit 4897300276.
2017-04-01 17:20:25 +09:00
Zachary Ware cd815edf01 Revert "bpo-29763: Use unittest cleanup in test_site (GH-841)" (GH-942)
This reverts commit b94d7fd4ef.
2017-04-01 01:29:31 -05:00
s-sanjay 7bd8d3e794 bpo-29931 fix __lt__ check in ipaddress.ip_interface for both v4 and v6. (#879)
the original logic was just comparing the network address
but this is wrong because if the network address is equal then
we need to compare the ip address for breaking the tie

add more ip_interface comparison tests
2017-04-01 09:09:53 +03:00
Senthil Kumaran 1f5425ff69 Add helpful explaination to test_password_manager tests. (#936)
Also uncomment and fix a path test.
2017-03-31 22:27:27 -07:00
Zachary Ware b94d7fd4ef bpo-29763: Use unittest cleanup in test_site (GH-841) 2017-04-01 00:18:23 -05:00
Brett Cannon 1e5766ff43 Link to the devguide's PR guidelines (GH-932) 2017-03-31 14:19:04 -07:00
Serhiy Storchaka 314d6fca36 bpo-29953: Fix memory leaks in the replace() method of datetime and time (#927)
objects when pass out of bound fold argument.
2017-03-31 22:48:16 +03:00
T. Wouters 06bb4873d6 Fix spurious MemoryError introduced by PR #886. (#930)
Fix MemoryError caused by moving around code in PR #886; nbytes was sometimes used unitinitalized (in non-debug builds, when use_calloc was false and elsize was 0).
2017-03-31 10:10:19 -07:00
T. Wouters a00c3fd12d bpo-29941: Assert fixes (#886)
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.
2017-03-31 09:14:41 -07:00
Benjamin Peterson 164d30eb1e suppress compiler warnings in _ctypes_test (#902)
Changed test code to suppress a compiler warning, while taking care to avoid the code being optimized out by the compiler.
2017-03-31 12:05:25 +01:00
cocoatomo cdcac039fb bpo-29952: Use usual terminology of dict (GH-917)
s/keys and elements/keys and values/
2017-03-31 14:48:49 +09:00
Senthil Kumaran ed3dd1c02a Remove catching OSError in ftphandler test. Only URLError is raised in urllib.request module. (#918) 2017-03-30 22:43:05 -07:00
Mariatta 33db068dac bpo-29928: Add f-string to the Glossary (GH-864) 2017-03-30 12:12:18 -07:00
Louie Lu 7a26464c64 bpo-29946: Fix "sqrtpi defined but not used" (#908) 2017-03-30 20:05:10 +03:00
T. Wouters 5466d4af5f bpo-29942: Fix the use of recursion in itertools.chain.from_iterable. (#889)
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.
2017-03-30 09:58:35 -07:00
Serhiy Storchaka 06e522521c bpo-10030: Sped up reading encrypted ZIP files by 2 times. (#550) 2017-03-30 19:09:08 +03:00
Serhiy Storchaka d4edfc9abf bpo-29935: Fixed error messages in the index() method of tuple, list and deque (#887)
when pass indices of wrong type.
2017-03-30 18:29:23 +03:00
Serhiy Storchaka 762ec97ea6 bpo-29204: Emit warnings for already deprecated ElementTree features. (#773)
Element.getiterator() and the html parameter of XMLParser() were
deprecated only in the documentation (since Python 3.2 and 3.4 correspondintly).
Now using them emits a deprecation warning.

* Don’t need check_warnings any more.
2017-03-30 18:12:06 +03:00
Victor Stinner 722a3af092 bpo-29887: Test normalization now fails if download fails (#905)
* test_normalization fails if download fails

bpo-29887. The test is still skipped if "-u urlfetch" option is not
passed to regrtest (python3 -m test -u urlfetch test_normalization).

* Fix ResourceWarning in test_normalization

bpo-29887: Fix ResourceWarning in test_normalization if tests are
interrupted by CTRL+c.
2017-03-30 17:06:53 +02:00
Serhiy Storchaka f15c4d374a bpo-20548: Use specific asserts in warnings and exceptions tests (#788) 2017-03-30 18:05:08 +03:00
s-sanjay 16f852345b bpo-29913: deprecate compare_networks() in documentation (GH-865) 2017-03-30 15:44:29 +08:00