Stephen Morton
3944c7839e
Add __hash__ for a bunch of types that set it to None ( #13286 )
2024-12-23 23:16:22 -08:00
Stephen Morton
6b98467337
Add xml.sax.expatreader ( #13188 )
2024-12-05 20:16:49 +01:00
Stephen Morton
971f0c64c6
Add xml.__all__, remove import not existing at runtime ( #13048 )
2024-11-20 13:56:44 +01:00
Stephen Morton
ddb57608fd
move pyexpat.ExpatError to xml.parsers.expat.ExpatError ( #11168 )
...
This matches the name reported by the cass at runtime.
related to https://github.com/python/typeshed/issues/11141
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com >
2024-10-01 18:45:11 -07:00
Max Muoto
7eac47455a
Use Final for xml constants ( #12455 )
2024-08-05 11:13:56 +02:00
Max Muoto
0df6028dc8
Use Final for Constant Literals in the stdlib ( #12332 )
...
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com >
2024-07-15 18:07:34 +01:00
Max Muoto
0fc33ace47
Update xml.etree.ElementTree for 3.13 ( #12277 )
2024-07-04 12:31:25 -07:00
Abel Cheung
578b815ef7
Add missing arg annotation for xml.sax.handler.ContentHandler ( #12122 )
2024-06-20 00:40:58 -07:00
Adam Dangoor
4a33b2f3a0
Add some types for xml.dom.minidom.Text ( #11725 )
2024-04-06 14:45:24 +02:00
Sebastian Rittau
630b49a291
Replace various Incompletes in stdlib ( #11673 )
...
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com >
2024-04-01 15:20:01 +01:00
Sebastian Rittau
027115e624
Remove bare incompletes ( #11670 )
2024-03-30 18:35:57 -07:00
Shantanu
13265a9347
xml: update for security fix ( #11648 )
...
Fixes #11643
2024-03-22 13:07:05 -07:00
Shantanu
470a13ab09
Use PEP 570 syntax in stdlib ( #11250 )
2024-03-09 14:50:16 -08:00
Jelle Zijlstra
bba8cbd6f8
stdlib: more deprecations ( #11009 )
...
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com >
2024-02-18 06:50:29 -08:00
Sebastian Rittau
53a8193d64
Update typing_extensions imports in stdlib ( #11244 )
...
Co-authored-by: AlexWaygood <alex.waygood@gmail.com >
2024-01-05 08:15:19 -08:00
Sebastian Rittau
23604858a6
Remove Python 3.7 branches ( #11238 )
2024-01-05 11:39:39 +01:00
Stephen Morton
1574ff3973
add xml.sax._exceptions module ( #11147 )
2023-12-11 19:48:30 +01:00
Alex Waygood
10febc4fe0
stdlib: remove unused type: ignore comments ( #11061 )
2023-11-23 14:00:07 +01:00
Andrey Rakhmatullin
7b18a0be91
Fix type hint for xml.sax.saxutils.XMLGenerator.__init__(). ( #10979 )
...
The `out` parameter accepts objects with `write(__o: bytes)`, not `write(__o: str)` methods.
2023-11-06 14:31:50 +01:00
Avasam
3a56e0034c
xml.etree: Fix tag param in __init__ ( #10968 )
2023-11-03 14:50:49 +01:00
Screwtapello
49b717ca52
stdlib/xml/sax: Add type annotations ( #10606 )
...
* stdlib/xml/sax: Type annotations for commonly used methods.
* stdlib/xml/sax: More annotations.
It turns out SAX's definition of a "qname" is exactly the opposite of
ElementTree's. With that understanding, let's annotate the Attributes*Impl
classes too.
* stdlib/xml/sax: I better understand what AttributesNSImpl is doing now.
* Update third-party library stubs to agree with the new SAX annotations.
2023-09-22 20:08:13 -07:00
Alex Waygood
03b4bb9cce
Stdlib: add many missing __hash__ and __eq__ methods ( #10464 )
2023-07-17 14:21:02 +02:00
Wesley Collin Wright
cedf3b5684
stdlib/xml: fix return types for toxml/toprettyxml methods ( #10061 )
2023-04-22 16:36:57 -06:00
Ali Hamdan
6bb40e95ac
xml: NodeList.length is read-only ( #9994 )
...
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com >
2023-03-31 23:55:46 +01:00
Sebastian Rittau
f6f1fa3df4
[minidom] Annotate getElement* methods correctly ( #9919 )
2023-03-22 15:17:36 +00:00
Francesc Elies
d13bcbb76e
[minidom] add missing return types ( #9917 )
2023-03-22 12:21:05 +01:00
Alex Waygood
dd2818a41d
Stdlib: add container default values ( #9909 )
2023-03-21 09:12:34 +01:00
Alex Waygood
257e287fec
Stdlib: correct many parameter names ( #9815 )
2023-03-04 09:53:12 +00:00
Alex Waygood
fbc092b4cd
Stdlib: add defaults for several functions that delegate kwargs to other functions at runtime ( #9791 )
2023-02-21 23:31:25 -08:00
Avasam
3fc2f27990
Add missing types in xml.dom.minidom ( #9731 )
2023-02-19 21:49:00 +00:00
Will Frey
48ef9eace8
Update xml.sax.parse to accept StrPath ( #9708 )
2023-02-13 17:51:47 +01:00
Alex Waygood
9ed39d8796
Use typing_extensions.Self in the stdlib ( #9694 )
2023-02-09 09:12:13 +00:00
Alex Waygood
1d7dda7fa1
stdlib: Add defaults for positional-only parameters ( #9655 )
2023-02-01 21:44:08 +00:00
Alex Waygood
33a62ae42d
Add more defaults to the stdlib ( #9606 )
...
Continuing work towards #8988 .
The first five commits were created using stubdefaulter on various Python versions; the following commits were all created manually by me to fix various problems. The main things this adds that weren't present in #9501 are:
- Defaults in Windows-only modules and Windows-only branches (because I'm running a Windows machine)
- Defaults in non-py311 branches
- Defaults for float parameters
- Defaults for overloads
2023-01-29 01:51:23 +00:00
Jelle Zijlstra
ddfaca3200
stdlib: add argument default values ( #9501 )
2023-01-18 09:37:34 +01:00
Avasam
c70d303985
Audit stdlib object annotations ( #9519 )
2023-01-17 15:40:00 +00:00
Avasam
aad1a14890
Use the FileDescriptorOrPath alias consistently in the stdlib ( #9513 )
2023-01-12 18:14:48 +00:00
Ben Blank
f5459640f8
Add None as a valid type in SAXParseException's second argument ( #9162 )
...
Closes #9161
2022-11-11 12:18:22 -08:00
Jelle Zijlstra
ec4ec33639
xml: improve bytes types ( #9110 )
...
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com >
2022-11-10 20:43:26 -08:00
Nikita Sobolev
62a6c3d616
Annotate known magic-method return types ( #9131 )
2022-11-08 18:28:42 +00:00
Nikita Sobolev
86f9d93003
Update pyright to 1.1.278 ( #9077 )
...
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com >
2022-11-03 15:32:10 +00:00
Nikita Sobolev
380022c650
Remove empty __init__ methods ( #8816 )
2022-09-30 13:08:41 +01:00
Alex Waygood
976fdae300
xml stubs: Any -> Incomplete (#8576 )
2022-08-22 16:42:37 +01:00
Kevin Kirsche
269c07589a
Add more annotations to xml.dom.minidom and xml.sax.handler ( #8590 )
2022-08-22 16:20:34 +01:00
Kevin Kirsche
fb62ccabf5
Add missing annotations for xml.dom.minidom.DOMImplementation ( #8556 )
...
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com >
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-08-20 20:33:40 +01:00
Kevin Kirsche
308291033f
xml: add missing xml.dom.minidom.*.nodeType type ( #8557 )
2022-08-18 19:56:55 -07:00
Nikita Sobolev
bcd770bad3
Always return True from xml.dom.minidom.Node.__bool__ ( #8480 )
2022-08-04 12:23:34 +02:00
Tetsuo Kiso
9fe771f31d
xml.dom.minidom: add more missing type annotations to methods on Element ( #8355 )
2022-07-21 17:45:52 +02:00
Tetsuo Kiso
10bc4b0584
xml.dom.minidom: add missing type annotation of Element.getAttribute ( #8350 )
2022-07-21 08:18:58 +02:00
Alex Waygood
6903041744
Use CamelCase for type aliases in xml.etree.ElementPath.pyi ( #8335 )
2022-07-19 12:04:43 -07:00