summaryrefslogtreecommitdiffstats
path: root/Doc/library
Commit message (Collapse)AuthorAgeFilesLines
* [3.12] Run more `inspect.rst` code snippets in CI (GH-112654) (#112655)Miss Islington (bot)2023-12-031-28/+38
| | | | | | Run more `inspect.rst` code snippets in CI (GH-112654) (cherry picked from commit 4ed46d224401243399b41c7ceef4532bd249da27) Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* [3.12] gh-112316: improve docs for `inspect.signature` and ↵Alex Waygood2023-12-031-33/+51
| | | | | `inspect.Signature` (#112631) (#112649) (cherry-picked from commit fc9e24b01fb7da4160b82cef26981d72bb678c13)
* [3.12] gh-112316: Improve docs of `inspect.signature` and ↵Alex Waygood2023-12-021-19/+18
| | | | | | | `Signature.from_callable` (#112317) (#112629) gh-112316: Improve docs of `inspect.signature` and `Signature.from_callable` (#112317) Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
* [3.12] gh-110930: Correct book title by Alan D. Moore (GH-112490) (#112523)Miss Islington (bot)2023-11-291-2/+2
| | | | Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
* [3.12] Docs: fix markup for `importlib.machinery.NamespaceLoader` ↵Miss Islington (bot)2023-11-281-1/+1
| | | | | | | | (GH-112479) (#112481) Docs: fix markup for `importlib.machinery.NamespaceLoader` (GH-112479) (cherry picked from commit 2e632fa07d13a58be62f59be4e656ad58b378f9b) Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* [3.12] Correct documentation for AF_PACKET (GH-112339) (#112477)Miss Islington (bot)2023-11-271-2/+1
| | | | | | | | | | | | Correct documentation for AF_PACKET (GH-112339) Protocol in the address tuple should *not* be in the network-byte-order, because it is converted internally[1]. [1] https://github.com/python/cpython/blob/89ddea4886942b0c27a778a0ad3f0d5ac5f518f0/Modules/socketmodule.cGH-L2144 network byte order doesn't make sense for a python level int anyways. It's a fixed size C serialization concept. (cherry picked from commit 562d7149c6944fb9e4c7be80664b2f2d5a12a3ea) Co-authored-by: Eugene Toder <eltoder@users.noreply.github.com>
* [3.12] gh-68166: Tkinter: Add tests and examples for element_create() ↵Miss Islington (bot)2023-11-271-2/+16
| | | | | | | | | | (GH-111453) (GH-111857) * 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. (cherry picked from commit 005d1e8fc81539c60c6b21ebba34de3edd5bb232) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.12] GH-101100: Fix reference warnings for ``socket`` methods (GH-110114) ↵Miss Islington (bot)2023-11-271-12/+12
| | | | | | | (#112455) Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com> Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.12] Docs: fix typo in doc for sqlite3.Cursor.execute (GH-112442) (#112444)Miss Islington (bot)2023-11-271-1/+1
| | | | | | Docs: fix typo in doc for sqlite3.Cursor.execute (GH-112442) (cherry picked from commit fb79e1ed4a985a487a02bb8585cc1bd2933dfa7c) Co-authored-by: Tom Levy <tomlevy93@gmail.com>
* [3.12] gh-101100: Fix Sphinx reference warnings (GH-112416) (#112420)Hugo van Kemenade2023-11-265-8/+21
| | | | Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
* [3.12] gh-101100 : Fix Sphinx warnings in `library/doctest.rst` (GH-112399) ↵Miss Islington (bot)2023-11-252-21/+30
| | | | | | | (#112402) Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com> Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
* [3.12] gh-101100: Define `_tkinter` module to fix references (GH-112382) ↵Miss Islington (bot)2023-11-251-0/+3
| | | | | | | | | | (#112392) gh-101100: Define `_tkinter` module to fix references (GH-112382) Define _tkinter module to fix references (cherry picked from commit 6b961b8ceaba372b78d03feaceb4837bf7236694) Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
* [3.12] gh-101100: Define `test.regrtest` module to fix references ↵Miss Islington (bot)2023-11-251-0/+3
| | | | | | | | | | (GH-112381) (#112390) gh-101100: Define `test.regrtest` module to fix references (GH-112381) Define test.regrtest module to fix references (cherry picked from commit d525d01e2794e7e736527eaa7ee309ca1252f5bd) Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
* [3.12] gh-59254: mention in open() doc that line buffering is for writing ↵Miss Islington (bot)2023-11-241-1/+1
| | | | | | | | (GH-112318) (#112378) gh-59254: mention in open() doc that line buffering is for writing (GH-112318) (cherry picked from commit fafae08cc7caa25f2bd6b29106b50ef76c3e296f) Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
* [3.12] Fix docstring and var name of itertools recipe (GH-112113) (#112310)Miss Islington (bot)2023-11-221-3/+3
| | | | | | | | | Fix docstring and var name of itertools recipe (GH-112113) `prepend()` works with arbitrary iterables, not only iterators. In fact, the example given uses a `list`, which is iterable, but not an iterator. (cherry picked from commit 6c47eaccfa2550c140a24bc6e520d968731d9689) Co-authored-by: Sebastian Rittau <srittau@rittau.biz>
* [3.12] GH-111963: Clarify sys.monitoring.free_tool_id's limitations (GH-112304)Miss Islington (bot)2023-11-211-0/+7
| | | | (cherry picked from commit 46500c42f09a8342efde48ad74327d5225158ff3) Co-authored-by: Tian Gao <gaogaotiantian@hotmail.com>
* [3.12] gh-110383: Fix documentation profile cumtime fix (GH-112221) (#112262)Miss Islington (bot)2023-11-191-2/+2
| | | | | Co-authored-by: Alex Ptakhin <me@aptakhin.name> Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
* [3.12] gh-112165: Fix typo in `__main__.py` (GH-112183) (#112184)Miss Islington (bot)2023-11-171-1/+1
| | | | | | | | gh-112165: Fix typo in `__main__.py` (GH-112183) Change '[2]' to '[1]' to get second argument. (cherry picked from commit 8cd70eefc7f3363cfa0d43f34522c3072fa9e160) Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
* [3.12] gh-111622: Fix doc for items views (GH-112051) (#112052)Miss Islington (bot)2023-11-141-5/+8
| | | | | | | They are set-like even when some values are not hashable, but work even better when all are. (cherry picked from commit e31d65e0b7bb6d6fee4e8df54e10976b4cfab1de) Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
* [3.12] gh-111681: minor fixes to typing doctests; remove unused imports in ↵Alex Waygood2023-11-131-1/+1
| | | | | | `test_typing` (#111682) (#112035) Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com> Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
* [3.12] gh-103791: handle `BaseExceptionGroup` in `contextlib.suppress()` ↵Miss Islington (bot)2023-11-101-3/+3
| | | | | | | | (GH-111910) (#111955) gh-103791: handle `BaseExceptionGroup` in `contextlib.suppress()` (GH-111910) (cherry picked from commit d61313bdb1eee3e4bb111e0b248ac2dbb48be917) Co-authored-by: Zac Hatfield-Dodds <zac.hatfield.dodds@gmail.com>
* [3.12] Glossary: Add "static type checker" (GH-111837) (#111854)Miss Islington (bot)2023-11-082-3/+4
| | | | | | | Glossary: Add "static type checker" (GH-111837) (cherry picked from commit 8ab7ad63086b1793c24b1c5aaa19b60fc0e6540e) Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com> Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* [3.12] gh-111729: update generic syntax for `typing.Concatenate` sample code ↵Miss Islington (bot)2023-11-071-5/+2
| | | | | | | in `Doc/library/typing.rst` (GH-111734) (#111814) (cherry picked from commit c3e19c3a62e82b9e77563e934059895b6230de6e) Co-authored-by: 方糖 <cubesugarcheese@qq.com>
* [3.12] gh-54434: Make difflib.rst doctests pass. (GH-111677) (#111678)Miss Islington (bot)2023-11-031-3/+5
| | | | | | gh-54434: Make difflib.rst doctests pass. (GH-111677) (cherry picked from commit 0d3df272fbd131bff7f02d4d4279ad1e35081121) Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
* [3.12] Fix typo in documentation of `SysLogHandler.createSocket` (GH-111665) ↵Miss Islington (bot)2023-11-021-3/+1
| | | | | (#111669) (cherry picked from commit 489b80640ff9c4f10b25da6d562b06c62a10a76b)
* [3.12] gh-111576: Improve documention for tkinter.messagebox (GH-111578) ↵Miss Islington (bot)2023-11-011-10/+165
| | | | | | | (GH-111597) (cherry picked from commit eaf67e37a2da28c1241362e3b4ff1202945c83c5) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.12] gh-111282: Fix NamedTemporaryFile example code (GH-111283) (GH-111579)Miss Islington (bot)2023-10-311-7/+7
| | | | | (cherry picked from commit 102685c4c8481ec5d9c132fcf06b46057e815969) Co-authored-by: Krzysiek Karbowiak <krzysztof.karbowiak@interia.pl>
* [3.12] gh-102249: Expand sys.call_tracing documentation (GH-102806) (#111557)Miss Islington (bot)2023-10-311-3/+17
| | | | | Co-authored-by: Quentin Peter <impact27@users.noreply.github.com> Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
* [3.12] gh-93607: document `root` attribute of `iterparse` (GH-99410) (#111555)Miss Islington (bot)2023-10-311-1/+3
| | | | | | Co-authored-by: Prometheus3375 <35541026+Prometheus3375@users.noreply.github.com> Co-authored-by: Stanley <46876382+slateny@users.noreply.github.com> Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
* [3.12] gh-106861: Docs: Add availability directives to all Unix-only modules ↵Miss Islington (bot)2023-10-319-6/+14
| | | | | | (GH-108975) (#111553) Co-authored-by: xzmeng <aumo@foxmail.com>
* [3.12] gh-111165: Remove documentation for moved functions (GH-111467) ↵Miss Islington (bot)2023-10-291-10/+0
| | | | | | | (GH-111471) (cherry picked from commit 4d6bdf8aabcc92303041420a96750fbc52c9f213) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.12] gh-101100: Fix sphinx warnings in `library/asyncio-eventloop.rst` ↵Miss Islington (bot)2023-10-292-6/+15
| | | | | | | | | | | | | | | | | | | | | | (GH-111222) (#111469) 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 * Update asyncio-eventloop.rst * Update socket.rst --------- (cherry picked from commit 46389c32750f79ab3f398a0132cd002e8a64f809) Co-authored-by: Nikita Sobolev <mail@sobolevn.me> Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
* [3.12] gh-79033: Try to fix asyncio.Server.wait_closed() again (GH-111336) ↵Miss Islington (bot)2023-10-281-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#111424) 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 --------- (cherry picked from commit 26553695592ad399f735d4dbaf32fd871d0bb1e1) Co-authored-by: Guido van Rossum <guido@python.org> Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
* [3.12] gh-111276: Clarify docs and comments about the role of LC_CTYPE ↵Miss Islington (bot)2023-10-271-5/+10
| | | | | | | | | | | | | (GH-111319) (#111391) 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.htmlGH-deprecated-string-functions Also, fix a comment in logging about locale-specific behavior of `str.lower()`. (cherry picked from commit 6d42759c5e47ab62d60a72b4ff15d29864554579) Co-authored-by: Łukasz Langa <lukasz@langa.pl> Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
* [3.12] gh-111343: Fix `itertools` docs: `start` arg is optional for `count` ↵Miss Islington (bot)2023-10-271-1/+1
| | | | (gh-111344) (gh-111385)
* [3.12] gh-111187: Postpone removal version for locale.getdefaultlocale() to ↵Hugo van Kemenade2023-10-271-1/+1
| | | | 3.15 (GH-111188) (#111323)
* [3.12] Docs: Add `restart_events()` and positional arg semantics for ↵Miss Islington (bot)2023-10-251-8/+13
| | | | | | | | | `sys.monitoring` (GH-111291) (#111335) Docs: Add `restart_events()` and positional arg semantics for `sys.monitoring` (GH-111291) (cherry picked from commit 3f84a19e6291db682fc9a570e7612e80e2ffbbb5) Co-authored-by: Tian Gao <gaogaotiantian@hotmail.com> Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* [3.12] gh-108590: Improve sqlite3 docs on encoding issues and how to handle ↵Miss Islington (bot)2023-10-251-33/+50
| | | | | | | | | | | | | | | those (GH-108699) (#111324) Add a guide for how to handle non-UTF-8 text encodings. Link to that guide from the 'text_factory' docs. (cherry picked from commit 1262e41842957c3b402fc0cf0a6eb2ea230c828f) Co-authored-by: Erlend E. Aasland <erlend@python.org> 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>
* [3.12] gh-111165: Move test running code from test.support to libregrtest ↵Serhiy Storchaka2023-10-251-28/+0
| | | | | | | (GH-111166) (GH-111316) Remove no longer used functions run_unittest() and run_doctest() from the test.support module. (cherry picked from commit f6a45a03d0e0ef6b00c45a0de9a606b1d23cbd2f)
* [3.12] Fix first parameter name in `tool` functions from `sys.monitoring` ↵Miss Islington (bot)2023-10-241-9/+9
| | | | | | | | (GH-111286) (#111290) Fix first parameter name in `tool` functions from `sys.monitoring` (GH-111286) (cherry picked from commit 8b44f3c54bb4f99445c108bc0240c458adae9c6f) Co-authored-by: Pavel Karateev <lancelote.du.lac@gmail.com>
* [3.12] GH-111182: Update EnumType.__contains__ docs (GH-111184) (GH-111281)Miss Islington (bot)2023-10-241-3/+4
| | | | | | GH-111182: Update EnumType.__contains__ docs (GH-111184) (cherry picked from commit c0ea67dd0d67a8ac59c61c777eae26288d3ac0f6) Co-authored-by: InSync <122007197+InSyncWithFoo@users.noreply.github.com>
* [3.12] Revert "Fix a code snippet typo in asyncio docs (GH-108427)" ↵Miss Islington (bot)2023-10-241-1/+1
| | | | | | | | | | | | | | | | | | (GH-111271) (GH-111272) Revert "Fix a code snippet typo in asyncio docs (GH-108427)" (GH-111271) This reverts commit 7f316763402a7d5556deecc3acd06cb719e189b3. 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 :) (cherry picked from commit c7d68f907ad3e3aa17546df92a32bddb145a69bf) Ref: https://github.com/python/cpython/pull/108427#-issuecomment-1777525740 Co-authored-by: Zachary Ware <zach@python.org>
* [3.12] gh-111151: Convert monospaced directives to :ref: (GH-111152) (#111269)Miss Islington (bot)2023-10-243-8/+20
| | | | | | gh-111151: Convert monospaced directives to :ref: (GH-111152) (cherry picked from commit 1198076447f35b19a9173866ccb9839f3bcf3f17) Co-authored-by: InSync <122007197+InSyncWithFoo@users.noreply.github.com>
* [3.12] Fix typo in sys docs (GH-111196) (#111248)Miss Islington (bot)2023-10-241-1/+1
| | | | | Co-authored-by: James Tocknell <aragilar+github@gmail.com> Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
* [3.12] Fix a code snippet typo in asyncio docs (GH-108427) (#111245)Miss Islington (bot)2023-10-241-1/+1
| | | | Co-authored-by: A <5249513+Dumeng@users.noreply.github.com>
* [3.12] gh-101100: Fix Sphinx warnings for `fileno` (GH-111118) (#111226)Miss Islington (bot)2023-10-236-10/+48
| | | | Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
* [3.12] typo: missing line of output in pull parser example (GH-111068) (#111217)Miss Islington (bot)2023-10-231-0/+1
| | | | Co-authored-by: Don Patterson <37046246+don-patterson@users.noreply.github.com>
* [3.12] gh-106310 - document the __signature__ attribute (GH-106311) (#111145)Miss Islington (bot)2023-10-231-0/+5
| | | | | Co-authored-by: Gouvernathor <44340603+Gouvernathor@users.noreply.github.com> Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* [3.12] gh-101100: Fix sphinx warnings in `library/asyncio-dev.rst` ↵Miss Islington (bot)2023-10-221-3/+11
| | | | | | | | | | | | | | | | | | (GH-111179) (#111185) 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 --------- (cherry picked from commit 8c689c9b88426384a9736c708701923a1ab1da79) Co-authored-by: Nikita Sobolev <mail@sobolevn.me> Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
* [3.12] gh-101100: Fix sphinx warnings in `library/codecs.rst` (GH-110979) ↵Miss Islington (bot)2023-10-201-33/+38
| | | | | | | (#111070) Co-authored-by: Nikita Sobolev <mail@sobolevn.me> Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>