File: CHANGELOG.rst

package info (click to toggle)
aiosmtplib 4.0.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 572 kB
  • sloc: python: 5,516; makefile: 20; sh: 6
file content (262 lines) | stat: -rw-r--r-- 7,612 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
Changelog
=========

4.0.1
-----

- Bugfix: Always clear the connect lock on connection lost, allowing client reconnect


4.0.0
-----

- **BREAKING**: Drop Python 3.8 support
- Bugfix: Run `socket.getfqdn` in thread to avoid blocking event loop
  if `local_hostname` not provided (thanks @Raidzin)
- Bugfix: Clear connect lock on connection lost, allowing client reconnect
- Bugfix: Allow socket connections to use TLS by providing `hostname` and
  `use_tls=True`


3.0.2
-----

- Bugfix: Type of "send" is partially unknown with pyright
- Bugfix: Fix asyncio deadlock trying to reconnect after error (thanks @Voldemat)
- Change: Switched from Poetry to build/hatch/twine for packaging.


3.0.1
-----

- Bugfix: 'Future exception was never retrieved' warning in SMTPProtocol
  after successful connection close and garbage collection.
- Cleanup: Updated FlowControlMixin logic from stdlib


3.0.0
-----

- **BREAKING**: Drop Python 3.7 support.
- **BREAKING**: Positional arguments are now positional only, and keyword arguments
  are keyword only.
- **BREAKING**: Passing ``source_address`` as a string argument (deprecated in 2.0)
  is now an error. ``source_address``  takes a (addr, port) tuple that is used as
  the ``local_addr`` param of ``asyncio.create_connection``, allowing for binding
  to a specific IP. The ``local_hostname`` argument takes the value to be sent to
  the server with the EHLO/HELO message (which is what ``source_address`` was used
  for prior to 2.0).
- Change: don't use timeout value passed to ``connect`` everywhere,
  only for the initial connection (credit @wombatonfire)
- Change: removed unnecessary connection lost callback
- Change: revised handling for 'Future exception was never retrieved' warnings in
  protocol


2.0.2
-----

- Bugfix: don't send extra EHLO/HELO before QUIT (credit @ikrivosheev)
- Change: added SMTPConnectionResponseError for invalid response on
  connect only (credit @ikrivosheev)

2.0.1
-----

- Bugfix: "tests" and "docs" in the sdist should be includes, not packages,
  so that they do not get put in ``site-packages``.


2.0.0
-----

- **BREAKING**: Drop Python 3.5 and 3.6 support.
- **BREAKING**: On connect, if the server supports STARTTLS, automatically try
  to upgrade the connection. STARTTLS after connect can be turned on or off
  explicitly by passing ``start_tls=True`` or ``start_tls=False`` respectively.
- **BREAKING**: Remove deprecated ``loop`` keyword argument for the SMTP class.
- Change: The ``source_address`` argument now takes a (addr, port) tuple that is
  passed as the ``local_addr`` param to ``asyncio.create_connection``, allowing
  for binding to a specific IP. The new ``local_hostname`` argument that takes
  the value to be sent to the server with the EHLO/HELO message. This behaviour
  more closely matches ``smtplib``.

  In order to not break existing usage, passing a string instead of a tuple to
  ``source_address`` will give a DeprecationWarning, and use the value as it if
  had been passed for ``local_hostname``.

  Thanks @rafaelrds and @davidmcnabnz for raising and contributing work on this
  issue.
- Bugfix: the ``mail_options`` and ``rcpt_options`` arguments to the ``send``
  coroutine no longer cause errors
- Cleanup: Refactored ``SMTP`` parent classes to remove complex inheritance
  structure.
- Cleanup: Switched to ``asyncio.run`` for sync client methods.
- Cleanup: Don't use private email.message.Message policy attribute (instead,
  set an appropriate policy based on message class)


1.1.7
-----

