summaryrefslogtreecommitdiffstats
path: root/Lib
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix implementation dependent assertion in test_plistlib. (#4813)Serhiy Storchaka2017-12-121-1/+2
| | | It is failed with an advanced optimizer.
* bpo-31942: Document optional support of start and stop attributes in ↵Nitish Chandra2017-12-121-0/+3
| | | | Sequence.index method (#4277)
* bpo-32255: Always quote a single empty field when write into a CSV file. (#4769)Licht Takeuchi2017-12-121-1/+20
| | | This allows to distinguish an empty row from a row consisting of a single empty field.
* Fix idlelib comment typos reported by Mike on pull request 4803. (#4807)Terry Jan Reedy2017-12-123-3/+3
|
* bpo-32227: functools.singledispatch supports registering via type ↵Łukasz Langa2017-12-112-1/+85
| | | | annotations (#4733)
* bpo-32258: Replace 'yield from' to 'await' in asyncio docs (#4779)Andrew Svetlov2017-12-113-10/+19
| | | | | | * Replace 'yield from' to 'await' in asyncio docs * Fix docstrings
* Add asyncio.get_running_loop() function. (#4782)Yury Selivanov2017-12-112-1/+19
|
* bpo-32273: Move asyncio.test_utils to test.test_asyncio (#4785)Yury Selivanov2017-12-1116-61/+28
|
* bpo-32272: Remove asyncio.async() function. (#4784)Yury Selivanov2017-12-111-21/+1
|
* bpo-22671: Clarify and test default read method implementations (#4568)Sanyam Khurana2017-12-111-2/+51
| | | Original patch written by Martin Panter, enhanced by Sanyam Khurana.
* bpo-32262: Fix f-string (#4787)Yury Selivanov2017-12-111-1/+1
|
* bpo-32262: Fix codestyle; use f-strings formatting where necessary. (#4775)Yury Selivanov2017-12-1024-348/+332
|
* Skip test_read_pty_output test on macOS for poll and select. (#4774)Yury Selivanov2017-12-101-3/+1
| | | Starting with 10.13.2 the test hangs forever.
* Removed doubled 'bpo-'. (#4777)Terry Jan Reedy2017-12-101-1/+1
|
* bpo-31506: Improve the error message logic for class instantiation (GH-4740)Sanyam Khurana2017-12-101-0/+49
| | | | | | | | | | | | The error messages in `object.__new__` and `object.__init__` now aim to point the user more directly at the name of the class being instantiated in cases where they *haven't* been overridden (on the assumption that the actual problem is a missing `__new__` or `__init__` definition in the class body). When they *have* been overridden, the errors still report themselves as coming from object, on the assumption that the problem is with the call up to the base class in the method implementation, rather than with the way the constructor is being called.
* closes bpo-31650: PEP 552 (Deterministic pycs) implementation (#4575)Benjamin Peterson2017-12-0913-99/+485
| | | | | | | | | | | | | | | | | | | | | | | | | Python now supports checking bytecode cache up-to-dateness with a hash of the source contents rather than volatile source metadata. See the PEP for details. While a fairly straightforward idea, quite a lot of code had to be modified due to the pervasiveness of pyc implementation details in the codebase. Changes in this commit include: - The core changes to importlib to understand how to read, validate, and regenerate hash-based pycs. - Support for generating hash-based pycs in py_compile and compileall. - Modifications to our siphash implementation to support passing a custom key. We then expose it to importlib through _imp. - Updates to all places in the interpreter, standard library, and tests that manually generate or parse pyc files to grok the new format. - Support in the interpreter command line code for long options like --check-hash-based-pycs. - Tests and documentation for all of the above.
* bpo-32253: Deprecate with statement and bare await for asyncio locks (GH-4764)Andrew Svetlov2017-12-093-13/+54
| | | | | * Add test for 'with (yield from lock)' * Deprecate with statement for asyncio locks * Document the deprecation
* bpo-32193: Convert asyncio to async/await usage (#4753)Andrew Svetlov2017-12-0821-770/+644
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Convert asyncio/tasks.py to async/await * Convert asyncio/queues.py to async/await * Convert asyncio/test_utils.py to async/await * Convert asyncio/base_subprocess.py to async/await * Convert asyncio/subprocess.py to async/await * Convert asyncio/streams.py to async/await * Fix comments * Convert asyncio/locks.py to async/await * Convert asyncio.sleep to async def * Add a comment * Add missing news * Convert stubs from AbstrctEventLoop to async functions * Convert subprocess_shell/subprocess_exec * Convert connect_read_pipe/connect_write_pip to async/await syntax * Convert create_datagram_endpoint * Convert create_unix_server/create_unix_connection * Get rid of old style coroutines in unix_events.py * Convert selector_events.py to async/await * Convert wait_closed and create_connection * Drop redundant line * Convert base_events.py * Code cleanup * Drop redundant comments * Fix indentation * Add explicit tests for compatibility between old and new coroutines * Convert windows event loop to use async/await * Fix double awaiting of async function * Convert asyncio/locks.py * Improve docstring * Convert tests to async/await * Convert more tests * Convert more tests * Convert more tests * Convert tests * Improve test
* bpo-22589 Changed MIME type of .bmp to "image/bmp" (#4756)Nitish Chandra2017-12-081-1/+1
| | | Per rfc7903 this is the standard MIME type for this file format, and appears as such in the IANA MIME registry.
* bpo-32208: update threading.Semaphore docs and add unit test (#4709)Garrett Berg2017-12-071-2/+4
| | | | | | | | | | * fix issue32208: update threading.Semaphore docs and add unit test to validate correct behavior * add test for blocking * Update threading.rst * semaphore: remove documentation validation tests and move 'return value' test to BaseSemaphore
* bpo-32199: The getnode() ip getter now uses 'ip link' instead of 'ip link ↵xdegaye2017-12-071-1/+1
| | | | list' (GH-4696)
* Fix hardcoded value in test_os.py (#4744)Pablo Galindo2017-12-071-1/+1
|
* Use raw strings for regex to avoid invalid escape sequences. (GH-4741)Eric V. Smith2017-12-061-2/+2
|
* Update NEWS and pydoc topics.Ned Deily2017-12-051-11/+10
|
* bpo-31380: Skip test_httpservers test_undecodable_file on macOS. (#4720)Ned Deily2017-12-051-1/+2
| | | The undecodable file name cannot be created on macOS APFS file systems.
* bpo-19610: Warn if distutils is provided something other than a list to some ↵Neil Schemenauer2017-12-052-36/+58
| | | | | | | | | | | | | | | fields (#4685) * Rather than raise TypeError, warn and call list() on the value. * Fix tests, revise NEWS and whatsnew text. * Revise documentation, a string is okay as well. * Ensure 'requires' and 'obsoletes' are real lists. * Test that requires and obsoletes are turned to lists.
* [bpo-28556] Minor fixes for typing module (#4710)Ivan Levkivskyi2017-12-052-10/+52
|
* bpo-30928: update idlelib/NEWS.txt. (#4706)Terry Jan Reedy2017-12-041-0/+7
|
* bpo-32214: Implement PEP 557: Data Classes (#4704)Eric V. Smith2017-12-042-0/+2852
|
* bpo-32207: Improve tk event exception tracebacks in IDLE. (#4703)Terry Jan Reedy2017-12-041-5/+9
| | | | | | | | When tk event handling is driven by IDLE's run loop, a confusing and distracting queue.EMPTY traceback context is no longer added to tk event exception tracebacks. The traceback is now the same as when event handling is driven by user code. Patch based on a suggestion by Serhiy Storchaka.
* bpo-30928: Update idlelib/NEWS.txt to 2017 Dec 3. (#4701)Terry Jan Reedy2017-12-041-0/+16
| | | Patches are in 3.7.0a3 even if this update is not.
* bpo-25054, bpo-1647489: Added support of splitting on zerowidth patterns. ↵Serhiy Storchaka2017-12-042-14/+32
| | | | | | (#4471) Also fixed searching patterns that could match an empty string.
* Fix a regression in uuid added in bpo-32107. (#4677)Serhiy Storchaka2017-12-042-2/+5
| | | | | uuid.get_node() always must return a stable result. Also added a test for non-reproducibility of _random_getnode(). Original patch by Xavier de Gaye.
* bpo-27240 Rewrite the email header folding algorithm. (#3488)R. David Murray2017-12-035-563/+508
| | | | | | | | | | | | | | | | | | | | | The original algorithm tried to delegate the folding to the tokens so that those tokens whose folding rules differed could specify the differences. However, this resulted in a lot of duplicated code because most of the rules were the same. The new algorithm moves all folding logic into a set of functions external to the token classes, but puts the information about which tokens can be folded in which ways on the tokens...with the exception of mime-parameters, which are a special case (which was not even implemented in the old folder). This algorithm can still probably be improved and hopefully simplified somewhat. Note that some of the test expectations are changed. I believe the changes are toward more desirable and consistent behavior: in general when (re) folding a line the canonical version of the tokens is generated, rather than preserving errors or extra whitespace.
* bpo-32137: The repr of deeply nested dict now raises a RecursionError (#4570)Serhiy Storchaka2017-12-033-3/+19
| | | | | instead of crashing due to a stack overflow. This perhaps will fix similar problems in other extension types.
* bpo-32176: Set CO_NOFREE in the code object constructor (GH-4675)Nick Coghlan2017-12-031-0/+45
| | | | | | | | Previously, CO_NOFREE was set in the compiler, which meant it could end up being set incorrectly when code objects were created directly. Setting it in the constructor based on freevars and cellvars ensures it is always accurate, regardless of how the code object is defined.
* Add a minimal unit test for Python/frozen.c. (#2995)Neil Schemenauer2017-12-021-0/+30
| | | | | | If the marshal or bytecode formats get changed, frozen.c needs to be updated as well. It can be easy to miss this step and not doing so can cause test_importlib to crash in mysterious ways. Add an explict unit test to make it easier to track down the problem.
* Fix asyncio.streams.FlowControlMixin docstring typo. (#4578)John Chen2017-12-011-1/+1
|
* bpo-28668: test.support.requires_multiprocessing_queue is removed (GH-4560)xdegaye2017-12-012-20/+7
| | | | Skip tests with test.support.import_module('multiprocessing.synchronize') instead when the semaphore implementation is broken or missing.
* bpo-10544: Deprecate "yield" in comprehensions and generator expressions. ↵Serhiy Storchaka2017-12-012-11/+36
| | | | | | | | | | | | | | (GH-4579) The current behaviour of yield expressions inside comprehensions and generator expressions is essentially an accident of implementation - it arises implicitly from the way the compiler handles yield expressions inside nested functions and generators. Since the current behaviour wasn't deliberately designed, and is inherently confusing, we're deprecating it, with no current plans to reintroduce it. Instead, our advice will be to use a named nested generator definition for cases where this behaviour is desired.
* bpo-32072: Fix issues with binary plists. (#4455)Serhiy Storchaka2017-11-302-36/+106
| | | | | | | * Fixed saving bytearrays. * Identical objects will be saved only once. * Equal references will be load as identical objects. * Added support for saving and loading recursive data structures.
* bpo-20891: Fix PyGILState_Ensure() (#4650)Victor Stinner2017-11-301-0/+10
| | | | | | | When PyGILState_Ensure() is called in a non-Python thread before PyEval_InitThreads(), only call PyEval_InitThreads() after calling PyThreadState_New() to fix a crash. Add an unit test in test_embed.
* bpo-28416: Break reference cycles in Pickler and Unpickler subclasses (#4080)Serhiy Storchaka2017-11-301-2/+63
| | | | with the persistent_id() and persistent_load() methods.
* Skip test_socket.test_sha256() on linux < 4.5 (#4643)Victor Stinner2017-11-301-0/+3
| | | bpo-31705.
* bpo-32101: Add PYTHONDEVMODE environment variable (#4624)Victor Stinner2017-11-303-9/+42
| | | | | | * bpo-32101: Add sys.flags.dev_mode flag Rename also the "Developer mode" to the "Development mode". * bpo-32101: Add PYTHONDEVMODE environment variable Mention it in the development chapiter.
* bpo-32121: Add most_recent_first parameter to tracemalloc.Traceback.format ↵Jesse-Bakker2017-11-294-18/+46
| | | | | | | | (#4534) * Add most_recent_first parameter to tracemalloc.Traceback.format to allow reversing the order of the frames in the output * Reversed default sorting of tracemalloc.Traceback frames * Allowed negative limit, truncating from the other side.
* bpo-32166: Drop Python 3.4 code from asyncio (#4612)Andrew Svetlov2017-11-293-131/+25
| | | | | | | | | | | | | | | | | | | | | | * Drop Python 3.4 code from asyncio * Fix notes * Add missing imports * Restore comment * Resort imports * Drop Python 3.4-3.5 specific code * Drop redunant check * Fix tests * Restore _COROUTINE_TYPES order * Remove useless code
* bpo-32030: Rework memory allocators (#4625)Victor Stinner2017-11-295-23/+96
| | | | | | | | | | | | | | | | | | | | * Fix _PyMem_SetupAllocators("debug"): always restore allocators to the defaults, rather than only caling _PyMem_SetupDebugHooks(). * Add _PyMem_SetDefaultAllocator() helper to set the "default" allocator. * Add _PyMem_GetAllocatorsName(): get the name of the allocators * main() now uses debug hooks on memory allocators if Py_DEBUG is defined, rather than calling directly malloc() * Document default memory allocators in C API documentation * _Py_InitializeCore() now fails with a fatal user error if PYTHONMALLOC value is an unknown memory allocator, instead of failing with a fatal internal error. * Add new tests on the PYTHONMALLOC environment variable * Add support.with_pymalloc() * Add the _testcapi.WITH_PYMALLOC constant and expose it as support.with_pymalloc(). * sysconfig.get_config_var('WITH_PYMALLOC') doesn't work on Windows, so replace it with support.with_pymalloc(). * pythoninfo: add _testcapi collector for pymem
* test_socket: socket.socketpair() is always available (#4634)Victor Stinner2017-11-291-2/+0
|
* bpo-32138: Skip on Android test_faulthandler tests that raise SIGSEGV (GH-4604)xdegaye2017-11-292-28/+16
| | | | Remove the test.support.requires_android_level decorator.