Hugo van Kemenade
d525d01e27
gh-101100: Define `test.regrtest` module to fix references ( #112381 )
...
Define test.regrtest module to fix references
2023-11-25 08:17:31 +02:00
Irit Katriel
fafae08cc7
gh-59254: mention in open() doc that line buffering is for writing ( #112318 )
2023-11-24 18:59:41 +01:00
Irit Katriel
10e1a0c916
gh-112137: change dis output to display labels instead of offsets ( #112138 )
2023-11-22 22:36:55 +00:00
Sebastian Rittau
6c47eaccfa
Fix docstring and var name of itertools recipe ( #112113 )
...
`prepend()` works with arbitrary iterables, not only iterators. In fact,
the example given uses a `list`, which is iterable, but not an iterator.
2023-11-22 07:35:36 +02:00
Tian Gao
46500c42f0
GH-111963: Clarify sys.monitoring.free_tool_id's limitations (GH-112291)
2023-11-21 14:58:30 -08:00
Junya Okabe
9d70831cb7
gh-110745: add a newline argument to pathlib.Path.read_text ( #110880 )
...
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Barney Gale <barney.gale@gmail.com>
2023-11-21 22:32:38 +00:00
Alex Ptakhin
6bf8f20344
gh-110383: Fix documentation profile cumtime fix ( #112221 )
...
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-11-19 02:56:54 -07:00
Charlie Zhao
dabc0d77b2
Fix typo in documentation of `importlib.metadata` (GH-112099)
...
Fix minor typo in importlib doc
2023-11-17 15:11:30 -08:00
Victor Stinner
7c50800241
gh-110481, doc: Add "immortal" term to the glossary ( #112180 )
2023-11-17 15:09:19 +01:00
Terry Jan Reedy
8cd70eefc7
gh-112165: Fix typo in `__main__.py` ( #112183 )
...
Change '[2]' to '[1]' to get second argument.
2023-11-16 20:05:16 -05:00
Luis Pedro Coelho
81ab0e8a4a
[doc] Make subprocess.wait documentation more precise ( #98700 )
...
[doc] Make subprocess.wait doc more precise
An active loop is only used when the `timeout` parameter is used on
POSIX.
When no timeout is used, the code calls `os.waitpid` internally (which puts
the process on a sleep status). On Windows, the internal Windows API
call accepts a timeout parameter, so that is delegated to the OS.
2023-11-16 05:04:46 -08:00
Terry Jan Reedy
e31d65e0b7
gh-111622: Fix doc for items views ( #112051 )
...
They are set-like even when some values are not hashable,
but work even better when all are.
2023-11-14 07:41:20 +00:00
Barney Gale
d5491a6eff
GH-110417: Fix `glob` docs ordering ( #110418 )
...
Fix incorrect placement of `translate()` docs from cf67ebf
.
Move "see also: pathlib" admonition to the bottom of the page, alongside one for fnmatch. This helps the module introduction flow more naturally into the function descriptions.
Add an "Examples" subheading just before the examples. This makes it more obvious that examples aren't specifically related to the preceding documentation of `escape()` and `translate()`.
2023-11-13 17:48:16 +00:00
Barney Gale
cf67ebfb31
GH-72904: Add `glob.translate()` function ( #106703 )
...
Add `glob.translate()` function that converts a pathname with shell wildcards to a regular expression. The regular expression is used by pathlib to implement `match()` and `glob()`.
This function differs from `fnmatch.translate()` in that wildcards do not match path separators by default, and that a `*` pattern segment matches precisely one path segment. When *recursive* is set to true, `**` pattern segments match any number of path segments, and `**` cannot appear outside its own segment.
In pathlib, this change speeds up directory walking (because `_make_child_relpath()` does less work), makes path objects smaller (they don't need a `_lines` slot), and removes the need for some gnarly code.
Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2023-11-13 17:15:56 +00:00
Stephen Gildea
38035fed9b
gh-90890: New methods to access mailbox.Maildir message info and flags ( #103905 )
...
New methods to access mailbox.Maildir message info and flags:
get_info, set_info, get_flags, set_flags, add_flag, remove_flag.
These methods speed up accessing a message's info and/or flags and are
useful when it is not necessary to access the message's contents,
as when iterating over a Maildir to find messages with specific flags.
---------
* Add more str type checking
* modernize to f-strings instead of %
Co-authored-by: Gregory P. Smith <greg@krypto.org>
2023-11-11 17:41:33 +00:00
Łukasz Langa
3932b0f7b1
gh-110722: Make `-m test -T -j` use sys.monitoring (GH-111710)
...
Now all results from worker processes are aggregated and
displayed together as a summary at the end of a regrtest run.
The traditional trace is left in place for use with sequential
in-process test runs but now raises a warning that those
numbers are not precise.
`-T -j` requires `--with-pydebug` as it relies on `-Xpresite=`.
2023-11-10 18:17:45 +01:00
Zac Hatfield-Dodds
d61313bdb1
gh-103791: handle `BaseExceptionGroup` in `contextlib.suppress()` ( #111910 )
2023-11-10 13:32:36 +00:00
Samuel Thibault
0802fd6c8e
gh-81925: Implement native thread ids for kFreeBSD ( #111761 )
...
---------
Co-authored-by: Antoine Pitrou <antoine@python.org>
2023-11-09 21:02:30 +01:00
Donghee Na
6046aec377
gh-111835: Add seekable method to mmap.mmap (gh-111852)
2023-11-09 20:13:35 +09:00
Serhiy Storchaka
005d1e8fc8
gh-68166: Tkinter: Add tests and examples for element_create() (GH-111453)
...
* Remove mention of "vsapi" element type from the documentation.
* Add tests for element_create() and other ttk.Style methods.
* Add examples for element_create() in the documentation.
2023-11-08 18:25:58 +02:00
Pierre Ossman (ThinLinc team)
74b868f636
gh-111246: Remove listening Unix socket on close ( #111483 )
...
Try to clean up the socket file we create so we don't add unused noise to the file system.
2023-11-08 08:10:10 -08:00
Jelle Zijlstra
8ab7ad6308
Glossary: Add "static type checker" ( #111837 )
...
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-11-08 14:38:36 +00:00
Serhiy Storchaka
70afb8d732
gh-85098: Implement functional CLI of symtable ( #109112 )
...
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
2023-11-07 16:32:16 +00:00
方糖
c3e19c3a62
gh-111729: update generic syntax for `typing.Concatenate` sample code in `Doc/library/typing.rst` ( #111734 )
...
use new generic syntax
2023-11-06 16:53:17 -08:00
Charles Machalow
ba8aa1fd37
gh-109466: Add ipv6_mapped property to IPv4Address ( #109467 )
...
Adds the `IPv4Address.ipv6_mapped` property.
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-11-05 16:50:31 +00:00
Tian Gao
853b4b549d
gh-111719: Add extra check for alias command ( #111720 )
2023-11-04 23:05:22 +00:00
Nikita Sobolev
ccc8caa858
gh-111681: minor fixes to typing doctests; remove unused imports in `test_typing` ( #111682 )
...
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-11-03 12:23:33 +00:00
Irit Katriel
d49aba5a7a
gh-111354: Simplify _PyGen_yf by moving some of its work to the compiler and frame state ( #111648 )
2023-11-03 10:01:36 +00:00
Terry Jan Reedy
0d3df272fb
gh-54434: Make difflib.rst doctests pass. ( #111677 )
2023-11-03 02:20:39 -04:00
LoipesMas
489b80640f
Fix typo in documentation of `SysLogHandler.createSocket` ( #111665 )
2023-11-02 22:47:43 +00:00
Irit Katriel
52cc4af6ae
gh-111354: simplify detection of RESUME after YIELD_VALUE at except-depth 1 ( #111459 )
2023-11-02 10:18:43 +00:00
Serhiy Storchaka
eaf67e37a2
gh-111576: Improve documention for tkinter.messagebox (GH-111578)
2023-11-01 12:27:02 +02:00
Krzysiek Karbowiak
102685c4c8
gh-111282: Fix NamedTemporaryFile example code (GH-111283)
2023-10-31 17:06:02 -05:00
Thomas Grainger
770530679e
gh-110774: allow setting the Runner(loop_factory=...) from IsolatedAsyncioTestCase ( #110776 )
...
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
2023-10-31 15:03:54 -07:00
Quentin Peter
2445673983
gh-102249: Expand sys.call_tracing documentation ( #102806 )
...
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
2023-10-31 16:24:54 +00:00
Prometheus3375
5cc6c80a77
gh-93607: document `root` attribute of `iterparse` ( #99410 )
...
Co-authored-by: Stanley <46876382+slateny@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-10-31 16:16:55 +00:00
xzmeng
cf3dbe4c3d
gh-106861: Docs: Add availability directives to all Unix-only modules ( #108975 )
2023-10-31 18:14:27 +02:00
Serhiy Storchaka
4d6bdf8aab
gh-111165: Remove documentation for moved functions (GH-111467)
2023-10-29 21:34:22 +02:00
Nikita Sobolev
46389c3275
gh-101100: Fix sphinx warnings in `library/asyncio-eventloop.rst` (GH-111222)
...
* gh-101100: Fix sphinx warnings in `library/asyncio-eventloop.rst`
* Update Doc/library/socket.rst
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
* Update asyncio-eventloop.rst
* Update socket.rst
---------
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-10-29 12:31:01 -07:00
Guido van Rossum
2655369559
gh-79033: Try to fix asyncio.Server.wait_closed() again (GH-111336)
...
* Try to fix asyncio.Server.wait_closed() again
I identified the condition that `wait_closed()` is intended
to wait for: the server is closed *and* there are no more
active connections.
When this condition first becomes true, `_wakeup()` is called
(either from `close()` or from `_detach()`) and it sets `_waiters`
to `None`. So we just check for `self._waiters is None`; if it's
not `None`, we know we have to wait, and do so.
A problem was that the new test introduced in 3.12 explicitly
tested that `wait_closed()` returns immediately when the server
is *not* closed but there are currently no active connections.
This was a mistake (probably a misunderstanding of the intended
semantics). I've fixed the test, and added a separate test that
checks exactly for this scenario.
I also fixed an oddity where in `_wakeup()` the result of the
waiter was set to the waiter itself. This result is not used
anywhere and I changed this to `None`, to avoid a GC cycle.
* Update Lib/asyncio/base_events.py
---------
Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
2023-10-28 18:04:29 +00:00
Nikita Sobolev
aa732459c5
gh-111388: Add `show_group` parameter to `traceback.format_exception_only` ( #111390 )
2023-10-27 11:11:26 +01:00
Łukasz Langa
6d42759c5e
gh-111276: Clarify docs and comments about the role of LC_CTYPE ( #111319 )
...
Fix locale.LC_CTYPE documentation to no longer mention string.lower() et al. Those functions were removed in Python 3.0:
https://docs.python.org/2/library/string.html#deprecated-string-functions
Also, fix a comment in logging about locale-specific behavior of `str.lower()`.
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-10-27 11:43:01 +02:00
Raymond Hettinger
7f9a99e854
gh-89519: Remove classmethod descriptor chaining, deprecated since 3.11 (gh-110163)
2023-10-27 00:24:56 -05:00
Nikita Sobolev
ee2d22f06d
gh-111343: Fix `itertools` docs: `start` arg is optional for `count` (gh-111344)
2023-10-27 04:30:13 +00:00
Tian Gao
3f84a19e62
Docs: Add `restart_events()` and positional arg semantics for `sys.monitoring` ( #111291 )
...
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-10-25 18:03:32 +00:00
Khalil Mouawad
14f52e1548
gh-110679: Improved markup in enum.rst (GH-110747)
2023-10-25 10:32:09 -07:00
Erlend E. Aasland
1262e41842
gh-108590: Improve sqlite3 docs on encoding issues and how to handle those ( #108699 )
...
Add a guide for how to handle non-UTF-8 text encodings.
Link to that guide from the 'text_factory' docs.
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
Co-authored-by: Corvin <corvin@corvin.dev>
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-10-25 15:58:00 +02:00
Hugo van Kemenade
81ed80d843
gh-111187: Postpone removal version for locale.getdefaultlocale() to 3.15 ( #111188 )
2023-10-25 16:47:41 +03:00
Serhiy Storchaka
f6a45a03d0
gh-111165: Move test running code from test.support to libregrtest (GH-111166)
...
Remove no longer used functions run_unittest() and run_doctest() from
the test.support module.
2023-10-25 12:41:21 +03:00
Pavel Karateev
8b44f3c54b
Fix first parameter name in `tool` functions from `sys.monitoring` ( #111286 )
2023-10-24 21:19:54 +00:00
InSync
c0ea67dd0d
GH-111182: Update EnumType.__contains__ docs (GH-111184)
2023-10-24 10:30:13 -07:00
Zachary Ware
c7d68f907a
Revert "Fix a code snippet typo in asyncio docs ( #108427 )" (GH-111271)
...
This reverts commit 7f31676340
.
The change resulted in a tautology and should not have been made. There
may be an opportunity for additional clarity in this section, but this
change wasn't it :)
Ref: https://github.com/python/cpython/pull/108427#issuecomment-1777525740
2023-10-24 11:09:13 -05:00
InSync
1198076447
gh-111151: Convert monospaced directives to :ref: ( #111152 )
2023-10-24 08:22:08 -07:00
James Tocknell
6b9babf140
Fix typo in sys docs ( #111196 )
...
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-10-24 11:03:35 +03:00
Hugo van Kemenade
96cbd1e1db
gh-101100: Fix Sphinx warnings for `fileno` ( #111118 )
2023-10-23 13:05:56 -06:00
Don Patterson
94c2ddfcd7
typo: missing line of output in pull parser example ( #111068 )
2023-10-23 18:54:29 +03:00
Nikita Sobolev
8c689c9b88
gh-101100: Fix sphinx warnings in `library/asyncio-dev.rst` (GH-111179)
...
* gh-101100: Fix sphinx warnings in `library/asyncio-dev.rst`
* Update Doc/library/asyncio-eventloop.rst
* Update Doc/library/asyncio-eventloop.rst
---------
Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
2023-10-22 17:11:57 +00:00
Gouvernathor
b07f23259d
gh-106310 - document the __signature__ attribute ( #106311 )
...
Document the __signature__ attribute
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-10-21 08:54:02 +10:00
Hugo van Kemenade
c42c68aa7b
gh-101100: Fix Sphinx warnings in `library/tty.rst` ( #111079 )
...
Fix Sphinx warnings in library/tty.rst
2023-10-20 07:33:17 +03:00
Unique-Usman
bcc941bd4a
gh-109510: Clearly explain "Which Docstrings Are Examined" ( #109696 )
...
Co-authored-by: Mariatta <Mariatta@users.noreply.github.com>
Co-authored-by: Jacob Coffee <jacob@z7x.org>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
2023-10-19 18:10:06 +03:00
Adam Turner
63acf78d71
GH-101100: Fix reference warnings for ``__enter__`` and ``__exit__`` ( #110112 )
2023-10-19 18:05:17 +03:00
Adam Turner
da99133710
GH-101100: Fix reference warnings for ``__getitem__`` ( #110118 )
2023-10-19 18:05:05 +03:00
Nikita Sobolev
d144749914
gh-101100: Fix sphinx warnings in `library/getpass.rst` ( #110461 )
2023-10-19 18:04:29 +03:00
Nikita Sobolev
a89708aeea
gh-101100: Fix sphinx warnings in `library/codecs.rst` ( #110979 )
2023-10-19 17:20:52 +03:00
Tian Gao
1991694117
GH-103082: Clean up the sys.monitoring docs (GH-110532)
2023-10-18 16:15:42 -07:00
Tian Gao
d9246c7b73
GH-104232: Fix statement about trace return values (GH-110516)
2023-10-18 13:24:00 -07:00
Tian Gao
e6eb8cafca
GH-102895 Add an option local_exit in code.interact to block exit() from terminating the whole process (GH-102896)
2023-10-18 11:36:43 -07:00
Matthieu Dartiailh
198aa67d4c
gh-107457: update dis documentation with changes in 3.12 ( #108900 )
2023-10-17 12:59:34 +00:00
Karolina Surma
db656aebc6
sysconfig docs: fix broken link to the source code ( #110920 )
...
It's now a package. See: 4a53a397c3
2023-10-16 12:27:12 +01:00
Nikita Sobolev
12deda7633
gh-101100: Fix sphinx warnings in `library/time.rst` ( #110862 )
2023-10-14 16:20:19 +02:00
paskozdilar
f81e36f700
gh-110703: Add asyncio.wait_for() change notes for 3.11 (GH-110818)
...
* Remove redundant versionchanged
* Add missing versionchanged
* Update Doc/library/asyncio-task.rst
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
---------
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2023-10-13 15:15:28 +02:00
InSync
2c472a87c7
Remove unnecessary escape in Doc/library/enum.rst (GH-110780)
2023-10-12 15:04:36 -07:00
Thomas Grainger
8c6c14b91b
gh-94597: Add asyncio.EventLoop ( #110723 )
...
This is needed to pave the way for deprecating and eventually killing the event loop policy system (which is over-engineered and rarely used).
2023-10-12 07:13:57 -07:00
Ezio Melotti
718391f475
gh-110631: Fix reST indentation ( #110724 )
...
* Fix wrong indentation in the other dirs.
* Fix more wrong indentation.
2023-10-11 22:43:03 +02:00
Ezio Melotti
bb7923f556
gh-110631: Fix reST indentation in `Doc/library` ( #110685 )
...
Fix wrong indentation in the Doc/library dir.
2023-10-11 22:24:12 +02:00
Radislav Chugunov
0d805b998d
gh-108826: Document `dis` module CLI and rename `_test` function to `main` ( #108827 )
...
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
2023-10-10 16:31:28 -06:00
Nikita Sobolev
756062b296
gh-101100: Fix sphinx warnings in `library/socketserver.rst` (GH-110207)
2023-10-10 13:44:19 +02:00
Donghee Na
0362cbf908
gh-109595: Add -Xcpu_count=<n> cmdline for container users ( #109667 )
...
---------
Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Gregory P. Smith [Google LLC] <greg@krypto.org>
2023-10-10 19:00:09 +09:00
Nikita Sobolev
5e7edac771
gh-110497: Add note about `OSError` being an alias to `IOError` in docs ( #110498 )
2023-10-09 11:18:06 +02:00
Albert Villanova del Moral
0df772f555
Remove unused imports in multiprocessing docs example ( #109984 )
2023-10-08 22:36:01 -07:00
Masaru Tsuchiyama
de2a4036cb
gh-108277: Add os.timerfd_create() function ( #108382 )
...
Add wrapper for timerfd_create, timerfd_settime, and timerfd_gettime to os module.
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
2023-10-07 19:33:22 +02:00
InSync
02cdaefe9a
Fix typo in Doc/library/textwrap.rst ( #110328 )
...
"One problem with this is algorithm is that [...]" -> "One problem with this algorithm is that [...]"
2023-10-06 14:25:02 +00:00
Bradley Reynolds
d257479c2f
gh-110383: Swap 'the all' -> 'all the' in socket docs ( #110434 )
2023-10-05 19:55:44 +00:00
Towster15
a973bf0f97
gh-110383 TimeIt Docs Spelling Fix ( #110407 )
...
Make 0.2 second plural
2023-10-05 17:01:35 +00:00
박문식
d33aa18f15
gh-82367: Use `FindFirstFile` Win32 API in `ntpath.realpath()` (GH-110298)
...
* Use `FindFirstFile` Win32 API to fix a bug where `ntpath.realpath()`
breaks out of traversing a series of paths where a (handled)
`ERROR_ACCESS_DENIED` or `ERROR_SHARING_VIOLATION` occurs.
* Update docs to reflect that `ntpath.realpath()` eliminates MS-DOS
style names.
2023-10-05 09:49:07 -05:00
Benjamin Peterson
313aa861ce
Remove duplicate word. ( #110376 )
2023-10-05 15:18:17 +11:00
P. L. Lim
f7860295b1
Add back bltin-boolean-values ref tag ( #110371 )
...
To avoid breaking downstream intersphinx via numpydoc
2023-10-04 12:56:11 -07:00
Jelle Zijlstra
f02f26e293
gh-85984: Document change in return type of tty functions ( #110028 )
2023-10-03 20:46:38 -07:00
Adam Turner
77e9aae383
Docs: Avoid the deprecated ``.. cmdoption::`` directive ( #110292 )
2023-10-03 17:38:12 +00:00
Lincoln
4227bfa8b2
Enhanced sqlite3 connection context management documentation with contextlib.closing gh-109234 ( #109322 )
...
* Enhanced sqlite3 connection context management documentation with contextlib.closing
* 📜 🤖 Added by blurb_it.
* Fixed gitignore spelling error from nitignore to gitignore
* Renamed .gitignore to .nitignore
* Added generated doctests
* Deleted sqlite3 generated files
* Removed white-space changes
* Removed News entry from the doc
* Expanded a note that context manager can be used for connection management using contextlib.closing
* Removed repeated contextlib.closing code snippet
* Expanded the note around usage of context manageer for sqlite3 connection management
* Deleted extra white-spaces
* Deleted extra white-space
* re-arranged context manager wording
* Re-arranged word layout on how to use context manager
* Fix whitespace errors
* Remove unneeded change in .gitignore
* Added suggested changes
* Added suggested change redirecting to the contextlib.closing implementation
* Added closing keyword
* Removed line 2473
---------
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Erlend E. Aasland <erlend@python.org>
2023-10-03 17:32:43 +03:00
Adam Turner
f16e81f368
GH-92584: Move installation schemes overview to sysconfig docs ( #108018 )
...
* Add new installation path functions subsection
* Add content from install/index to sysconfig
* Fix table
* Update note about installers
* Clean up the list of schemes, remove references to Distutils
2023-10-02 12:40:03 +02:00
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
Irit Katriel
0e76cc359b
gh-109184: update traceback module doc w.r.t notes (message is no longer always at the end) ( #109201 )
2023-09-12 14:54:04 +00:00
AN Long
e121fca33b
gh-109266: Fix msvcrt.kbhit's documented return value (GH-109267)
2023-09-12 15:44:48 +01:00
Irit Katriel
8b55adfa8f
gh-109256: allocate opcode IDs for internal opcodes in their own range ( #109269 )
2023-09-12 10:36:17 +00:00
Raymond Hettinger
f2a55fecd0
Fix iter_index() to work with lists which do not support stop=None. (gh-109306)
2023-09-12 04:04:28 +02:00
wim glenn
1ee50e2a78
gh-107322: zipapp: Remove the suggestion to remove .dist-info directories ( #107296 )
...
Removed zipapp suggestion to rm .dist-info subdirectories. This totally breaks importlib.metadata
2023-09-11 15:44:13 -04:00
Serhiy Storchaka
92578919a6
gh-109174: Add support of SimpleNamespace in copy.replace() (GH-109175)
2023-09-10 08:09:25 +03:00
Raymond Hettinger
d3ed9921cd
Improve the sieve() recipe in the itertools docs (gh-109199)
...
Lazier sieve
2023-09-09 17:50:04 -05:00
Shantanu
74fc96bc60
Add version directives to ast docs ( #108788 )
2023-09-07 11:34:18 -07:00
Christoph Anton Mitterer
403ab1306a
gh-107924: re-order os.sendfile() flag documentation ( #107926 )
...
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-09-07 18:50:10 +03:00
Mark Dickinson
b72251de93
gh-102823: Document return type of floor division on floats ( #102824 )
...
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-09-07 14:20:33 +00:00
Nikita Sobolev
ac31f714c3
gh-107544: Add docs about `json.dumps(..., default=)` ( #108259 )
2023-09-07 06:53:33 -07:00
Stanley
891236f482
gh-71770: Add more details on behavior of configparser's default_section ( #31562 )
...
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-09-07 13:52:58 +00:00
Colin Watson
1294fcede0
GH-90915: Document that SystemExit doesn't trigger sys.excepthook ( #31357 )
...
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-09-07 13:14:27 +00:00
Ori Hoch
6b15ff5235
socket documentation fix - rename triple to 3-tuple ( #24722 )
...
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-09-07 10:33:02 +00:00
Karthikeyan Singaravelan
e183a71eef
bpo-38157: Add example about per file output for mock_open. ( #16090 )
...
Co-authored-by: Stanley <46876382+slateny@users.noreply.github.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-09-07 09:19:13 +00:00
Adam Turner
f0f96a9f40
GH-108202: Document ``calendar``'s command-line interface ( #109020 )
...
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-09-06 21:19:54 +00:00
Serhiy Storchaka
6f3c138dfa
gh-108751: Add copy.replace() function (GH-108752)
...
It creates a modified copy of an object by calling the object's
__replace__() method.
It is a generalization of dataclasses.replace(), named tuple's _replace()
method and replace() methods in various classes, and supports all these
stdlib classes.
2023-09-06 23:55:42 +03:00
Shahriar Heidrich
9f0c0a46f0
gh-107732: Mention dir support in importlib.resources docs ( #107734 )
...
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-06 20:53:32 +00:00
nabin2004
6f8411cfd6
gh-108857: improve markup in inspect.Signature.replace() docs ( #108862 )
2023-09-05 17:27:59 -07:00
wim glenn
9bf350b066
gh-107755: Document the correct default value of slice step (GH-107756)
...
Document the correct default value of slice step.
2023-09-05 21:22:27 +02:00
Nikita Sobolev
ad1d6a1c20
gh-108903: Remove unneeded `lambda`s from `asyncio` (GH-108904)
2023-09-05 18:11:12 +03:00
Mark Shannon
8b515f60ee
GH-103082: Document PEP-669: Low Impact Monitoring for CPython (GH-107772)
2023-09-05 12:35:52 +01:00
Tian Gao
6304d983a0
gh-108463: Make expressions/statements work as expected in pdb ( #108464 )
2023-09-04 21:44:40 +00:00
Raymond Hettinger
f373c6b948
gh-107208: Fix iter_index() recipe to not swallow exceptions (gh-108835)
...
gh-107208: iter_index now supports "stop" and no longer swallows ValueError
2023-09-02 22:25:13 -05:00
Victor Stinner
4f9b706c6f
gh-108794: doctest counts skipped tests ( #108795 )
...
* Add 'skipped' attribute to TestResults.
* Add 'skips' attribute to DocTestRunner.
* Rename private DocTestRunner._name2ft attribute
to DocTestRunner._stats.
* Use f-string for string formatting.
* Add some tests.
* Document DocTestRunner attributes and its API for statistics.
* Document TestResults class.
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-09-02 16:42:07 +02:00
Nikita Sobolev
5141b1ebe0
gh-101100: Fix sphinx warnings in `unittest.mock-examples.rst` ( #108810 )
2023-09-02 13:05:44 +01:00
Nikita Sobolev
dd05c2054f
Fix typo in `uuid.rst` ( #108809 )
2023-09-02 10:08:46 +00:00
Nikita Sobolev
21da4980f5
gh-101100: Fix sphinx warnings in `uuid.rst` ( #108805 )
...
* gh-101100: Fix sphinx warnings in `uuid.rst`
* Use anchors
2023-09-02 09:32:19 +00:00
TATHAGATA ROY
8f9ea43ee8
gh-105563: reference DateType in datetime's documentation ( #105946 )
2023-09-01 13:36:24 -07:00
Alex Povel
c1e2f3b2f7
`ast` docs: Fix incorrect link on `keyword` ( #108728 )
...
In two places, Sphinx was erroneously adding links to the `keyword` module instead of the `ast.keyword` class
2023-08-31 23:17:32 +01:00
Nikita Sobolev
991e4e76b5
gh-101100: Fix sphinx warnings in `threading.rst` ( #108684 )
...
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-08-31 10:28:27 +03:00
kato8966
38ab0dba80
Fix typo in multiprocessing docs ( #108666 )
2023-08-30 12:05:29 +01:00
Sebastian Rittau
6c484c39be
gh-108669: unittest: Fix documentation for TestResult.collectedDurations ( #108670 )
2023-08-30 09:36:59 +00:00
sterliakov
14ec0bb7c3
Mention Ellipsis pickling in the docs ( #103660 )
2023-08-30 01:11:31 +00:00
Erlend E. Aasland
0b0c1d046c
gh-108278: Deprecate passing the first param of sqlite3.Connection callback APIs by keyword ( #108632 )
...
Deprecate passing the callback callable by keyword for the following
sqlite3.Connection APIs:
- set_authorizer(authorizer_callback)
- set_progress_handler(progress_handler, ...)
- set_trace_callback(trace_callback)
The affected parameters will become positional-only in Python 3.15.
2023-08-29 22:02:12 +02:00
Erlend E. Aasland
8178a88bd8
gh-107801: Improve the accuracy of io.IOBase.seek docs ( #108268 )
...
- Add param docstrings
- Link to os.SEEK_* constants
- Mention the return value in the initial paragraph
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2023-08-29 19:13:38 +00:00
xzmeng
88f1c5b454
Fix misc doc typos ( #108592 )
2023-08-29 00:14:21 +00:00
Matthias Bussonnier
f75cefd402
gh-106670: Allow Pdb to move between chained exceptions ( #106676 )
2023-08-28 18:31:03 +00:00
Erlend E. Aasland
4116592b6f
gh-108278: Deprecate passing the three first params as keyword args for sqlite3 UDF creation APIs ( #108281 )
...
Deprecate passing name, number of arguments, and the callable as keyword
arguments, for the following sqlite3.Connection APIs:
- create_function(name, nargs, callable, ...)
- create_aggregate(name, nargs, callable)
The affected parameters will become positional-only in Python 3.15.
2023-08-28 13:32:07 +00:00
nikkie
72b615ab01
Fix typo in typing docs: Remove redundant backtick ( #108559 )
2023-08-28 11:19:29 +00:00
Adam Turner
5d936b6479
GH-108202: Combine documentation of ``calendar`` constants ( #108492 )
2023-08-27 23:19:31 -06:00
Erlend E. Aasland
38afa4af9b
gh-107801: Document io.TextIOWrapper.tell ( #108265 )
2023-08-27 20:35:27 +00:00
Raymond Hettinger
042aa88bcc
gh-108322: Optimize statistics.NormalDist.samples() (gh-108324)
2023-08-27 08:59:40 -05:00
Matthew James Kraai
cd0a8aece9
Fix grammatical error in stringprep documentation ( #108414 )
...
Remove the word "them", which didn't make grammatical sense.
Co-authored-by: KRAAI, MATTHEW [VISUS] <mkraai@its.jnj.com>
2023-08-27 11:26:23 +00:00
R
7096a2be33
gh-105052:update timeit function's description ( #105060 )
...
---------
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2023-08-27 03:22:27 -04:00
qqwqqw689
1ac64237e6
gh-107453: Document errno.{ECANCELED,EOWNERDEAD,ENOTRECOVERABLE,ENOTSUP} ( #107486 )
...
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2023-08-27 05:19:49 +00:00
denballakh
e407cea193
gh-107406: Add better `struct.Struct` repr ( #107407 )
2023-08-26 15:24:16 +05:30
Philipp A
6895ddf6cb
gh-102211: Document `re.{Pattern,Match}`’s existence ( #102212 )
...
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-08-25 10:53:11 -06:00
Erlend E. Aasland
cb1184280b
Docs: Resolve Sphinx warnings in dis.rst ( #108476 )
...
- Link to the code objects reference
- Suppress link to deliberately undocumented builtins.__build_class__
- Suppress links for example methods
2023-08-25 13:28:47 +02:00
Corvin
24aa249a66
gh-107932: Fix dis module for bytecode that does not have an associated source line (GH-107988)
2023-08-25 09:31:26 +01:00
Peeyush Aggarwal
8d4052075e
gh-103384: Generalize the regex pattern `BaseConfigurator.INDEX_PATTERN` to allow spaces and non-alphanumeric characters in keys. (GH-103391)
...
Co-authored-by: Vinay Sajip <vinay_sajip@yahoo.co.uk>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Erlend E. Aasland <erlend@python.org>
2023-08-25 09:15:26 +01:00
Adam Turner
135098743a
GH-108202: Document ``calendar`` exceptions ( #108398 )
2023-08-24 23:56:54 -06:00
A
7f31676340
Fix a code snippet typo in asyncio docs ( #108427 )
2023-08-24 16:27:54 +00:00
Petr Viktorin
31b61d19ab
gh-108294: Add time.sleep audit event (GH-108298)
2023-08-23 11:00:22 +02:00
FrozenBob
79fdacc005
gh-108267: Dataclasses docs: Fix object.__setattr__ typo ( #108355 )
...
Fixed a sentence in dataclasses.rst
Changed "__setattr__" to "object.__setattr__" in a section that was specifically supposed to refer to the __setattr__ method of the object class. Also suppressed the link to the data model docs for __setattr__, since we're talking about a specific __setattr__ implementation, not __setattr__ methods in general.
2023-08-23 08:11:15 +01:00
Hadházy Tamás
13966da71b
gh-105857: Document that asyncio subprocess std{in,out,err} can be file handles ( #107986 )
...
stdin/out can be filehandles -> add to docs.
2023-08-22 20:41:56 +02:00
Hugo van Kemenade
35cb1605d0
Docs: Add link to skip to datetime's format codes ( #108027 )
2023-08-22 20:38:38 +02:00
Nikita Sobolev
e8ef0bdd8c
gh-107700: [Enum] Document that `EnumType` was added in 3.11 (GH-108260)
2023-08-22 07:34:18 -07:00
Erlend E. Aasland
893215a4e7
Docs: align the param spec of sqlite3.Connection methods with the implementation ( #108285 )
...
- no parameters of create_aggregate() are positional-only
- all parameters of create_collation() are positional-only
2023-08-22 13:20:58 +00:00
Erlend E. Aasland
1a1bfc2891
gh-105539: Emit ResourceWarning if sqlite3 database is not closed explicitly ( #108015 )
2023-08-22 13:10:29 +02:00
Erlend E. Aasland
7f87ebbc3f
gh-107801: Improve the accuracy of io.TextIOWrapper.seek docs ( #107933 )
...
Clearly document the supported seek() operations:
- Rewind to the start of the stream
- Restore a previous stream position (given by tell())
- Fast-forward to the end of the stream
2023-08-22 09:37:53 +02:00
temach
1cc391d9e2
gh-108224: Fix asyncio doc inconsistency ( #108230 )
...
(Spawning subprocesses does not require the event loop to run in the main thread -- only signal handling does.)
2023-08-21 18:08:04 +00:00
Irit Katriel
10a91d7e98
gh-108113: Make it possible to create an optimized AST ( #108154 )
2023-08-21 16:31:30 +00:00
Petr Viktorin
acbd3f9c5c
gh-107845: Fix symlink handling for tarfile.data_filter (GH-107846)
...
Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Lumír 'Frenzy' Balhar <frenzy.madness@gmail.com>
2023-08-21 12:56:46 +02:00
Erlend E. Aasland
f904aa4e1f
Docs: document 'manager' and '_log' attrs of logging.Logging ( #108145 )
...
Authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2023-08-20 16:01:10 +00:00
Erlend E. Aasland
c735e79afb
Docs: Fix Sphinx warnings in logging.rst (GH-108139)
...
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2023-08-20 12:19:07 +01:00
Erlend E. Aasland
29fa7afef9
Docs: Fix Sphinx warnings in sys.rst ( #108106 )
...
- Mark up named tuple attributes as attributes
- Remove links for external functions
- io.BufferedIOBase has no 'buffer' attribute;
remove the link and mark up using :attr:`!buffer`
- (Re)format some tables as bullet lists:
- sys._emscripten_info
- sys.hash_info
- sys.int_info
- sys.thread_info
- In the paragraphs mentioning 'f_trace_lines' and 'f_trace_opcodes',
add links to the frame objects reference.
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2023-08-20 13:09:33 +02:00
Tomas R
beffb30dc7
gh-107659: Improve wording of the description of `ctypes.pointer` and `ctypes.POINTER` ( #107769 )
...
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2023-08-20 10:54:06 +00:00
Hadházy Tamás
1a713eac47
gh-107619: Extend functools LRU cache docs with generators and async functions ( #107934 )
...
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2023-08-20 10:33:15 +00:00
Rafael Fontenelle
1dc0c58d2b
Fix misspellings in sysconfig docs ( #108156 )
2023-08-20 08:11:39 +00:00
Tin Tvrtković
a47c13cae5
gh-107980: fix doc role for asyncio.timeouts ( #108126 )
2023-08-19 13:14:38 -07:00
Erlend E. Aasland
c31c61c04e
Docs: Remove links to external C functions and macros in os.rst ( #108138 )
...
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2023-08-19 17:03:26 +00:00
Erlend E. Aasland
ca0c6c1f1e
Docs: format sys.float_info properly ( #108107 )
...
- Normalise capitalisation and punctuation
- Use attribute markup for named tuple attributes
- Use :c:macro: markup for C macros
- Use a list for the 'rounds' attribute values
- Use list-table, for better .rst readability
- Remove one unneeded sys.float_info.dig link
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2023-08-19 08:34:34 +00:00
Erlend E. Aasland
dd4442c8f5
gh-107801: Improve the accuracy of os.lseek docs ( #107935 )
...
- name the last parameter *whence*, like it is for seek() methods on
file objects
- add param docstrings
- structure the valid *whence* params
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2023-08-18 19:53:51 +02:00
Raymond Hettinger
6db39b1460
Minor code clean-up for the factor() recipe (GH-108114)
2023-08-18 12:13:58 -05:00
Victor Stinner
3ff5ef2ad3
gh-108014: Add Py_IsFinalizing() function ( #108032 )
...
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-08-18 12:34:41 +02:00
Erlend E. Aasland
cc58ec9724
Docs: emphasise warning and add accurate markups for sys.unraisablehook ( #108105 )
2023-08-18 12:16:22 +02:00
Erlend E. Aasland
02079b010c
gh-107801: Improve the docs of the SEEK_* constants ( #108099 )
2023-08-17 20:41:35 +00:00
Erlend E. Aasland
5c76899dad
Docs: Fix Sphinx warnings in io.rst ( #107903 )
...
- Mark up parameter and argument names properly
- If possible, link to docs for methods like `seek`, `tell`, `write`, `read`, etc.
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2023-08-17 19:19:01 +00:00
Erlend E. Aasland
8a19f225b9
gh-107801: Document SEEK_HOLE and SEEK_DATA ( #107936 )
...
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Antoine Pitrou <antoine@python.org>
2023-08-17 16:14:01 +02:00
Adam Turner
fbb7cbc0e9
GH-92584: Remove Installing Python Modules (Distutils version) ( #108020 )
2023-08-16 21:06:56 +00:00
Serhiy Storchaka
882cb79afa
gh-56166: Deprecate passing confusing positional arguments in re functions ( #107778 )
...
Deprecate passing optional arguments maxsplit, count and flags in
module-level functions re.split(), re.sub() and re.subn() as positional.
They should only be passed by keyword.
2023-08-16 13:35:35 -07:00
Adam Turner
f2a9dfdee9
GH-92584: Drop reference to Distutils in ``site.USER_BASE`` ( #108031 )
...
Drop reference to Distutils in ``site.USER_BASE``
2023-08-16 18:10:44 +02:00
Erlend E. Aasland
13c36dc9ae
gh-93057: Deprecate positional use of optional sqlite3.connect() params ( #107948 )
2023-08-15 08:09:56 +00:00
Romuald Brunet
a482e5bf00
gh-76913: Add "merge extras" feature to LoggerAdapter (GH-107292)
2023-08-15 08:23:54 +01:00
Vinay Sajip
cc2cf85d03
gh-107877: Update logging levels reference table with usage criteria. ( #107894 )
...
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-08-13 14:19:41 +01:00
Raymond Hettinger
2b6dc2accc
Add another example to the statistics docs (GH-107904)
2023-08-13 08:01:23 -05:00
shailshouryya
23a6db98f2
gh-107421: Clarify `OrderedDict` Examples and Recipes ( #107613 )
2023-08-10 23:43:13 -05:00
Brandt Bucher
a9caf9cf90
GH-105848: Simplify the arrangement of CALL's stack (GH-107788)
2023-08-09 18:19:39 +00:00
Raymond Hettinger
aab6f7173a
GH-100425: Note improved commutativity in sum(). (GH-107785)
2023-08-08 18:30:33 +01:00
Eric Snow
5dc825d504
gh-98154: Clarify Usage of "Reference Count" In the Docs (gh-107552)
...
PEP 683 (immortal objects) revealed some ways in which the Python documentation has been unnecessarily coupled to the implementation details of reference counts. In the end users should focus on reference ownership, including taking references and releasing them, rather than on how many reference counts an object has.
This change updates the documentation to reflect that perspective. It also updates the docs relative to immortal objects in a handful of places.
2023-08-07 15:40:59 -06:00
Erlend E. Aasland
8c9af6b9a0
Docs: Fix more Sphinx annotations in ctypes.rst ( #107708 )
2023-08-07 15:11:05 +02:00
Tomas R
6925c578a0
gh-107442: Document all valid types for ctypes _as_parameter_ ( #107443 )
2023-08-07 12:41:39 +02:00
Kamil Turek
4e242d1ffb
Improve cross-references in `runpy` docs ( #107673 )
...
- Add links to `__main__` and `sys.path` where appropriate
- Ensure each paragraph never has more than one link to the same thing, to avoid visual clutter from too many links
2023-08-06 21:11:16 +00:00
Erlend E. Aasland
71a7c96ffe
Docs: Fix Sphinx annotations in Doc/library/ctypes.rst ( #107672 )
...
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2023-08-06 10:23:50 +02:00
Terry Jan Reedy
9ebc6ecbc3
gh-107662: Switch 'any' and 'anext' in functions.rst ( #107663 )
...
Order was reversed in index at top, not in body.
2023-08-05 14:38:20 +00:00
Barney Gale
ec0a0d2bd9
GH-70303: Emit FutureWarning when pathlib glob pattern ends with `**` (GH-105413)
...
In a future Python release, patterns with this ending will match both files
and directories. Users may add a trailing slash to remove the warning.
2023-08-04 23:12:12 +00:00
Tomas R
09a8cc7984
gh-107600: Docs: Update ctypes.ArgumentError error message ( #107601 )
2023-08-04 16:34:04 +02:00
Alexandru Mărășteanu
c8872f4285
Clarify `Self` interaction with subclasses ( #107511 )
2023-08-01 13:20:25 -07:00
Michael The
a22ff8e11c
gh-105578: Document that `AnyStr` is deprecated in py313 ( #107116 )
...
It will not be removed until Python 3.18.
2023-07-31 15:43:53 +00:00
Michael The
f877b32b87
gh-105578: Add more usage examples to `typing.AnyStr` docs ( #107045 )
...
``typing.AnyStr`` has different semantics to ``str | bytes``, which often leads to user confusion
2023-07-31 16:23:08 +01:00
Dong-hee Na
a24e25d74b
gh-107427: Update the description of UNPACK_SEQUENCE (gh-107429)
2023-07-31 00:40:37 +09:00
Rakesh Sabale
89fd4f4a3f
gh-107422: Remove outdated `TypedDict` example from typing docs ( #107436 )
2023-07-29 17:04:46 +00:00
Serhiy Storchaka
f2d07d3289
gh-101100: Sphinx warnings: pick the low hanging fruits (GH-107386)
2023-07-29 08:48:10 +03:00
Eric Snow
cf63df88d3
gh-107307: Update the importlib Docs for PEP 684 (gh-107400)
2023-07-28 16:00:03 -06:00
Serhiy Storchaka
0aa58fa7a6
gh-107091: Fix some uses of :const: role (GH-107379)
...
It is for references, not for literals.
2023-07-28 13:26:28 +03:00
Daniele Procida
ccd4253752
gh-106996: Rewrite turtle explanation ( #107244 )
...
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-07-27 11:02:19 +03:00
Serhiy Storchaka
6d5b6e71c8
gh-107091: Fix some uses of :c:type: role (GH-107138)
2023-07-26 22:29:23 +03:00
Roman Yurchak
737d1da074
Document that `os.link()` is not available on Emscripten (GH-104822)
2023-07-26 11:38:59 -07:00