summaryrefslogtreecommitdiffstats
path: root/Lib
Commit message (Collapse)AuthorAgeFilesLines
* bpo-34271: Add ssl debugging helpers (GH-10031)Christian Heimes2019-05-312-2/+338
| | | | | | | | | | | The ssl module now can dump key material to a keylog file and trace TLS protocol messages with a tracing callback. The default and stdlib contexts also support SSLKEYLOGFILE env var. The msg_callback and related enums are private members. The feature is designed for internal debugging and not for end users. Signed-off-by: Christian Heimes <christian@python.org>
* bpo-26660, bpo-35144: Fix permission errors in TemporaryDirectory cleanup. ↵Serhiy Storchaka2019-05-313-14/+82
| | | | | | | (GH-10320) TemporaryDirectory.cleanup() failed when non-writeable or non-searchable files or directories were created inside a temporary directory.
* bpo-31829: Make protocol 0 pickles be loadable in text mode in Python 2. ↵Serhiy Storchaka2019-05-312-4/+18
| | | | | | (GH-11859) Escape ``\r``, ``\0`` and ``\x1a`` (end-of-file on Windows) in Unicode strings.
* IDLE - Capitalize search dialogs' 'Close' button label. (#13691)Terry Jan Reedy2019-05-312-2/+3
| | | | It seems to be the only widget label not capitalized.
* bpo-36548: Improve the repr of re flags. (GH-12715)Serhiy Storchaka2019-05-312-16/+44
|
* bpo-29262: Add get_origin() and get_args() introspection helpers to typing ↵Ivan Levkivskyi2019-05-302-0/+79
| | | | | | | | | | (GH-13685) This is an old feature request that appears from time to time. After a year of experimenting with various introspection capabilities in `typing_inspect` on PyPI, I propose to add these two most commonly used functions: `get_origin()` and `get_args()`. These are essentially thin public wrappers around private APIs: `__origin__` and `__args__`. As discussed in the issue and on the typing tracker, exposing some public helpers instead of `__origin__` and `__args__` directly will give us more flexibility if we will decide to update the internal representation, while still maintaining backwards compatibility. The implementation is very simple an is essentially a copy from `typing_inspect` with one exception: `ClassVar` was special-cased in `typing_inspect`, but I think this special-casing doesn't really help and only makes things more complicated.
* bpo-5028: Fix up rest of documentation for tokenize documenting line (GH-13686)Anthony Sottile2019-05-302-2/+2
| | | https://bugs.python.org/issue5028
* bpo-36953: Delay removal of ABCs from collections. (GH-13409)Matthias Bussonnier2019-05-301-2/+2
| | | | | | | Bump the removal to 3.9, indicate collections.abc available since 3.3, replace version-changed directive to deprecated-removed. https://bugs.python.org/issue36953
* bpo-36342: Fix test_multiprocessing in test_venv (GH-12513)xdegaye2019-05-301-1/+6
| | | | | | | when platform lacks a functioning sem_open implementation https://bugs.python.org/issue36342
* bpo-5028: fix doc bug for tokenize (GH-11683)Andrew Carr2019-05-302-2/+2
| | | https://bugs.python.org/issue5028
* bpo-36999: Add asyncio.Task.get_coro() (GH-13680)Alex Grönholm2019-05-302-0/+13
| | | https://bugs.python.org/issue36999
* bpo-37099: Silence DeprecationWarning in test_inspect (GH-13679)Xtreak2019-05-301-6/+9
| | | | | | Fix DeprecationWarning introduced in aee19f54f6fe45f6b3c906987941e5a8af4468e9 https://bugs.python.org/issue37099
* bpo-20602: Do not clear sys.flags and sys.float_info during shutdown (GH-8096)Zackery Spytz2019-05-301-0/+16
| | | There is no need to clear these immutable objects during shutdown.
* bpo-36974: inherit the vectorcall protocol (GH-13498)Jeroen Demeyer2019-05-301-1/+26
|
* bpo-37015: Ensure tasks created by _accept_connection2 due to AsyncMock are ↵Xtreak2019-05-301-6/+8
| | | | | | | | completed (GH-13661) From 3.8 async functions used with mock.patch return an `AsyncMock`. `_accept_connection2` is an async function where create_task is also mocked. Don't mock `create_task` so that tasks are created out of coroutine returned by `AsyncMock` and the tasks are completed. https://bugs.python.org/issue37015
* bpo-37098: Skip memfd_create test before Linux 3.17 (GH-13677)Christian Heimes2019-05-301-0/+1
|
* bpo-36610: shutil.copyfile(): use sendfile() on Linux only (GH-13675)Giampaolo Rodola2019-05-302-9/+9
| | | | ...and avoid using it on Solaris as it can raise EINVAL if offset is equal or bigger than the size of the file
* bpo-24564: shutil.copystat(): ignore EINVAL on os.setxattr() (GH-13369)Ying Wang2019-05-301-2/+3
|
* Don't crash if there exists an EGG-INFO directory on sys.path (#13667)Anthony Sottile2019-05-302-1/+10
| | | | | | | | * Don't crash if there exists an EGG-INFO directory on sys.path cross-port of https://gitlab.com/python-devs/importlib_metadata/merge_requests/72 * Also catch PermissionError for windows
* Regenerate topics file (GH-13642)Pablo Galindo2019-05-291-52/+66
|
* bpo-37007: Implement socket.if_nametoindex(), if_indextoname() and ↵Zackery Spytz2019-05-291-13/+11
| | | | if_nameindex() on Windows (GH-13522)
* bpo-36974: Fix GDB integration (GH-13665)Petr Viktorin2019-05-291-1/+1
| | | | | | | | | | | As it changes the way functions are called, the PEP 590 implementation skipped the functions that the GDB integration is looking for (by name) to find function calls. Looking for the new helper `cfunction_call_varargs` hopefully fixes the tests, and thus buildbots. The changed frame nuber in test_gdb is due to there being fewer C calls when calling a built-in method.
* bpo-26836: Add os.memfd_create() (#13567)Zackery Spytz2019-05-291-0/+16
| | | | | | | | | | | | | | | | | | | | * bpo-26836: Add os.memfd_create() * Use the glibc wrapper for memfd_create() Co-Authored-By: Christian Heimes <christian@python.org> * Fix deletions caused by autoreconf. * Use MFD_CLOEXEC as the default value for *flags*. * Add memset_s to configure.ac. * Revert memset_s changes. * Apply the requested changes. * Tweak the docs.
* bpo-22385: Support output separators in hex methods. (#13578)Gregory P. Smith2019-05-293-1/+73
| | | | | | | | | | | | | | | | | | * bpo-22385: Support output separators in hex methods. Also in binascii.hexlify aka b2a_hex. The underlying implementation behind all hex generation in CPython uses the same pystrhex.c implementation. This adds support to bytes, bytearray, and memoryview objects. The binascii module functions exist rather than being slated for deprecation because they return bytes rather than requiring an intermediate step through a str object. This change was inspired by MicroPython which supports sep in its binascii implementation (and does not yet support the .hex methods). https://bugs.python.org/issue22385
* bpo-36974: implement PEP 590 (GH-13185)Jeroen Demeyer2019-05-293-12/+59
| | | | | Co-authored-by: Jeroen Demeyer <J.Demeyer@UGent.be> Co-authored-by: Mark Shannon <mark@hotpy.org>
* bpo-36983: Fix typing.__all__ and add test for exported names (GH-13456)Anthony Sottile2019-05-292-0/+27
| | | https://bugs.python.org/issue36983
* bpo-36842: Fix reference leak in tests by running out-of-proc (GH-13556)Steve Dower2019-05-293-230/+323
|
* bpo-32972: Async test case (GH-13386)Andrew Svetlov2019-05-295-6/+372
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add explicit `asyncSetUp` and `asyncTearDown` methods. The rest is the same as for #13228 `AsyncTestCase` create a loop instance for every test for the sake of test isolation. Sometimes a loop shared between all tests can speed up tests execution time a lot but it requires control of closed resources after every test finish. Basically, it requires nested supervisors support that was discussed with @1st1 many times. Sorry, asyncio supervisors have no chance to land on Python 3.8. The PR intentionally does not provide API for changing the used event loop or getting the test loop: use `asyncio.set_event_loop_policy()` and `asyncio.get_event_loop()` instead. The PR adds four overridable methods to base `unittest.TestCase` class: ``` def _callSetUp(self): self.setUp() def _callTestMethod(self, method): method() def _callTearDown(self): self.tearDown() def _callCleanup(self, function, /, *args, **kwargs): function(*args, **kwargs) ``` It allows using asyncio facilities with minimal influence on the unittest code. The last but not least: the PR respects contextvars. The context variable installed by `asyncSetUp` is available on test, `tearDown` and a coroutine scheduled by `addCleanup`. https://bugs.python.org/issue32972
* bpo-22454: Add shlex.join() (the opposite of shlex.split()) (GH-7605)Bo Bayles2019-05-292-1/+26
|
* bpo-37070: Cleanup fstring debug handling (GH-13607)Eric V. Smith2019-05-291-0/+1
| | | | * Clean up some comments, fix potential memory leaks, clarify literal and expr_text.
* bpo-37075: Fix string concatenation in assert_has_awaits error message ↵Xtreak2019-05-292-7/+9
| | | | | | | | | | (GH-13616) * Fix the implicit string concatenation in `assert_has_awaits` error message. * Use "await" instead of "call" in `assert_awaited_with` error message. https://bugs.python.org/issue37075
* bpo-35246: fix support for path-like args in asyncio subprocess (GH-13628)依云2019-05-292-5/+11
| | | | | | | | | Drop isinstance checks from create_subprocess_exec function and let subprocess module do them. https://bugs.python.org/issue35246 https://bugs.python.org/issue35246
* bpo-37076: _thread.start_new_thread() calls _PyErr_WriteUnraisableMsg() ↵Victor Stinner2019-05-291-0/+18
| | | | | | | (GH-13617) _thread.start_new_thread() now logs uncaught exception raised by the function using sys.unraisablehook(), rather than sys.excepthook(), so the hook gets access to the function which raised the exception.
* bpo-37001: Makes symtable.symtable have parity with compile for input (#13483)Dino Viehland2019-05-281-0/+9
| | | | | | | * Makes symtable.symtable have parity for accepted datatypes for source code as compile() * Add NEWS blurb
* bpo-22102: Fixes zip files with disks set to 0 (GH-5985)Francisco Facioni2019-05-281-1/+1
|
* bpo-31961: Fix support of path-like executables in subprocess. (GH-5914)Serhiy Storchaka2019-05-282-3/+77
|
* bpo-22640: Add silent mode to py_compile.compile() (GH-12976)Joannah Nanjekye2019-05-282-9/+24
|
* bpo-33725: multiprocessing uses spawn by default on macOS (GH-13603)Victor Stinner2019-05-281-1/+6
| | | | On macOS, the multiprocessing module now uses the "spawn" start method by default.
* bpo-26423: Fix possible overflow in wrap_lenfunc() (GH-13606)Zackery Spytz2019-05-281-0/+4
| | | | Fix possible overflow in wrap_lenfunc() when sizeof(long) < sizeof(Py_ssize_t) (e.g., 64-bit Windows).
* bpo-32299: Return patched dict when using patch.dict as a context manager ↵Mario Corchero2019-05-282-0/+8
| | | | | | (GH-11062)
* bpo-36922: implement PEP-590 Py_TPFLAGS_METHOD_DESCRIPTOR (GH-13338)Jeroen Demeyer2019-05-281-0/+24
| | | Co-authored-by: Mark Shannon <mark@hotpy.org>
* bpo-35279: reduce default max_workers of ThreadPoolExecutor (GH-13618)Inada Naoki2019-05-282-5/+10
|
* bpo-29883: Asyncio proactor udp (GH-13440)Andrew Svetlov2019-05-284-25/+477
| | | | | | Follow-up for #1067 https://bugs.python.org/issue29883
* bpo-37058: PEP 544: Add Protocol to typing module (GH-13585)Ivan Levkivskyi2019-05-282-118/+955
| | | | | I tried to get rid of the `_ProtocolMeta`, but unfortunately it didn'y work. My idea to return a generic alias from `@runtime_checkable` made runtime protocols unpickleable. I am not sure what is worse (a custom metaclass or having some classes unpickleable), so I decided to stick with the status quo (since there were no complains so far). So essentially this is a copy of the implementation in `typing_extensions` with two modifications: * Rename `@runtime` to `@runtime_checkable` (plus corresponding updates). * Allow protocols that extend `collections.abc.Iterable` etc.
* bpo-36933: Remove sys.set_coroutine_wrapper (marked for removal in 3.8) ↵Matthias Bussonnier2019-05-281-93/+0
| | | | | | | | | | (GH-13577) It has been documented as deprecated and to be removed in 3.8; From a comment on another thread – which I can't find ; leave get_coro_wrapper() for now, but always return `None`. https://bugs.python.org/issue36933
* bpo-36996: Handle async functions when mock.patch is used as a decorator ↵Xtreak2019-05-282-27/+73
| | | | | | | | | | (GH-13562) Return a coroutine while patching async functions with a decorator. Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com> https://bugs.python.org/issue36996
* bpo-36686: Improve the documentation of the std* params in ↵sbstp2019-05-272-1/+108
| | | | | loop.subprocess_exec (GH-13586) https://bugs.python.org/issue36686
* bpo-37054, _pyio: Fix BytesIO and TextIOWrapper __del__() (GH-13601)Victor Stinner2019-05-271-1/+10
| | | | | Fix destructor _pyio.BytesIO and _pyio.TextIOWrapper: initialize their _buffer attribute as soon as possible (in the class body), because it's used by __del__() which calls close().
* bpo-37039: IDLE - zoomheight fixes (GH-13576)Terry Jan Reedy2019-05-272-25/+13
| | | | | Move doc entry to match menu and refactor zoom function. A followup patch will include a blurb.
* bpo-1230540: Add threading.excepthook() (GH-13515)Victor Stinner2019-05-272-52/+195
| | | | | | | | | | | | | | | | | | | Add a new threading.excepthook() function which handles uncaught Thread.run() exception. It can be overridden to control how uncaught exceptions are handled. threading.ExceptHookArgs is not documented on purpose: it should not be used directly. * threading.excepthook() and threading.ExceptHookArgs. * Add _PyErr_Display(): similar to PyErr_Display(), but accept a 'file' parameter. * Add _thread._excepthook(): C implementation of the exception hook calling _PyErr_Display(). * Add _thread._ExceptHookArgs: structseq type. * Add threading._invoke_excepthook_wrapper() which handles the gory details to ensure that everything remains alive during Python shutdown. * Add unit tests.