Tobias Rautenkranz
60743a9a7e
gh-57141: Add dircmp shallow option (GH-109499)
...
Co-authored-by: Steve Ward <planet36@gmail.com>
Co-authored-by: Sanyam Khurana <8039608+CuriousLearner@users.noreply.github.com>
2024-03-04 17:27:43 +00:00
Raymond Hettinger
15dc2979bc
Consistently spell out *predicate* instead of *pred*. (gh-116308)
2024-03-04 15:51:29 +00:00
HarryLHW
4859ecb860
gh-116281: Remove wrong '\' from '\*' in some doc signatures ( #116282 )
2024-03-03 14:32:32 -05:00
AN Long
dac8ff4c40
gh-104711: Add security warning to the CGIHTTPRequestHandler document (GH-115915)
2024-03-01 17:25:14 +00:00
Serhiy Storchaka
05b04903a1
gh-116035: Document that both tzinfo and fold are ignored in comparisons if tzinfo is the same (GH-116187)
...
This mostly restores information removed in c12240ed28
(GH-114749).
2024-03-01 19:16:29 +02:00
Sebastian Pipping
6a95676bb5
gh-115398: Expose Expat >=2.6.0 reparse deferral API (CVE-2023-52425) (GH-115623)
...
Allow controlling Expat >=2.6.0 reparse deferral (CVE-2023-52425) by adding five new methods:
- `xml.etree.ElementTree.XMLParser.flush`
- `xml.etree.ElementTree.XMLPullParser.flush`
- `xml.parsers.expat.xmlparser.GetReparseDeferralEnabled`
- `xml.parsers.expat.xmlparser.SetReparseDeferralEnabled`
- `xml.sax.expatreader.ExpatParser.flush`
Based on the "flush" idea from https://github.com/python/cpython/pull/115138#issuecomment-1932444270 .
### Notes
- Please treat as a security fix related to CVE-2023-52425.
Includes code suggested-by: Snild Dolkow <snild@sony.com>
and by core dev Serhiy Storchaka.
2024-02-29 14:52:50 -08:00
Shantanu
c04a981ff4
Fix rendering of null character in ast.rst ( #116080 )
2024-02-29 14:09:06 -08:00
Carl Bordum Hansen
91c3c64237
gh-73580: Docs for tunnelling TLS through TLS (GH-22539)
2024-02-29 22:56:04 +02:00
Erlend E. Aasland
dbe44f150c
Docs: mark up NotImplemented using the :data: role throughout the docs ( #116135 )
2024-02-29 20:46:12 +00:00
Vinay Sajip
3b6f4cadf1
gh-115811: Update documentation to add some Logger attributes. (GH-116109)
2024-02-29 10:53:19 -08:00
Raymond Hettinger
a81d9509ee
Make the iter_except() recipe more compact. (gh-116132)
...
Only one example is needed
2024-02-29 11:30:18 -06:00
Shantanu
bea2795be2
gh-115881: Document feature_version limitations ( #115980 )
2024-02-29 11:09:09 +00:00
Erlend E. Aasland
fb2e17b642
gh-115937: Remove implementation details from inspect.signature() docs ( #116086 )
...
Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2024-02-29 09:42:28 +00:00
Ethan Furman
3ea78fd5bc
gh-115821: [Enum] better error message for calling super().__new__() (GH-116063)
...
docs now state to not call super().__new__
if super().__new__ is called, a better error message is now used
2024-02-28 15:17:49 -08:00
Raymond Hettinger
f484a2a748
Update an out-of-date example in the itertools recipe intro (gh-116082)
2024-02-28 17:11:05 -06:00
Raymond Hettinger
67c19e57b5
Improve all_equal() recipe (gh-116081)
...
Replace conjuction of next() calls with simpler len()/take() logic. Add key function.
2024-02-28 17:04:56 -06:00
Kerim Kabirov
6c1c94dc51
GH-115986 Reorder pprint docs and amend some references ( #116019 )
...
Introduce a new subsubsection, 'Functions', for module level functions,
and place it before the PrettyPrinter class reference.
Also:
- Fix pprint.pprint() references so they properly link to the module
level function.
- Add links to sys.stdout.
2024-02-28 20:43:05 +01:00
Jan Max Meyer
647053fed1
doc: Use super() in subclassed JSONEncoder examples (GH-115565)
...
Replace calls to `json.JSONEncoder.default(self, obj)`
by `super().default(obj)` within the examples of the documentation.
2024-02-28 14:54:12 +01:00
Erlend E. Aasland
a71e32ce8e
gh-78612: Mark up eval() using param list ( #115212 )
...
Also mention that the 'expression' parameter can be a string.
2024-02-28 14:03:50 +01:00
Jelle Zijlstra
ed4dfd8825
gh-105858: Improve AST node constructors ( #105880 )
...
Demonstration:
>>> ast.FunctionDef.__annotations__
{'name': <class 'str'>, 'args': <class 'ast.arguments'>, 'body': list[ast.stmt], 'decorator_list': list[ast.expr], 'returns': ast.expr | None, 'type_comment': str | None, 'type_params': list[ast.type_param]}
>>> ast.FunctionDef()
<stdin>:1: DeprecationWarning: FunctionDef.__init__ missing 1 required positional argument: 'name'. This will become an error in Python 3.15.
<stdin>:1: DeprecationWarning: FunctionDef.__init__ missing 1 required positional argument: 'args'. This will become an error in Python 3.15.
<ast.FunctionDef object at 0x101959460>
>>> node = ast.FunctionDef(name="foo", args=ast.arguments())
>>> node.decorator_list
[]
>>> ast.FunctionDef(whatever="you want", name="x", args=ast.arguments())
<stdin>:1: DeprecationWarning: FunctionDef.__init__ got an unexpected keyword argument 'whatever'. Support for arbitrary keyword arguments is deprecated and will be removed in Python 3.15.
<ast.FunctionDef object at 0x1019581f0>
2024-02-27 18:13:03 -08:00
Tahoma Software
3a72fc36f9
gh-115315: Update time.rst to include microseconds field (%f) in chart ( #115316 )
...
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2024-02-27 15:33:05 +02:00
Phil Elson
37f5d06b1b
Doc: Clarify the return type of Event.wait when timeout is used (GH-104168)
2024-02-26 11:53:20 +02:00
Antti Haapala
915d7dd090
gh-115091: Remove a left-over sentence that refers to Py_OptimizeFlag from ctypes documentation (GH-115092)
...
Remove a left-over sentence that refers to Py_OptimizeFlag
Remove a left-over sentence that refers to an example that was present in Python 3.10 and was using ``Py_OptimizeFlag``.
2024-02-26 10:22:54 +01:00
Terry Jan Reedy
de0b4f95cb
gh-115921: Change 'equation' to 'expression' in random.rst ( #115927 )
...
In uniform function entry.
2024-02-25 22:50:49 -05:00
Barney Gale
e921f09c8a
GH-101112: Add "pattern language" section to pathlib docs ( #114030 )
...
Explain the `full_match()` / `glob()` / `rglob()` pattern language in its own section. Move `rglob()` documentation under `glob()` and reduce duplicated text.
2024-02-26 00:19:03 +00:00
Raymond Hettinger
6d34eb0e36
gh-115532: Add kernel density estimation to the statistics module (gh-115863)
2024-02-25 17:46:47 -06:00
Skip Montanaro
84a275c4a2
gh-101100: Fix broken xrefs in fcntl module doc ( #115691 )
...
* clean up fcntl module doc
* simplify
* a few changes, based on suggestion by CAM-Gerlach
* nitpick ignore for a couple other C functions mentioned in the fcntl module doc
* more changes, especially related to LOCK_* constants
* :data: back to :const:
* Apply suggestions from code review
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
---------
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
2024-02-25 12:02:18 -08:00
Matan Perelman
c40b5b97fd
bpo-31116: Add Z85 variant to base64 (GH-30598)
...
Z85 specification: https://rfc.zeromq.org/spec/32/
2024-02-25 19:17:54 +02:00
Laurie O
9402ea63f7
gh-96471: Correct docs for queue shutdown ( #115838 )
2024-02-25 16:53:21 +00:00
Raymond Hettinger
a0a8d9ffe0
gh-113479: Link to workaround for subtle issue with takewhile() (gh-115890)
2024-02-25 06:32:14 -06:00
mauricelambert
cb287d3421
gh-103417: Fix the scheduler example (GH-111497)
...
Arguments to enterabs() are specified as Unix time.
If the scheduler use the time.monotonic timer, the code will take
decades to complete.
2024-02-25 13:55:57 +02:00
Oh seungmin
5770006ffa
Add an example of of custom `__repr__` ( #112761 )
...
Added to repr entry in Doc/library/functions.rst.
---------
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2024-02-25 02:59:35 -05:00
Adorilson Bezerra
f7455864f2
Erase some unnecessary quotes on data model doc ( #113521 )
...
Thanks to Pedro Arthur Duarte (pedroarthur.jedi at gmail.com) for help with this bug.
2024-02-24 19:16:19 -05:00
jmcb
ef6074b352
Insert missing apostrophes in ctypes documentation ( #115090 )
2024-02-23 14:55:47 -08:00
Stanley
462a2fc09d
gh-54358: Clarify data chunking in pyexpat (GH-31629)
...
Co-authored-by: Éric Araujo <merwok@netwok.org>
2024-02-23 18:57:08 +00:00
NewUserHa
a3859422d1
Update http.cookiejar document for cookie object attributes (GH-101885)
2024-02-22 19:08:04 +00:00
Sebastian Pipping
fbd40ce46e
gh-115399: Document CVE-2023-52425 under "XML vulnerabilities" (GH-115400)
...
Doc/library/xml.rst: Document CVE-2023-52425 under "XML vulnerabilities"
2024-02-21 12:26:16 +01:00
Victor Westerhuis
e1fdc3c323
gh-104061: Add socket.SO_BINDTOIFINDEX constant (GH-104062)
...
Add socket.SO_BINDTOIFINDEX constant
This socket option avoids a race condition between SO_BINDTODEVICE and network interface renaming.
2024-02-20 23:08:15 +02:00
talcs
e71468ba4f
gh-112020: Document the meaning of empty bytes returned by socket.recv() (GH-112055)
2024-02-20 16:54:33 +02:00
Naglis Jonaitis
57d31ec359
Fix typo in multiprocessing docs ( #115650 )
2024-02-19 18:19:14 +00:00
Serhiy Storchaka
8f602981ba
gh-115664: Fix versionadded and versionchanged directives in multiprocessing.rst (GH-115665)
2024-02-19 18:03:42 +00:00
Brian Schubert
b02ab65e80
gh-115664: Fix chronological ordering of versionadded and versionchanged directives ( #115676 )
2024-02-19 17:54:54 +00:00
Daniel Haag
d504968983
gh-115652: Fix indentation in the documentation of multiprocessing.get_start_method (GH-115658)
2024-02-19 14:26:23 +00:00
0xflotus
cbe809dfa9
gh-83648: Add missing `deprecated` arg in argparse.rst (GH-115640)
2024-02-19 10:29:32 +02:00
Masayuki Moriyama
1476ac2c58
gh-102388: Add windows_31j to aliases for cp932 codec ( #102389 )
...
The charset name "Windows-31J" is registered in the IANA Charset Registry[1]
and is implemented in Python as the cp932 codec.
[1] https://www.iana.org/assignments/charset-reg/windows-31J
Signed-off-by: Masayuki Moriyama <masayuki.moriyama@miraclelinux.com>
2024-02-19 17:01:35 +09:00
Simon A. Eugster
177b9cb52e
Docs: Add explanation about little/big endian ( #109841 )
...
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
2024-02-18 23:50:09 -08:00
Shantanu
edea0e7d99
gh-114709: Mark commonpath behaviour as changed in 3.13 ( #115639 )
2024-02-18 14:08:50 -08:00
Daler
0c80da4c14
gh-115572: Move `codeobject.replace()` docs to the data model ( #115631 )
2024-02-18 14:13:46 +00:00
Sebastian Rittau
371c970886
gh-114709: Fix exceptions raised by posixpath.commonpath ( #114710 )
...
Fix the exceptions raised by posixpath.commonpath
Raise ValueError, not IndexError when passed an empty iterable. Raise
TypeError, not ValueError when passed None.
2024-02-18 00:24:58 -08:00
Thomas Grainger
04005f5021
Document use of ANY in test assertions (GH-94060)
2024-02-17 13:13:34 +00:00