- Security: Fix a possible injection vulnerability (a variant of
  https://consensys.net/diligence/vulnerabilities/python-smtplib-multiple-crlf-injection/)

  Note that in order to exploit this vulnerability in aiosmtplib, the attacker would need
  control of the ``hostname`` or ``source_address`` parameters. Thanks Sam Sanoop @ Snyk
  for bringing this to my attention.
- Bugfix: include CHANGLOG in sdist release
- Type hints: fix type hints for async context exit (credit @JelleZijlstra)


1.1.6
-----

- Bugfix: fix authenticated test failures (credit @P-EB)


1.1.5
-----

- Bugfix: avoid raising ``asyncio.CancelledError`` on connection lost
- Bugfix: allow UTF-8 chars in usernames and password strings
- Feature: allow bytes type args for login usernames and passwords


1.1.4
-----

- Bugfix: parsing comma separated addresses in to header (credit @gjcarneiro)
- Feature: add py.typed file (PEP 561, credit @retnikt)


1.1.3
-----

- Feature: add pause and resume writing methods to ``SMTPProcotol``, via
  ``asyncio.streams.FlowControlMixin`` (thanks @ikrivosheev).

- Bugfix: allow an empty sender (credit @ikrivosheev)

- Cleanup: more useful error message when login called without TLS


1.1.2
-----

- Bugfix: removed ``docs`` and ``tests`` from wheel, they should only be
  in the source distribution.


1.1.1
-----

- Bugfix: Fix handling of sending legacy email API (Message) objects.

- Bugfix: Fix SMTPNotSupported error with UTF8 sender/recipient names
  on servers that don't support SMTPUTF8.


1.1.0
-----

- Feature: Added send coroutine api.

- Feature: Added SMTPUTF8 support for UTF8 chars in addresses.

- Feature: Added connected socket and Unix socket path connection options.

- Feature: Wait until the connect coroutine is awaited to get the event loop.
  Passing an explicit event loop via the loop keyword argument is deprecated
  and will be removed in version 2.0.

- Cleanup: Set context for timeout and connection exceptions properly.

- Cleanup: Use built in start_tls method on Python 3.7+.

- Cleanup: Timeout correctly if TLS handshake takes too long on Python 3.7+.

- Cleanup: Updated SMTPProcotol class and removed StreamReader/StreamWriter
  usage to remove deprecation warnings in 3.8.

- Bugfix: EHLO/HELO if required before any command, not just when using
  higher level commands.

- Cleanup: Replaced asserts in functions with more useful errors (e.g.
  RuntimeError).

- Cleanup: More useful error messages for timeouts (thanks ikrivosheev!),
  including two new exception classes, ``SMTPConnectTimeoutError`` and
  ``SMTPReadTimeoutError``


1.0.6
-----

- Bugfix: Set default timeout to 60 seconds as per documentation
  (previously it was unlimited).


1.0.5
-----

- Bugfix: Connection is now closed if an error response is received
  immediately after connecting.


1.0.4
-----

- Bugfix: Badly encoded server response messages are now decoded to utf-8,
  with error chars escaped.

- Cleanup: Removed handling for exceptions not raised by asyncio (in
  SMTPProtocol._readline)


1.0.3
-----

- Bugfix: Removed buggy close connection on __del__

- Bugfix: Fixed old style auth method parsing in ESMTP response.

- Bugfix: Cleanup transport on exception in connect method.

- Cleanup: Simplified SMTPProtocol.connection_made, __main__


1.0.2
-----

- Bugfix: Close connection lock on on SMTPServerDisconnected

- Feature: Added cert_bundle argument to connection init, connect and starttls
  methods

- Bugfix: Disconnected clients would raise SMTPResponseException: (-1 ...)
  instead of SMTPServerDisconnected


1.0.1
-----

- Bugfix: Commands were getting out of order when using the client as a context
  manager within a task

- Bugfix: multiple tasks calling connect would get confused

- Bugfix: EHLO/HELO responses were being saved even after disconnect

- Bugfix: RuntimeError on client cleanup if event loop was closed

- Bugfix: CRAM-MD5 auth was not working

- Bugfix: AttributeError on STARTTLS under uvloop


1.0.0
-----

Initial feature complete release with stable API; future changes will be
documented here.