Commit Graph

25216 Commits

Author SHA1 Message Date
slateny b25352a5c0
gh-85133: os docs: Add that getenv uses os.environ (#91874)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2022-05-02 08:43:32 -06:00
slateny 9166ace805
gh-84714: Add behavior if dst file exists (#91867) 2022-05-02 08:31:55 -06:00
Victor Stinner 6811bdef63
gh-88097: doc: fix link to Py_Version (#92141) 2022-05-02 15:29:22 +02:00
Inada Naoki 614420df97
gh-85679: Recommend `encoding="utf-8"` in tutorial (GH-91778) 2022-05-02 17:25:05 +09:00
vainaijr ed711290a0
gh-91998: 'WebAssemby' to 'WebAssembly' (#92040) 2022-05-01 20:24:41 -05:00
Sam Bull 9588f880a2
typing docs: Add example for async functions (#20386)
Fixes python/typing#424
2022-04-30 22:40:27 -06:00
slateny 1066ecb970
gh-81488: Add recursive wording for issubclass docs (#92087) 2022-04-30 22:05:20 -06:00
Inada Naoki 0729b31a8b
gh-91952: Make TextIOWrapper.reconfigure() supports "locale" encoding (GH-91982) 2022-05-01 10:44:14 +09:00
Antonio Andrade 238aa6253b
Improving readability of argparse.rst (GH-91751)
Fixed few typos and enhanced few paragraphs for your review and consideration.
Trivial contribution towards continuous improvement, so no issue was raised.

Automerge-Triggered-By: GH:rhettinger
2022-04-30 15:20:10 -07:00
slateny 5dcfb916c7
gh-89253: Add 3.10 whatsnew section for itertools.pairwise (GH-91563)
#89253

[`pairwise()`](https://docs.python.org/3/library/itertools.html#itertools.pairwise) already has the 'new in python3.10'

Automerge-Triggered-By: GH:rhettinger
2022-04-30 15:14:38 -07:00
slateny efb87b1090
gh-85757: Change wording from nested to inner (GH-91811)
#85757

https://docs.python.org/3/tutorial/datastructures.html#nested-list-comprehensions

I do think this is clearer, but I wonder if 'nested' should be kept though to get the terminology out there more often. So perhaps it could be something like 'inner (nested) listcomp' or 'nested (inner) listcomp' despite sounding a bit redundant

Automerge-Triggered-By: GH:rhettinger
2022-04-30 15:12:33 -07:00
Yurii Karabas 2b97d7f6df
Fix typo in asyncio-extending.rst (#91609) 2022-04-30 16:09:48 -06:00
Motoki Naruse ea39246782
gh-91611: Use example.com for documentation, not mydomain.com (#91613)
example.com is reserved by the IANA as special-use domain name for documentation
purposes. The domain names are used widely in books, tutorials, sample network
configurations, and generally as examples for the use of domain name.

On the other hand, mydomain.com is real Domain Name Registration service.
2022-04-30 15:52:13 -06:00
slateny 567be058b4
gh-87801: Add run() to subprocess.CalledProcessError description (#91628) 2022-04-30 15:32:00 -06:00
slateny d7eb1ffbe8
gh-87192: Update wording for fcntl 'Changed in' (#91658) 2022-04-30 15:24:01 -06:00
Dennis Sweeney b660d0931e
Convert :issue: to :gh: in whatsnew (GH-92089) 2022-04-30 15:53:59 -04:00
slateny 3a8e2b6e65
gh-85864: io docs: Add missing position-only parameters (#91950) 2022-04-30 09:22:33 -06:00
Erlend Egeberg Aasland 9ea9078ec7
gh-92019: Make sqlite3.Blob indexing conform with the norm (#92020)
- get index now returns an int
- set index now requires an int in range(0, 256)

Resolves #92019
2022-04-30 09:01:37 -06:00
Serhiy Storchaka 3483299a24
gh-81548: Deprecate octal escape sequences with value larger than 0o377 (GH-91668) 2022-04-30 13:16:27 +03:00
Serhiy Storchaka 19dca04121
gh-91760: Deprecate group names and numbers which will be invalid in future (GH-91794)
Only sequence of ASCII digits will be accepted as a numerical reference.
The group name in bytes patterns and replacement strings could only
contain ASCII letters and digits and underscore.
2022-04-30 13:13:46 +03:00
Inada Naoki 354ace8b07
gh-91954: Emit EncodingWarning from locale and subprocess (GH-91977)
locale.getpreferredencoding() and subprocess.Popen() emit EncodingWarning
2022-04-30 15:53:29 +09:00
Shantanu 2f7952c35b
Rephrase typing.assert_never docs (#92061)
This change is similar to that in #32069
2022-04-29 21:13:21 -06:00
Shantanu d0064a1e72
gh-91491: Add several typing features to What's New (#92060)
This gets all the major items in #91491. However, I didn't get around to
adding what's new entries for the large clump of changes in the last
bullet point in the issue.

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2022-04-29 21:12:45 -06:00
Brett Cannon c2b579741d
gh-91217: deprecate xdrlib (GH-92066)
Automerge-Triggered-By: GH:brettcannon
2022-04-29 18:22:10 -07:00
Jelle Zijlstra 7861a9e327
Fix indentation for typing.Unpack docs (#92058)
https://docs.python.org/3.11/library/typing.html#typing.Unpack
2022-04-29 16:58:40 -06:00
slateny 53ca774497
sorting howto: Add clarification on < using __lt__ (#92010) 2022-04-29 16:08:07 -06:00
Serhiy Storchaka 81120b6754
bpo-44791: Accept ellipsis as the last argument of typing.Concatenate (#30969) 2022-04-29 15:01:40 -06:00
Hugo van Kemenade 89c6b2b8f6
bpo-36329: Remove 'make -C Doc serve' in favour of 'make -C Doc htmlview' (GH-32354)
Also updated `make -C htmlview` so it used a full path with `file://`, because the original didn't open the page (macOS).

For example:
```sh
cd Doc

# Doesn't open anything:
python3 -c "import webbrowser; webbrowser.open('build/html/index.html')"

# Opens the docs page e.g. file:///Users/hugo/github/cpython/Doc/build/html/index.html :
python3 -c "import os, webbrowser; webbrowser.open('file://' + os.path.realpath('build/html/index.html'))"
```

https://bugs.python.org/issue36329
2022-04-29 15:47:26 +02:00
Ken Jin 64113a4ba8
gh-91873: Summarise deprecations in typing at the top level (GH-91864) 2022-04-29 12:22:25 +08:00
Eisuke Kawashima ea2f5bcda1
bpo-22276: Change pathlib.Path.glob not to ignore trailing path separator (GH-10349)
Now pathlib.Path.glob() **only** matches directories when the pattern ends in a path separator.

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2022-04-28 12:45:03 -07:00
Yurii Karabas 0ef8d921f5
gh-91603: Speed up isinstance/issubclass on union types (GH-91631)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
2022-04-28 23:24:19 +08:00
Victor Stinner 87c6cf9aa7
gh-89479: Export _Py_GetSpecializationStats() internal function (#92011)
When Python is built with "./configure --enable-pystats" (if the
Py_STATS macro is defined), the _Py_GetSpecializationStats() function
must be exported, since it's used by the _opcode extension which is
built as a shared library.
2022-04-28 14:02:45 +02:00
Brett Cannon 407c3afe19
gh-91217: deprecate uu (GH-92009)
Automerge-Triggered-By: GH:brettcannon
2022-04-27 20:26:33 -07:00
Ashwin Ramaswami f348154c8f
Add note that headers added via urllib.request.add_header are added to redirected requests (#30708) 2022-04-27 16:25:03 -06:00
slateny 161dff7e10
gh-84459: Make wording more specific for Path.replace (GH-91853)
#84459
2022-04-27 15:03:03 -07:00
David CARLIER ad9f817eeb
gh-91498: socket: Add TCP_CONNECTION_INFO on macOS (#69256)
Fixes GH-91498
2022-04-27 06:47:17 -06:00
Victor Stinner 80de0273c0
gh-68966: Deprecate the mailcap module (#91951) 2022-04-26 22:43:50 +02:00
slateny b87f7f2c21
bpo-21761: Clarify __file__/__cached__ in import reference (GH-31565)
Automerge-Triggered-By: GH:brettcannon
2022-04-26 12:12:02 -07:00
Brett Cannon 1af871eeee
gh-91217: deprecate telnetlib (GH-91958) 2022-04-26 10:45:08 -07:00
Brett Cannon d174ebe91e
gh-91217: deprecate sunau (GH-91866) 2022-04-25 16:26:43 -07:00
Gregory P. Smith cd5726fe67
gh-91401: Add a failsafe way to disable vfork. (#91490)
Just in case there is ever an issue with _posixsubprocess's use of
vfork() due to the complexity of using it properly and potential
directions that Linux platforms where it defaults to on could take, this
adds a failsafe so that users can disable its use entirely by setting
a global flag.

No known reason to disable it exists. But it'd be a shame to encounter
one and not be able to use CPython without patching and rebuilding it.

See the linked issue for some discussion on reasoning.

Also documents the existing way to disable posix_spawn.
2022-04-25 16:19:39 -07:00
Victor Stinner 20cc695286
gh-64783: Fix signal.NSIG value on FreeBSD (#91929)
Fix signal.NSIG value on FreeBSD to accept signal numbers greater
than 32, like signal.SIGRTMIN and signal.SIGRTMAX.

* Add Py_NSIG constant.
* Add pycore_signal.h internal header file.
* _Py_Sigset_Converter() now includes the range of valid signals in
  the error message.
2022-04-26 00:13:31 +02:00
Jelle Zijlstra 93d280141c
gh-90633: Improve error and docs for typing.assert_never (#91720)
Closes #90633

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2022-04-25 06:40:18 -07:00
Ezio Melotti f7641a2ffe
gh-91888: add a `:gh:` role to the documentation (#91889)
* Add a new :gh:`...` role for GitHub issues.

* Fix a GitHub id to use the :gh: role.

* Add Misc/NEWS entry.

* Refactoring and rephrasing.

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2022-04-25 12:05:54 +02:00
Jelle Zijlstra dd3cf124a0
gh-91491: What's New in 3.11 section for typing PEPs (#91721)
Other aspects of typing aren't covered yet; I'll do that in a
separate PR.
2022-04-24 14:13:15 -07:00
Zac Hatfield-Dodds b4e048411f
gh-91230: Concise catch_warnings with simplefilter (#91435) 2022-04-23 17:55:22 -07:00
Brett Cannon 692e9078a1
gh-91217: deprecate spwd (#91846)
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2022-04-23 14:48:17 -07:00
Christian Heimes 92c1037afc
gh-84461: Add --enable-wasm-pthreads and more file systems (GH-91820) 2022-04-23 14:59:33 +02:00
Christian Heimes 9b5ca5405e
gh-84461: Add sys._emscripten_info, improve docs and build (gh-91781) 2022-04-23 09:52:16 +02:00
Pablo Galindo Salgado 0daa99f68b
gh-88116: Enhance the inspect frame APIs to use the extended position information (GH-91531) 2022-04-23 03:16:48 +01:00