summaryrefslogtreecommitdiffstats
path: root/Lib
Commit message (Collapse)AuthorAgeFilesLines
...
* bpo-32591: fix abort in _PyErr_WarnUnawaitedCoroutine during shutdown (#5337)Nathaniel J. Smith2018-01-261-0/+22
| | | | | | | | | | | | | | | | | | When an unawaited coroutine is collected very late in shutdown -- like, during the final GC at the end of PyImport_Cleanup -- then it was triggering an interpreter abort, because we'd try to look up the "warnings" module and not only was it missing (we were prepared for that), but the entire module system was missing (which we were not prepared for). I've tried to fix this at the source, by making the utility function get_warnings_attr robust against this in general. Note that it already has the convention that it can return NULL without setting an error, which is how it signals that the attribute it was asked to fetch is missing, and that all callers already check for NULL returns. There's a similar check for being late in shutdown at the top of warn_explicit, which might be unnecessary after this fix, but I'm not sure so I'm going to leave it.
* String annotations [PEP 563] (#4390)Guido van Rossum2018-01-262-7/+176
| | | | | | | | * Document `from __future__ import annotations` * Provide plumbing and tests for `from __future__ import annotations` * Implement unparsing the AST back to string form This is required for PEP 563 and as such only implements a part of the unparsing process that covers expressions.
* bpo-18533: Avoid RecursionError from repr() of recursive dictview (#4823)bennorth2018-01-262-0/+29
| | | | | | | | | | | | | | | | | dictview_repr(): Use a Py_ReprEnter() / Py_ReprLeave() pair to check for recursion, and produce "..." if so. test_recursive_repr(): Check for the string rather than a RecursionError. (Test cannot be any tighter as contents are implementation-dependent.) test_deeply_nested_repr(): Add new test, replacing the original test_recursive_repr(). It checks that a RecursionError is raised in the case of a non-recursive but deeply nested structure. (Very similar to what test_repr_deep() in test/test_dict.py does for a normal dict.) OrderedDictTests: Add new test case, to test behavior on OrderedDict instances containing their own values() or items().
* bpo-32662: Try making test_asyncio.test_server more reliable (#5338)Yury Selivanov2018-01-261-1/+12
|
* bpo-29237: Create enum for pstats sorting options (GH-5103)mwidjaja2018-01-262-8/+80
|
* bpo-32596: Make lazy-load portable (GH-5316)INADA Naoki2018-01-261-4/+6
| | | | Global variables should not used as import target. Use temporary variable instead.
* bpo-32304: Fix distutils upload for sdists ending with \x0d (GH-5264)Bo Bayles2018-01-262-2/+26
| | | | Patch by Bo Bayles.
* bpo-32574: Fix leaks in asyncio.Queue.put() and .get() (#5208)José Melero Fernández2018-01-252-2/+60
|
* bpo-32662: Implement Server.start_serving() and Server.serve_forever() (#5312)Yury Selivanov2018-01-254-30/+249
| | | | | | | | | | | | | * bpo-32662: Implement Server.start_serving() and Server.serve_forever() New methods: * Server.start_serving(), * Server.serve_forever(), and * Server.is_serving(). Add 'start_serving' keyword parameter to loop.create_server() and loop.create_unix_server().
* bpo-29302: Implement contextlib.AsyncExitStack. (#4790)Ilya Kulakov2018-01-253-81/+409
|
* bpo-32667: Fix tests when $PATH contains a file (#5322)Victor Stinner2018-01-252-9/+8
| | | | | Some tests failed when the PATH environment variable contained a path to an existing file. Fix tests to ignore also NotADirectoryError, not only FileNotFoundError and PermissionError.
* bpo-32360: Remove OrderedDict usage from json.tool (GH-5315)INADA Naoki2018-01-251-6/+1
| | | `object_pairs_hook=OrderedDict` idiom is deprecated.
* bpo-32652: Defer pymain_set_global_config() call (#5303)Victor Stinner2018-01-251-0/+15
| | | | | | In Py_Main(), don't call pymain_set_global_config() early: only call it when the whole configuration has been read. Add an unit test to prevent future regression.
* bpo-32391: Implement StreamWriter.wait_closed() (#5281)Andrew Svetlov2018-01-242-10/+57
|
* bpo-10381: Add timezone to datetime C API (#5032)Paul Ganssle2018-01-241-0/+181
| | | | | | | | | | | | | | | | | | * Add timezone to datetime C API * Add documentation for timezone C API macros * Add dedicated tests for datetime type check macros * Remove superfluous C API test * Drop support for TimeZoneType in datetime C API * Expose UTC singleton to the datetime C API * Update datetime C-API documentation to include links * Add reference count information for timezone constructors
* bpo-29708: Setting SOURCE_DATE_EPOCH forces hash-based .pyc files (GH-5200)Bernhard M. Wiedemann2018-01-242-0/+14
| | | To support reproducible builds, the setting of of SOURCE_DATE_EPOCH triggers the py_compile module -- and by extension, compileall -- to forcibly compile with hash-based .pyc files. This eliminates the possibility of timestamp-based .pyc files which vary between builds.
* bpo-32248 - Implement `ResourceReader` and `get_resource_reader()` for ↵Barry Warsaw2018-01-241-67/+83
| | | | zipimport (#5248)
* bpo-32636: Fix two bugs in test_asyncio (#5302)Victor Stinner2018-01-242-1/+2
|
* bpo-32636: Fix @asyncio.coroutine debug mode bug exposed by gh-5250 (#5291)Nathaniel J. Smith2018-01-242-1/+19
|
* bpo-32410: Improve sock_sendfile tests (#5294)Andrew Svetlov2018-01-241-16/+19
| | | | | * Rename sock_sendfile test methods * Make sock_sendfile tests more stable
* bpo-32643: Drop support for a few private Task and Future APIs. (#5293)Yury Selivanov2018-01-244-47/+21
| | | | | | | | Specifically, it's not possible to subclass Task/Future classes and override the following methods: * Future._schedule_callbacks * Task._step * Task._wakeup
* bpo-32360: unittest.util: Use Counter instead of custom count function (GH-4994)Srinivas Reddy Thatiparthy (శ్రీనివాస్ రెడ్డి తాటిపర్తి)2018-01-241-9/+2
|
* bpo-32502: Discard 64-bit (and other invalid) hardware addresses (#5254)Bo Bayles2018-01-242-6/+36
|
* bpo-32618: Fix test_mutatingdecodehandler not testing test.mutating (#5269)Xiang Zhang2018-01-231-3/+2
| | | | | * bpo-32618: Fix test_mutatingdecodehandler not testing test.mutating It should test both test.replacing and test.mutating instead of test test.replacing twice.
* bpo-32633: Fix some warnings in test_asyncio.test_tasks (#5280)Nathaniel J. Smith2018-01-231-2/+8
|
* bpo-32436: Implement PEP 567 (#5027)Yury Selivanov2018-01-2313-59/+1241
|
* bpo-32593: Drop FreeBSD 9 and older support (#5232)Victor Stinner2018-01-2210-50/+5
| | | Drop support of FreeBSD 9 and older.
* bpo-31179: Make dict.copy() up to 5.5 times faster. (#3067)Yury Selivanov2018-01-221-2/+48
|
* bpo-31801: Enum: add _ignore_ as class option (#5237)Ethan Furman2018-01-222-1/+52
| | | | | | | | | | | | | | | | * bpo-31801: Enum: add _ignore_ as class option _ignore_ is a list, or white-space seperated str, of names that will not be candidates for members; these names, and _ignore_ itself, are removed from the final class. * bpo-31801: Enum: add documentation for _ignore_ * bpo-31801: Enum: remove trailing whitespace * bpo-31801: Enum: fix bulleted list format * bpo-31801: add version added for _ignore_
* urllib.request: Remove unused import (GH-5268)INADA Naoki2018-01-221-1/+0
|
* bpo-32314: Fix asyncio.run() to cancel runinng tasks on shutdown (#5262)Yury Selivanov2018-01-214-15/+122
|
* bpo-32591: Add native coroutine origin tracking (#5250)Nathaniel J. Smith2018-01-215-96/+176
| | | | | | * Add coro.cr_origin and sys.set_coroutine_origin_tracking_depth * Use coroutine origin information in the unawaited coroutine warning * Stop using set_coroutine_wrapper in asyncio debug mode * In BaseEventLoop.set_debug, enable debugging in the correct thread
* bpo-32503: Avoid creating too small frames in pickles. (#5127)Serhiy Storchaka2018-01-202-42/+52
|
* bpo-32602: Test ECDSA certs (#5247)Christian Heimes2018-01-2020-440/+1048
| | | | | | | | Add test certs and test for ECDSA cert and EC/RSA dual mode. I'm also adding certs for IDNA 2003/2008 tests and simplify some test data handling. Signed-off-by: Christian Heimes <christian@python.org>
* bpo-32226: PEP 560: improve typing module (#4906)Ivan Levkivskyi2018-01-205-1626/+757
| | | | This PR re-designs the internal typing API using the new PEP 560 features. However, there are only few minor changes in the public API.
* bpo-32028: Fix suggestions for indented print statements (GH-4688)Sanyam Khurana2018-01-201-0/+9
| | | | | | | The suggested replacement for print statements previously failed to account for leading whitespace and hence could end up including unwanted text in the proposed call to the print builtin. Patch by Sanyam Khurana.
* bpo-32596: Lazy import concurrent.futures.process and thread (GH-5241)INADA Naoki2018-01-201-2/+33
|
* bpo-32410: Make SendfileNotAvailableError exception public (#5243)Andrew Svetlov2018-01-195-24/+29
|
* bpo-32588: Move _findvs into its own module and add missing _queue module to ↵Steve Dower2018-01-182-7/+6
| | | | installer (#5227)
* bpo-32576: use queue.SimpleQueue in critical places (#5216)Antoine Pitrou2018-01-182-9/+12
| | | | Where a queue may be invoked from a weakref callback, we need to use the reentrant SimpleQueue.
* Use assertCountEqual instead of assertEqual. (#5223)Gregory P. Smith2018-01-171-3/+3
| | | | This test doesn't care about order, the underlying filesystem APIs do not guarantee directory listings on subsequent calls will be in the same order.
* pythoninfo: add time.time and datetime.datetime.now (#5214)Victor Stinner2018-01-171-1/+13
|
* bpo-32248: Fix test_importlib.test_open() (#5213)Victor Stinner2018-01-171-2/+2
| | | | Use the binary.file instead of utf-8.file to avoid issues with Unix newlines vs Windows newlines.
* bpo-32403: Faster date and datetime constructors (#4993)Paul Ganssle2018-01-161-0/+92
| | | | | | | | | | | | | | * Add tests for date subclass alternate constructors * Switch over alternate date constructors to fast path * Switch datetime constructors to fastpath, fix bpo-32404 * Add fast path for datetime in date subclass constructor * Set fold in constructor in datetime.combine * Add news entries.
* bpo-32410: Implement loop.sock_sendfile() (#4976)Andrew Svetlov2018-01-166-0/+578
|
* Skip test_readline.test_nonascii() on C locale (#5203)Victor Stinner2018-01-161-0/+8
| | | | | bpo-29240: On FreeBSD, if the LC_CTYPE locale is "C" or "POSIX", writing and reading non-ASCII bytes into/from a TTY works, but readline or ncurses ignores non-ASCII bytes on read.
* bpo-14976: Reentrant simple queue (#3346)Antoine Pitrou2018-01-152-8/+318
| | | | Add a queue.SimpleQueue class, an unbounded FIFO queue with a reentrant C implementation of put().
* Implement the get_resource_reader() API for file system imports (#5168)Barry Warsaw2018-01-155-10/+44
|
* Make asyncio tests run when there's no SSL module (#5196)Yury Selivanov2018-01-151-3/+0
|
* Add itertools recipe for directly finding the n-th combination (#5161)Raymond Hettinger2018-01-131-0/+33
|