Charles Machalow
29b875bb93
gh-109590: Update shutil.which on Windows to prefer a PATHEXT extension on executable files (GH-109995)
...
The default arguments for shutil.which() request an executable file, but extensionless files are not executable on Windows and should be ignored.
2023-10-02 09:27:30 +01:00
Ned Batchelder
29c3a445d9
fix misaligned versionchanged blocks in sqlite3 docs (GH-110191)
2023-10-01 20:34:09 -07:00
Quentin Agren
adf0f15a06
gh-110138: Improve grammar in idiomatic usage of `__main__.py` ( #110142 )
2023-10-01 13:32:43 -05:00
Nikita Sobolev
31097df611
gh-101100: Fix sphinx warnings in library/site.rst ( #110144 )
...
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-10-01 20:18:19 +03:00
Barney Gale
15de493395
GH-107465: Add pathlib.Path.from_uri() classmethod. ( #107640 )
...
This method supports file URIs (including variants) as described in RFC 8089, such as URIs generated by `pathlib.Path.as_uri()` and `urllib.request.pathname2url()`.
The method is added to `Path` rather than `PurePath` because it uses `os.fsdecode()`, and so its results vary from system to system. I intend to deprecate `PurePath.as_uri()` and move it to `Path` for the same reason.
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2023-10-01 16:14:02 +01:00
Raymond Hettinger
62405c7867
gh-110150: Fix base case handling in quantiles() (gh-110151)
2023-09-30 23:35:54 -05:00
Victor Stinner
a46e960768
gh-109649: Use os.process_cpu_count() ( #110165 )
...
Replace os.cpu_count() with os.process_cpu_count() in modules:
* compileall
* concurrent.futures
* multiprocessing
Replace os.cpu_count() with os.process_cpu_count() in programs:
* _decimal deccheck.py test
* freeze.py
* multissltests.py
* python -m test (regrtest)
* wasm_build.py
Other changes:
* test.pythoninfo logs os.process_cpu_count().
* regrtest gets os.process_cpu_count() / os.cpu_count() in headers.
2023-10-01 03:14:57 +02:00
Victor Stinner
c81521020d
gh-109649: Add os.process_cpu_count() function ( #109907 )
...
* Refactor os_sched_getaffinity_impl(): move variable definitions to
their first assignment.
* Fix test_posix.test_sched_getaffinity(): restore the old CPU mask
when the test completes!
* Doc: Specify that os.cpu_count() counts *logicial* CPUs.
* Doc: Specify that os.sched_getaffinity(0) is related to the calling
thread.
2023-10-01 00:12:51 +02:00
Adam Turner
0449fe999d
GH-101100: Fix reference warnings for `gettext` ( #110115 )
2023-09-30 05:10:07 -06:00
Raymond Hettinger
613c0d4e86
Add example for linear_regression() with proportional=True. (gh-110133)
2023-09-29 23:18:12 -05:00
Jacob Coffee
e27adc68cc
gh-109634: Fix :samp: syntax (GH-110073)
2023-09-29 14:21:34 +03:00
Nikita Sobolev
f1b1680a72
gh-109961: Use proper module for copy method docs ( #110027 )
...
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2023-09-29 11:26:55 +03:00
Nikita Sobolev
d102d39bbe
gh-101100: Fix sphinx warnings in library/difflib.rst ( #110074 )
2023-09-29 11:03:59 +03:00
Jelle Zijlstra
7dc2c5093e
gh-110045: Update symtable module for PEP 695 ( #110066 )
2023-09-29 02:08:04 +00:00
Davide Rizzo
c4eda57345
Whitespace fix in asyncio-stream.rst ( #110015 )
2023-09-28 09:34:35 -07:00
Nikita Sobolev
0baf72696e
gh-109961: Docs: Fix incorrect rendering of __replace__ in copy.rst ( #109968 )
2023-09-28 14:51:33 +03:00
Jacob Coffee
99fba5f156
gh-109812: Fix phrasing for collections.Counter (gh-109813)
2023-09-27 21:29:39 -05:00
Jelle Zijlstra
f49958c886
Enhance TypedDict docs around required/optional keys ( #109547 )
...
As discussed in comments to #109544 , the semantics of this attribute
are somewhat confusing. Add a note explaining its limitations and
steering users towards __required_keys__ and __optional_keys__ instead.
2023-09-27 10:35:46 -07:00
Sam Gross
773614e03a
gh-109740: Use 't' in --disable-gil SOABI ( #109922 )
...
Shared libraries for CPython 3.13 are now marked with a 't' for
threading. For example, `binascii.cpython-313t-darwin.so`.
2023-09-27 15:24:12 +00:00
Nikita Sobolev
d9809e84fb
gh-101100: Fix sphinx warnings in library/devmode.rst ( #109963 )
...
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2023-09-27 16:07:28 +03:00
Barney Gale
ecd813f054
GH-109187: Improve symlink loop handling in pathlib.Path.resolve() (GH-109192)
...
Treat symlink loops like other errors: in strict mode, raise `OSError`, and
in non-strict mode, do not raise any exception.
2023-09-26 17:57:17 +01:00
Nikita Sobolev
7c61a361fc
gh-101100: Fix Sphinx warnings in Doc/library/weakref.rst ( #109881 )
2023-09-26 10:46:09 +03:00
Antoine Pitrou
88a6137cdb
gh-109599: Add types.CapsuleType ( #109600 )
...
---------
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
2023-09-25 19:50:39 +02:00
Nikita Sobolev
f2eaa92b0c
gh-101100: Fix sphinx warnings in Doc/library/__future__.rst ( #109814 )
2023-09-25 00:31:56 -06:00
Nikita Sobolev
649768fb67
gh-101100: Fix sphinx warnings in Doc/library/xml.etree.elementtree.rst ( #109799 )
...
gh-101100: Fix shpinx warnings in `Doc/library/xml.etree.elementtree.rst`
2023-09-24 12:49:02 +03:00
Serhiy Storchaka
92af0cc580
gh-109634: Use :samp: role (GH-109635)
2023-09-23 09:31:20 +03:00
Gregory P. Smith
5e7ea95d9d
gh-100228: Document the os.fork threads DeprecationWarning. ( #109767 )
...
Document the `os.fork` posix threads detected `DeprecationWarning` in 3.12 What's New, os, multiprocessing, and concurrent.futures docs.
Many reviews and doc cleanup edits by Adam & Hugo. 🥳
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-09-23 05:04:20 +00:00
Łukasz Langa
46b63ced25
Remove outdated docstring from the quantify itertools recipe ( #109726 )
2023-09-22 15:09:32 +02:00
AN Long
869f177b5c
gh-74481: Add missing debug function docs and constants to msvcrt (GH-109650)
2023-09-21 16:44:24 +01:00
Heinz-Alexander Fuetterer
ef6d475db3
Fix typos in docs and comments ( #109619 )
2023-09-20 16:58:23 +00:00
Victor Stinner
d41d2e69f6
gh-109054: Document configure variables ( #109224 )
2023-09-20 18:51:53 +02:00
Victor Stinner
ced6924630
gh-108973: Fix asyncio test_subprocess_consistent_callbacks() ( #109431 )
...
SubprocessProtocol process_exited() method can be called before
pipe_data_received() and pipe_connection_lost() methods. Document it
and adapt the test for that.
Revert commit 282edd7b2a .
_child_watcher_callback() calls immediately _process_exited(): don't
add an additional delay with call_soon(). The reverted change didn't
make _process_exited() more determistic: it can still be called
before pipe_connection_lost() for example.
Co-authored-by: Davide Rizzo <sorcio@gmail.com>
2023-09-20 15:54:19 +02:00
James Gerity
def828995a
fixes gh-109559: Update unicodedata for Unicode 15.1.0 (GH-109560)
...
---------
Co-authored-by: Benjamin Peterson <benjamin@python.org>
2023-09-19 22:07:47 -07:00
Mateusz Nowak
5a740cd06e
gh-109109: Expose retrieving certificate chains in SSL module ( #109113 )
...
Adds APIs to get the TLS certificate chains, verified or full unverified, from SSLSocket and SSLObject.
Co-authored-by: Gregory P. Smith [Google LLC] <greg@krypto.org>
2023-09-20 01:20:54 +00:00
Raymond Hettinger
f2636d2c45
Misc itertool recipe improvements, mostly docstrings and comments (gh-109555)
2023-09-19 07:39:44 -05:00
Victor Stinner
59f32a785f
gh-109435: Add Doc/library/cmdline.rst ( #109436 )
...
Document modules providing a command-line interface (CLI).
2023-09-19 13:57:28 +02:00
Xuehai Pan
74f315edd0
gh-102757: fix function signature mismatch for functools.reduce between code and documentation ( #102759 )
2023-09-18 10:42:58 -06:00
Hugo van Kemenade
2209d814ca
Docs: getopt is deprecated in Python 3.13 ( #109438 )
2023-09-18 13:45:59 +03:00
Anthony Sottile
ce5b3e19e6
Fix extraneous backslashes in hashlib docs ( #109468 )
2023-09-18 00:25:33 -07:00
AlberLC
929cc4e4a0
gh-109451: Fix wrong format specifier in logging documentation (GH-109465)
2023-09-16 10:06:04 +01:00
Vinay Sajip
a6846d45ff
gh-109414: Add some basic information about venvs in the introduction. (GH-109440)
...
Co-authored-by: Victor Stinner <vstinner@python.org>
2023-09-16 09:49:02 +01:00
Brett Cannon
e218e5022e
GH-83417: Allow venv to add a .gitignore file to environments via a new scm_ignore_file parameter (GH-108125)
...
This feature is off by default via code but on by default via the CLI. The `.gitignore` file contains `*` which causes the entire directory to be ignored.
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-09-15 22:38:08 +00:00
Gregory P. Smith
59073c9ab8
gh-109096: Deprecate http.server.CGIHTTPRequestHandler ( #109387 )
...
Deprecate `http.server.CGIHTTPRequestHandler`.
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2023-09-15 14:26:45 -07:00
Egil Martinsson
3d881453d3
gh-109350: Fix outdated captured output in unittest.mock documentation ( #109353 )
2023-09-15 19:25:16 +01:00
Hugo van Kemenade
b434dd7e36
Docs: Superseded modules: list only module names ( #109439 )
2023-09-15 15:56:23 +03:00
Nikita Sobolev
21e80f4c19
gh-101100: Fix sphinx warnings in turtle.rst ( #109394 )
2023-09-14 14:24:18 -04:00
Brandt Bucher
22e65eecaa
GH-105848: Replace KW_NAMES + CALL with LOAD_CONST + CALL_KW (GH-109300)
2023-09-13 10:25:45 -07:00
Oleksandr Kravets
a0c06a4f93
Fix variable name in dis documentation example (GH-109343)
...
BINARY_SUBSCR example erroneously uses two different names `key` and `index` to refer to the same variable. STORE_SUBSCR and DELETE_SUBSCR use only `key` in the same context. Changing `index` to `key` for consistency.
2023-09-13 08:07:56 +03:00
Thomas Grainger
6c0ddca409
gh-105189: fix importlib.resources.abc deprecation docs ( #105232 )
...
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-09-13 07:42:26 +03:00
Irit Katriel
b303d3ad3e
gh-109319: deprecate dis.HAVE_ARGUMENT ( #109320 )
2023-09-12 16:45:35 +01:00