Commit Graph

52 Commits

Author SHA1 Message Date
Max Muoto
7eac47455a Use Final for xml constants (#12455) 2024-08-05 11:13:56 +02:00
Max Muoto
0fc33ace47 Update xml.etree.ElementTree for 3.13 (#12277) 2024-07-04 12:31:25 -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
Avasam
3a56e0034c xml.etree: Fix tag param in __init__ (#10968) 2023-11-03 14:50:49 +01:00
Alex Waygood
03b4bb9cce Stdlib: add many missing __hash__ and __eq__ methods (#10464) 2023-07-17 14:21:02 +02: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
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
aad1a14890 Use the FileDescriptorOrPath alias consistently in the stdlib (#9513) 2023-01-12 18:14:48 +00: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
Alex Waygood
6903041744 Use CamelCase for type aliases in xml.etree.ElementPath.pyi (#8335) 2022-07-19 12:04:43 -07:00
Alex Waygood
e2ce7c6344 stdlib: audit more callback annotations (#8209) 2022-07-19 07:07:25 -07:00
Alex Waygood
6348a58b8b Import Match and Pattern from re, not typing (#8277) 2022-07-12 15:32:48 +02:00
Alex Waygood
fbddd2c4e2 stdlib: enforce CamelCase for type alias names (#8255) 2022-07-07 17:45:23 +02:00
Prometheus3375
91d6383d9d Change return type of XMLPullParser.read_events() (#8076) 2022-06-14 19:15:29 +01:00
Alex Waygood
4941ac0263 Use the Any trick for xml.etree.ElementTree.getroot() (#8069)
Closes #7770
2022-06-14 18:31:19 +03:00
Alex Waygood
67828bd598 xml.etree.ElementTree.Element: remove inheritance from MutableSequence (#8056) 2022-06-13 12:22:28 +02:00
Alex Waygood
b88ea4a499 Simplify __all__ for unittest and xml.etree (#8029) 2022-06-07 12:03:52 -07:00
Prometheus3375
e833b5a095 Fix typing for XMLPullParser.feed() (#7695)
Closes #7681
2022-04-26 11:09:25 +02:00
Alex Waygood
97a74bc1aa Import from collections.abc wherever possible (#7635) 2022-04-18 12:50:37 +02:00
Alex Waygood
740193a8fc Use TypeAlias where possible for type aliases (#7630) 2022-04-15 18:01:00 -07:00
Alex Waygood
3ab250eec8 Use PEP 604 syntax wherever possible (#7493) 2022-03-16 16:01:33 +01:00
Alex Waygood
58e505eeb2 Add __all__ for modules beginning with 'u', 'x', 'w' and 'z' (#7374) 2022-02-23 23:04:21 +01:00
Rogdham
63c20e3ce7 xml: use SupportsRead/SupportsWrite instead of IO (#7241) 2022-02-16 19:02:30 -08:00
Alex Waygood
1091521f60 stdlib: Add several missing __(deep)copy__ methods (#7242) 2022-02-16 18:57:41 -08:00
Alex Waygood
fbc279e3f5 stdlib: Add many missing dunder overrides (#7231) 2022-02-16 06:25:47 -08:00
Alex Waygood
7595e2e79b Fix positional-only differences in xml (#7225) 2022-02-15 06:22:31 -08:00
Alex Waygood
66a229b709 stdlib: Add several missing comparison methods (#7202) 2022-02-14 11:09:52 -08:00
Shantanu
b88a6f19cd Upgrade black version (#7089) 2022-01-30 16:27:06 -08:00
Nikita Sobolev
92d135a37c Use TypeGuard in ElementTree.pyi (#7059)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2022-01-28 11:33:45 +02:00
Nikita Sobolev
9a89e09753 Removed unused # noqa: F403 (#7032) 2022-01-25 09:21:11 +01:00
Alex Waygood
8d5d2520ac Use PEP 585 syntax wherever possible (#6717) 2021-12-28 11:31:43 +01:00
Sebastian Rittau
3fb2bcd4c1 Restore stubtest 0.930 (#6663) 2021-12-22 20:18:19 -08:00
Alex Waygood
ba2bfae4f9 Add xml.etree.ElementInclude.LimitedRecursiveIncludeError (#6547) 2021-12-08 16:27:56 +01:00
Alex Waygood
1fdd7e40af Add missing objects to xml.etree.ElementTree (#6540)
Co-authored-by: Akuli <akuviljanen17@gmail.com>
2021-12-08 15:02:54 +02:00
Alex Waygood
98af7d667f Improve stubs for sequence types (#6386) 2021-11-26 19:09:38 -08:00
Akuli
994b69ef8f Use lowercase tuple where possible (#6170) 2021-10-14 17:18:19 -07:00
Akuli
ce11072dbe Big diff: use lower-case list and dict (#5888) 2021-08-08 09:26:35 -07:00
Akuli
ee487304d7 Big diff: Use new "|" union syntax (#5872) 2021-08-08 11:05:21 +02:00
Sebastian Rittau
f0bf6eebbd AnyStr cleanup (#5487)
* Replace all uses of StrPath, BytesPath, and AnyPath in Python 2 stubs.
* Add StrOrBytesPath as preferred alias for AnyPath.
* Replace all remaining AnyPath instances with StrOrBytesPath.
* Mark AnyPath as obsolete.

Part of #5470
2021-05-17 20:45:48 +02:00
Sebastian Rittau
841a365284 Remove compatibility aliases (#5464)
* Remove compatibility aliases

Remove a few instances of Text

Use aliases from _typeshed

* Remove unused imports
2021-05-15 20:49:20 +03:00
Akuli
17dcea4a68 Akuli and srittau: Remove Python 2 branches from Python 3 stubs (#5461)
* run script and do some manual changes (Akuli)

* do the whole thing manually (srittau)

* merge changes (Akuli)

Co-authored-by: Sebastian Rittau <srittau@rittau.biz>
2021-05-15 15:33:39 +03:00
hatal175
413614aa83 xml stubtest exceptions (#5161)
* Explaining xml stubtest exceptions

* Fix 3.6/3.7 ExternalEntityParserCreate

* Fix typos and formatting

* Missing return type

* Reverting ExternalEntityParserCreate change to see error

* Remove unused sys import

* Readd ExternalEntityParserCreate with explanations
2021-04-08 17:43:51 -07:00
naglis
6a8b6cc674 Add stub for xml.etree.ElementTree.indent (#5178) 2021-04-03 20:46:13 +03:00