Commit Graph

92 Commits

Author SHA1 Message Date
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
be624e5124 add email.__all__ (#13047) 2024-11-20 13:57:41 +01:00
Stephen Morton
5903805b91 add email._policybase.__all__ (#13041)
add email._policybase.__all__
2024-11-19 03:48:55 -08:00
Brian Schubert
27a8967896 Add missing parameter to email.policy.EmailPolicy.__init__ (#12890) 2024-10-24 11:35:26 +02:00
Brian Schubert
27325a255e Add email.policy.EmailPolicy.clone (#12879) 2024-10-23 07:17:13 -07:00
Oleh Prypin
b2f68ec2fe Use MaybeNone (alias to Any) when applicable (#12855) 2024-10-18 14:07:52 -07:00
Sebastian Rittau
e4c84dfb11 Make email.policy classes generic (#12724) 2024-10-02 16:42:07 +02:00
Sebastian Rittau
c7c430857e stdlib updates for latest Python patch releases (#12638) 2024-09-11 17:58:24 +02:00
Sebastian Rittau
039c6bcdb1 Use Self for email.message attachments (#12530)
---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Avasam <samuel.06@hotmail.com>
2024-08-29 10:48:32 -04:00
Avasam
937270df0c Forbid extremely long line lengths in non-autogenerated stubs (#12537)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2024-08-18 16:03:34 -04:00
Max Muoto
044ad59988 Update email/utils for 3.14 (#12491) 2024-08-10 23:57:32 +03:00
Max Muoto
9a77f6006d Use Final for undocumented constants (#12450) 2024-07-28 12:02:06 +02:00
Max Muoto
35b84f2f21 Update email.utils for 3.13 (#12336)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2024-07-13 14:08:28 -07:00
Sebastian Rittau
56db30e8eb Make email.message.Message generic over the header type (#11732)
Co-authored-by: Avasam <samuel.06@hotmail.com>
2024-04-23 11:41:10 -04:00
Sebastian Rittau
4c5c5760cf email.message: Allow any header value (#11574) 2024-03-11 17:47:00 -04: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
c390c70d2a email.message.Message: Improve payload methods and Explain why __getitem__ isn't typed to return None (#11095)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-12-14 18:28:15 -05:00
Stephen Morton
cff2b3db0c add email._policybase (#11146) 2023-12-11 19:48:48 +01:00
Stephen Morton
e915cb28be email.feedparser.BytesFeedParser is a subclass of FeedParser (#11110) 2023-12-07 11:28:26 +01:00
Jelle Zijlstra
5030b7419b stdlib: Use pos-only parameters for many Protocols (#10985) 2023-11-06 18:09:04 +01:00
Jisuk Byun
a04822051f Fix type hints in email module (#10450) 2023-07-17 14:14:28 +02:00
Jisuk Byun
d14ab09375 Fix and comment type mismatches in email library hints (#10437) 2023-07-11 00:07:04 -07:00
Nikita Sobolev
d492efeaea email.utils.localtime: py312 updates (#10358) 2023-06-25 12:02:11 +01:00
Oleg Höfling
052d2b9f3a Fix base class for email.generator.BytesGenerator (#10299)
And use `Self` as the return type for `email.generator.Generator.clone`.

Signed-off-by: oleg.hoefling <oleg.hoefling@gmail.com>
2023-06-11 17:02:32 +01:00
Oleg Höfling
c88ce93614 Use Self as the return type for email.policy.Policy.clone (#10301)
Signed-off-by: oleg.hoefling <oleg.hoefling@gmail.com>
2023-06-11 16:36:45 +01:00
Shantanu
1537a598d0 email.message: fix return type of get_charsets (#9944)
Fixes #9885
2023-03-26 00:42:45 +00: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
Shantanu
58edfea33f email.parser: narrow io types (#9737) 2023-02-15 10:43:39 +01:00
Alex Waygood
9ed39d8796 Use typing_extensions.Self in the stdlib (#9694) 2023-02-09 09:12:13 +00:00
Alex Waygood
0ef9c3f8e8 Enable flake8-pyi's Y037 (#9686) 2023-02-06 19:01:02 -08:00
Alex Waygood
b5a26d1ca2 email.message: Fix invalid TypeVar usage; add some default values (#9620) 2023-01-30 17:56:29 +01: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
Alex Waygood
d98d1674e7 Fix a few issues with parameter defaults (#9572) 2023-01-20 09:47:59 -08:00
Jelle Zijlstra
ddfaca3200 stdlib: add argument default values (#9501) 2023-01-18 09:37:34 +01:00
Martin Fischer
554989e31f stdlib: Fix types of semi-public Message methods (#9456) 2023-01-04 11:21:33 +01:00
Sebastian Rittau
a74df38df0 Message.get_content_charset() returns None by default (#9344) 2022-12-09 07:19:18 -08:00
Jelle Zijlstra
7ab933f3c3 email: improve bytes handling (#9032) 2022-11-01 10:13:30 +01:00
Nikita Sobolev
380022c650 Remove empty __init__ methods (#8816) 2022-09-30 13:08:41 +01:00
Nikita Sobolev
0259068ad6 Remove duplicate definitions in sub-classes (#8594) 2022-08-26 17:10:55 +02:00
Nikita Sobolev
5cc966cc57 Improve email.headerregistry.HeaderRegistry stub (#8516) 2022-08-10 19:00:11 +01:00
Alex Waygood
892796a794 Remove, move or # noqa more TypeAlias declarations (#8450) 2022-08-05 13:03:19 +01:00
Kevin Kirsche
5732b8f34e email.Message.walk yields self (#8398)
This updates the generator used by `Message` to return `Self` so that it correctly changes when a `MIMEPart` or `EmailMessage`.

Fixes #8290
2022-07-26 11:17:45 +02:00
Sebastian Rittau
5534007189 Fix return type of email.header.decode_header() (#8337) 2022-07-19 20:43:48 +01:00
Alex Waygood
6348a58b8b Import Match and Pattern from re, not typing (#8277) 2022-07-12 15:32:48 +02:00
Alex Waygood
edc0ecd857 Remove Python 3.6 branches from typeshed (#8269) 2022-07-11 10:55:17 +02:00
Alex Waygood
8b3b6bf7cd stdlib: Audit Callable[<parameters>, None] annotations (#8187) 2022-06-27 08:08:28 +02:00