Sebastian Rittau
d2a7889fe0
Drop support for Python 3.5 ( #4675 )
...
Python 3.5 EOL was on 2020-09-30.
2020-11-02 16:18:20 +01:00
Utsav
75a92eb1c1
Added: None Overload ( #4722 )
2020-10-27 11:49:23 -07:00
Shantanu
6ff5b88ca7
typeshed: remove crufty comments ( #4699 )
...
Co-authored-by: hauntsaninja <>
2020-10-23 09:40:06 +02:00
Eric Traut
04c74640f0
Removed imported symbols that are not accessed or re-exported ( #4387 )
...
Co-authored-by: Eric Traut <erictr@microsoft.com >
2020-08-05 22:49:17 -07:00
Sebastian Rittau
dc0bfc5889
Make FeedParser generic over Message ( #4375 )
2020-08-04 09:32:38 -07:00
Ian Good
a472c9b543
Fix Policy.header_source_parse return type ( #4365 )
2020-07-27 08:38:40 +02:00
Jelle Zijlstra
5d553c9584
apply black and isort ( #4287 )
...
* apply black and isort
* move some type ignores
2020-06-28 13:31:00 -07:00
Shantanu
ad6cf3a314
email.errors: fix aliased class ( #3988 )
...
Co-authored-by: hauntsaninja <>
2020-05-13 19:47:53 -07:00
Benjamin Poirier
ea919fdce9
email: Fix BytesFeedParser method arg ( #3916 )
2020-04-08 09:28:02 +02:00
Shantanu
d8b081130d
email.mime: add policy arguments ( #3827 )
2020-03-08 16:06:55 +01:00
Sebastian Rittau
595d02363a
Change return type of Message.get_payload() to Any ( #3504 )
...
If, for example, is_multipart() is called before calling get_payload(),
it is guaranteed that a List[Message] is returned.
2019-11-26 08:03:15 -08:00
Utkarsh Gupta
1a932ce26a
message.pyi: Change HeaderType to Any ( #2924 )
...
Fixes #2863
2019-10-10 12:24:44 +02:00
Sebastian Rittau
256b3ce8ab
Remove a bunch of unused imports ( #3323 )
2019-10-08 07:59:32 -07:00
Sebastian Rittau
9ccf9356bf
Remove Python 3.4 support ( #3147 )
...
Closes #3123
2019-07-27 10:58:21 +02:00
Cole Maclean
f5c107cacd
BytesGenerator requires BinaryIO ( #3106 )
2019-07-07 22:03:07 -07:00
Michael Lee
efb67946f8
Use variable annotations everywhere ( #2909 )
2019-04-13 10:40:52 +02:00
Vasily Zakharov
34cc5545fe
email.mime.application.MIMEApplication expects data to be bytes, while it should be Union[str, bytes] ( #2855 )
...
Fixes #2831
2019-03-11 20:42:55 +01:00
Vasily Zakharov
e4e19d6e98
Add email.charset.SHORTEST, QP, BASE64 to the stub for Python 2 ( #2857 )
...
Also mark Python 3 constants as undocumented.
Fixes #2830
2019-03-11 20:41:19 +01:00
Eric Traut
ef5fc92b98
Added missing default value annotation ( #2841 )
2019-03-10 12:19:29 +01:00
Josh Morton
b0eb6c2eae
Improve the stubs in charset.pyi under python3. ( #2768 )
...
The python3 charset stubs didn't include certain necessary module level
constansts (like `QP`) and wrongly defined the arguments to some of
the functions in the module. This is no longer the case.
Fixes #2767
2019-02-09 15:29:49 +01:00
gnattishness
ea0dbfa313
Fix typo for Message.add_attachment in message.pyi ( #2697 )
2018-12-15 19:11:15 -08:00
Sebastian Rittau
006a79220f
Flake8 fixes ( #2549 )
...
* Fix over-indented continuation lines
* Fix under-indented continuation lines
* Fix whitespace around default operator problems
* Limit line lengths
* Fix inconsistent files
2018-10-24 07:20:53 -07:00
Jerome Leclanche
f362cf47fa
Fix email.parser.BytesParser and BytesHeaderParser method args ( #2548 )
...
Fixes #2502
2018-10-24 06:22:08 -07:00
Yusuke Miyazaki
6192cce9d9
Avoid using string literals in type annotations ( #2294 )
2018-07-02 20:23:29 -07:00
Sebastian Rittau
1184726417
Drop Python 3.3 support from email stubs ( #2263 )
2018-06-20 12:04:22 -07:00
Jasper Spaans
2df4a32cf5
Let email.message.MIMEPart inherit from Message ( #2103 )
...
Also removes some duplication.
2018-05-09 16:28:14 -07:00
Karl Ramm
c5bb3aa547
mypy gets confused if you leave out 'self' ( #1871 )
2018-02-10 13:24:05 -08:00
Daniel Axtens
66821993f6
Fix email header types ( #1472 )
...
Some email header operations can operate on or return a Header object as well as a string.
2017-11-09 06:03:11 -08:00
Martin DeMello
d389ef3d85
Remove a few files from the pytype blacklist. ( #1628 )
...
Fixes the following issues:
* Literals rather than ... for default values
* None rather than ... for default value of typed variable
* Literals rather than ... # type for top level constants
* # Foo rather than # type: Foo
* return value of init not set to None
2017-09-27 07:57:13 -07:00
Neil Pilgrim
ffe2bee7a7
Fix email.utils parseaddr and formataddr to accept Optional[str] ( #1626 )
2017-09-26 14:10:35 -07:00
Thomas Grainger
15c8474e35
fix email.mime ( #1482 )
...
* add missing python 2 email.mime.application stub
* restore missing python 3 mime package
* Delete __init__.py
2017-07-26 08:29:30 -07:00
Matthias Kramm
ac0b809bf5
tweak files to fix pytype parsing errors ( #1325 )
...
* Don't use "\" to join lines
2017-05-26 08:45:52 -07:00
Jelle Zijlstra
c4e6ce319f
minor fixes to email stubs ( #1357 )
2017-05-25 19:36:48 -07:00
Jelle Zijlstra
b6eec58d2c
remove checks against patch versions ( #987 )
...
Both mypy and pytype only use the major and minor version in type checking. Using
checks like "sys.version_info >= (3, 4, 4)" won't actually work properly for
people type checking their code using version 3.4, because (3, 4) >= (3, 4, 4) will
always be false (at least in mypy's approach; not sure if pytype is different).
2017-03-12 20:16:09 -07:00
Lukasz Langa
c0c982ada5
Add missing Dict imports.
2016-12-21 01:15:26 -08:00
Lukasz Langa
5f416fae64
Add missing List imports.
2016-12-21 01:06:52 -08:00
Lukasz Langa
6eb97964fd
Fixing flake8 E401, E402 errors
2016-12-20 00:47:51 -08:00
Lukasz Langa
6b5c6626d6
Fixing flake8 E121, E122, E123, E124, E125, E126 errors
2016-12-19 23:53:19 -08:00
Lukasz Langa
b84f20a011
Fixing flake8 W errors
2016-12-19 21:52:56 -08:00
peterdotran
ce940efc01
email.utils.parsedate and email.utils.parsedate_tz corrected to be passable to time.mktime ( #497 )
...
Also email.utils.parsedate_tz 10th element can be None if no timezone is specified
2016-08-24 06:10:56 -07:00
Valérian Rousset
24086b2195
Finish mail ( #396 )
...
* remove old email files
* finish email.mime
* finish email.encoders
* email.utils: stubgen run, reorder
* finish email.utils
* finish email.iterators
* email.mime is a module
* fix mime
2016-07-29 15:25:52 -07:00
Guido van Rossum
39325bf159
Mypy now supports sys.platform and sys.version_info checks ( #410 )
2016-07-27 13:25:29 -07:00
Eklavya Sharma
df1a655858
email.header: Make decode_header also accept str. ( #333 )
...
decode_header accepts a parameter of type str or Header, but the
stub for decode_header types the parameter as Header. Change
that to Union[Header, str].
2016-07-04 18:11:49 -07:00
Phil Jones
f6decefd02
Fix email typing errors ( #288 )
...
* Change (Py3) email message payload type
The docstring of the Message get_payload method indicates that the
possible return types include None and bytes. Additionally the
set_payload method accepts bytes. Therefore I've changed the
PayloadType to include bytes and the get_payload return type to be an
Optional PayloadType.
* Change email (Py3) message_from_file IO types
Instead of using TextIO and BinaryIO use IO[str] and IO[bytes]
respectively to match the type returned by the open builtin. This
follows the recommendations in #283 .
The error that prompts this is reproduced via:
```
from email import message_from_file
with open('email') as file_:
email = message_from_file(file_)
```
Argument 1 to "message_from_file" has incompatible type IO[Any]; expected "TextIO"
2016-06-11 10:43:08 -07:00
Valérian Rousset
5b5f01f33c
Improve email.* ( #207 )
...
* improve email
* complete email.message
* complete email.policy
* complete email.parser
* complete email.generator
* complete email.headerregistry
* complete email.contentmanager
* complete email.header
* complete email.charset
* complete email.errors
* complete email.feedparser
2016-05-30 10:04:51 -07:00
Tim Abbott
b30ca8e42b
Add python 2 email.message_from_* stubs (and add types for py3).
2016-01-27 15:46:00 -08:00
Matthias Kramm
94c9ce8fd0
Consistently use '= ...' for optional parameters.
2015-11-09 13:55:02 -08:00
Matthias Kramm
375bf063b1
Fix parse errors
2015-11-09 13:37:08 -08:00
Matthias Kramm
4fe8915d44
Add missing '-> None' to all __init__ methods.
2015-11-09 10:25:11 -08:00
Matthias Kramm
337abed05a
add (overwrite with) mypy stubs, if available
2015-09-30 09:59:44 -07:00