Commit Graph

9634 Commits

Author SHA1 Message Date
Emmanuel Arias ed9f3562b6 bpo-37105: Add deprecated-remove information on stream doc (#13672)
* Add deprecated-remove information on stream doc

According to the code on streams.py the functions:
``open_connection()``, ``start_server()``, ``open_unix_connection()``,
``start_unix_server()`` are deprecated. I infor that on
documentation.
2019-05-31 23:48:57 +03:00
Cheryl Sabella a747c3a5ed
bpo-15115: Document deprecation of email.encoders in Python 3 (GH-5354) 2019-05-31 16:18:41 -04:00
Pablo Galindo aac4d0342c
bpo-26826: Expose copy_file_range in the os module (GH-7255) 2019-05-31 19:39:47 +01:00
Akshay Sharma 4612671df2 bpo-25735: math.factorial doc should mention integer return type (GH-6420) 2019-05-31 12:41:17 -04:00
Christian Heimes 8cbb5b6625
bpo-26835: Add file sealing constants to fcntl (GH-13694)
Co-authored-by: nanjekyejoannah <nanjekyejoannah@gmail.com>
2019-05-31 18:32:33 +02:00
Makdon ffed76b6fc bpo-37094: Add example for TestCase.skipTest in unittest doc (GH-13645)
Also includes other minor test skipping doc improvements.


https://bugs.python.org/issue37094
2019-05-31 09:19:11 -07:00
Christian Heimes c7f7069e77
bpo-34271: Add ssl debugging helpers (GH-10031)
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>
2019-05-31 11:44:05 +02:00
Ivan Levkivskyi 4c23aff065
bpo-29262: Add get_origin() and get_args() introspection helpers to typing (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.
2019-05-31 00:10:07 +01:00
Anthony Sottile 2a58b0636d bpo-5028: Fix up rest of documentation for tokenize documenting line (GH-13686)
https://bugs.python.org/issue5028
2019-05-30 15:06:32 -07:00
Matthias Bussonnier eea47e0939 bpo-36953: Delay removal of ABCs from collections. (GH-13409)
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
2019-05-30 14:45:48 -07:00
Andrew Carr 1e36f75d63 bpo-5028: fix doc bug for tokenize (GH-11683)
https://bugs.python.org/issue5028
2019-05-30 12:31:51 -07:00
Xtreak 1b69c09248 Fix audit event typo : urllib.request -> urllib.Request (GH-13550)
As per the PEP and the [audit event raised](13d4e6a4a0/Lib/urllib/request.py (L524)) in urllib.request this should be `urllib.Request`

cc: @zooba
2019-05-30 10:58:27 -07:00
Alex Grönholm 98ef92002e bpo-36999: Add asyncio.Task.get_coro() (GH-13680)
https://bugs.python.org/issue36999
2019-05-30 08:30:09 -07:00
Giampaolo Rodola 413d955f8e
bpo-36610: shutil.copyfile(): use sendfile() on Linux only (GH-13675)
...and avoid using it on Solaris as it can raise EINVAL if offset is equal or bigger than the size of the file
2019-05-30 14:05:41 +08:00
Zackery Spytz 8f96c9f8ed bpo-37007: Implement socket.if_nametoindex(), if_indextoname() and if_nameindex() on Windows (GH-13522) 2019-05-29 14:02:37 -07:00
Zackery Spytz 43fdbd2729 bpo-26836: Add os.memfd_create() (#13567)
* 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.
2019-05-29 21:57:03 +02:00
Gregory P. Smith 0c2f930564
bpo-22385: Support output separators in hex methods. (#13578)
* 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
2019-05-29 11:46:58 -07:00
Hrvoje Nikšić 34f4f5efea bpo-36794: Document that Lock.acquire is fair. (GH-13082)
https://bugs.python.org/issue36794
2019-05-29 10:08:17 -07:00
Bo Bayles ca80495592 bpo-22454: Add shlex.join() (the opposite of shlex.split()) (GH-7605) 2019-05-29 09:06:11 +01:00
Xtreak 0ae022c6a4 bpo-37075: Fix string concatenation in assert_has_awaits error message (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
2019-05-29 00:02:25 -07:00
Victor Stinner 8b09500345
bpo-37076: _thread.start_new_thread() calls _PyErr_WriteUnraisableMsg() (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.
2019-05-29 02:57:56 +02:00
Pablo Galindo b76302ddd0 bpo-36540: Documentation for PEP570 - Python positional only arguments (#13202)
* bpo-36540: Documentation for PEP570 - Python positional only arguments

* fixup! bpo-36540: Documentation for PEP570 - Python positional only arguments

* Update reference for compound statements

* Apply suggestions from Carol

Co-Authored-By: Carol Willing <carolcode@willingconsulting.com>

* Update Doc/tutorial/controlflow.rst

Co-Authored-By: Carol Willing <carolcode@willingconsulting.com>

* Add extra bullet point and minor edits
2019-05-28 16:45:32 -07:00
Serhiy Storchaka 9e3c452639
bpo-31961: Fix support of path-like executables in subprocess. (GH-5914) 2019-05-28 22:49:35 +03:00
karl ding 1b05aa2190 Fix typo in docs for socket.CAN_RAW_FD_FRAMES (GH-13635)
There is an extra "one" in the text description for the constant
socket.CAN_RAW_FD_FRAMES
2019-05-28 11:35:26 -07:00
Joannah Nanjekye 2e33ecd7c9 bpo-22640: Add silent mode to py_compile.compile() (GH-12976) 2019-05-28 19:29:04 +03:00
Victor Stinner 17a5588740
bpo-33725: multiprocessing uses spawn by default on macOS (GH-13603)
On macOS, the multiprocessing module now uses the "spawn" start
method by default.
2019-05-28 16:02:50 +02:00
Mario Corchero 04530812e9 bpo-32299: Return patched dict when using patch.dict as a context manager (GH-11062) 2019-05-28 08:53:30 -04:00
Inada Naoki 9a7e5b1b42
bpo-35279: reduce default max_workers of ThreadPoolExecutor (GH-13618) 2019-05-28 21:02:52 +09:00
Brad 293e9f86b8 Remove outdated time.monotonic reference (GH-13264)
Per ae58649, time.monotonic is always available, making the old note outdated.
2019-05-28 06:47:24 -04:00
Andrew Svetlov bafd4b5ac8 bpo-29883: Asyncio proactor udp (GH-13440)
Follow-up for #1067


https://bugs.python.org/issue29883
2019-05-28 02:52:15 -07:00
Julien Palard 9ee2c264c3
DOC: Unnecessary plural. (GH-13613) 2019-05-28 10:35:25 +02:00
Ivan Levkivskyi 74d7f76e2c
bpo-37058: PEP 544: Add Protocol to typing module (GH-13585)
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.
2019-05-28 08:40:15 +01:00
Matthias Bussonnier 3880f263d2 bpo-36933: Remove sys.set_coroutine_wrapper (marked for removal in 3.8) (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
2019-05-28 00:10:59 -07:00
sbstp f0d4c64019 bpo-36686: Improve the documentation of the std* params in loop.subprocess_exec (GH-13586)
https://bugs.python.org/issue36686
2019-05-27 16:51:19 -07:00
Terry Jan Reedy df9b032f47
bpo-37039: IDLE - zoomheight fixes (GH-13576)
Move doc entry to match menu and refactor zoom function.
A followup patch will include a blurb.
2019-05-27 19:16:46 -04:00
Victor Stinner cd590a7ced
bpo-1230540: Add threading.excepthook() (GH-13515)
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.
2019-05-28 00:39:52 +02:00
Zackery Spytz 02db696732 bpo-32941: Add madvise() for mmap objects (GH-6172)
Allow mmap objects to access the madvise() system call.
2019-05-27 18:48:16 +02:00
Rémi Lapeyre 674ee12600 bpo-35397: Remove deprecation and document urllib.parse.unwrap (GH-11481) 2019-05-27 09:43:45 -04:00
Xtreak ff6b2e66b1 bpo-37047: Refactor AsyncMock setup logic for autospeccing (GH-13574)
Handle late binding and attribute access in unittest.mock.AsyncMock
setup for autospeccing.
2019-05-27 14:56:23 +02:00
Victor Stinner 71c52e3048
bpo-36829: Add _PyErr_WriteUnraisableMsg() (GH-13488)
* sys.unraisablehook: add 'err_msg' field to UnraisableHookArgs.
* Use _PyErr_WriteUnraisableMsg() in _ctypes _DictRemover_call()
  and gc delete_garbage().
2019-05-27 08:57:14 +02:00
Raymond Hettinger b821868e6d
bpo-36772 Allow lru_cache to be used as decorator without making a function call (GH-13048) 2019-05-26 11:27:35 -07:00
Antoine Pitrou 91f4380ced
bpo-36785: PEP 574 implementation (GH-7076) 2019-05-26 17:10:09 +02:00
Anthony Sottile 22ccb0b490 Fix highlighting in importlib.metadata docs (GH-13575) 2019-05-26 10:30:52 -04:00
Ivan Levkivskyi 135c6a56e5
bpo-37049: PEP 589: Add TypedDict to typing module (GH-13573)
The implementation is straightforward and essentially is just copied from `typing_extensions`.
2019-05-26 09:39:24 +01:00
Ivan Levkivskyi b891c465bb
bpo-37046: PEP 586: Add Literal to typing module (#13572)
The implementation is straightforward and essentially is just copied from `typing_extensions`.
2019-05-26 09:37:48 +01:00
Ivan Levkivskyi f367242d10
bpo-37045: PEP 591: Add final qualifiers to typing module (GH-13571)
The implementation is straightforward, it just mimics `ClassVar` (since the latter is also a name/access qualifier, not really a type). Also it is essentially copied from `typing_extensions`.
2019-05-26 09:37:07 +01:00
Julien Palard 7114c6504a
Docs: FIX broken links. (GH-13491) 2019-05-25 20:02:24 +02:00
Jason R. Coombs 1bbf7b661f bpo-34632: Add importlib.metadata (GH-12547)
Add importlib.metadata module as forward port of the standalone importlib_metadata.
2019-05-24 16:59:01 -07:00
Victor Stinner 6dbbe748e1
bpo-36829: Document test.support.catch_unraisable_exception() (GH-13554)
catch_unraisable_exception() now also removes its 'unraisable'
attribute at the context manager exit.
2019-05-25 00:09:38 +02:00
Nick Sung 13d4e6a4a0 Fix typos in Doc/library/email.generator.rst documentation (GH-13539) 2019-05-24 09:50:35 -04:00