| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
(GH-29951)
This reverts commit 9bf2cbc4c498812e14f20d86acb61c53928a5a57.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Remove the asyncore and asynchat modules, deprecated in Python
3.6: use the asyncio module instead.
Remove the smtpd module, deprecated in Python 3.6: the aiosmtpd
module can be used instead, it is based on asyncio.
* Remove asyncore, asynchat and smtpd documentation
* Remove test_asyncore, test_asynchat and test_smtpd
* Rename Lib/asynchat.py to Lib/test/support/_asynchat.py
* Rename Lib/asyncore.py to Lib/test/support/_asyncore.py
* Rename Lib/smtpd.py to Lib/test/support/_smtpd.py
* Remove DeprecationWarning from private _asyncore, _asynchat and
_smtpd modules
* _smtpd: remove deprecated properties
|
|
|
| |
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
|
|
|
|
| |
tests (GH-26905)
|
|
|
|
|
|
| |
* Fix auth_login logic (bpo-27820)
* Also fix a longstanding bug in the SimSMTPChannel.found_terminator() method that causes inability to test
SMTP AUTH with initial_response_ok=False.
|
|
|
|
| |
when timeout not provided (GH-23969)
|
|
|
| |
Signed-off-by: Christian Heimes <christian@python.org>
|
| |
|
|
|
|
|
|
|
|
|
| |
func:`hashlib.new` passed ``usedforsecurity`` to OpenSSL EVP constructor
``_hashlib.new()``. test_hashlib and test_smtplib handle strict security
policy better.
Signed-off-by: Christian Heimes <christian@python.org>
Automerge-Triggered-By: @tiran
|
|
|
| |
Add a new test.support.hashlib_helper submodule.
|
|
|
|
|
|
| |
* Move socket related functions from test.support to socket_helper.
* Import socket, nntplib and urllib.error lazily in transient_internet().
* Remove importing multiprocess.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Replace hardcoded timeout constants in tests with LOOPBACK_TIMEOUT of
test.support, so it's easier to ajdust this timeout for all tests at
once.
|
|
|
|
|
|
|
|
|
|
|
| |
Make it easier to run and test Python on systems with restrict crypto policies:
* add requires_hashdigest to test.support to check if a hash digest algorithm is available and working
* avoid MD5 in test_hmac
* replace MD5 with SHA256 in test_tarfile
* mark network tests that require MD5 for MD5-based digest auth or CRAM-MD5
https://bugs.python.org/issue38270
|
| |
|
|
|
|
|
|
|
|
|
|
| |
(GH-10284)
Two kind of mistakes:
1. Missed space. After concatenating there is no space between words.
2. Missed comma. Causes unintentional concatenating in a list of strings.
|
|
|
|
| |
By default the smtplib.SMTP objects did not have a sock attribute, it
was only created during connect()
|
|
|
|
|
|
|
|
| |
(GH-9108)
* Make sure that when some of the tests in test_smtplib fail, the allocated threads
and sockets are not leaked.
* Use support.join_thread() instead of thread.join() to avoid infinite blocks.
|
|
|
|
|
| |
Some methods of the SMTP class use mutable default arguments. Specially
`send_message` is affected as it mutates one of the args by appending items
to it, which has side effects on further calls.
|
|
|
|
|
|
|
|
|
|
|
| |
Enable and fix SMTPUTF8SimTests in test_smtplib.
The tests for SMTPUTF8SimTests in test_smtplib.py were not actually
being run because test_smtplib was still using the 'test_main' pattern,
and the class was never added to test_main.
Additionally, one of the tests needed to be moved to the non-UTF8 server
class because it relies on the server not being UTF-8 compatible (and it
had a bug in in).
|
|
|
|
|
| |
and to_addrs (#5451)
Do not pass the name field in the 'from' address in the SMTP envelope.
|
|
|
|
| |
Call thread.join() on threads to prevent the "dangling threads"
warning.
|
|
|
|
|
|
|
|
|
|
| |
test.support.HOST should be "localhost" as it was in the past. See the bpo-29639.
Tests that need the IP address should use HOSTv4 (added) or the existing HOSTv6 constant.
This changes the definition and fixes tests that needed updating to deal with HOST being
the hostname rather than the hardcoded IP address.
This is only the first step in addressing https://bugs.python.org/issue29639.
|
|
|
|
|
|
| |
* Remove Setup.config
* Always define WITH_THREAD for compatibility.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The auth method tests simply weren't adequate because of the fact that
smtpd doesn't support authentication. I borrowed some of Milan's
code for that from issue #21935 and added it to the smtplib tests.
Also discovered that the direct test for the 'auth' method wasn't actually
testing anything and fixed it.
The fix makes the new authobject mechanism work the way it is
documented...the problem was that wasn't checking for a 334 return code
if an initial-response was provided, which works fine for auth plain
and cram-md5, but not for auth login.
|
|
|
|
| |
initial-response argument to the SMTP AUTH command.
|
|
|
|
| |
Reviewed by Maciej Szulik.
|
|
|
|
| |
Initial patch by Milan Oberkirch.
|
|
|
|
| |
Patch by Gavin Chappell and Maciej Szulik.
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Without this reset, starttls would fail if a connect/starttls was done after a
quit, because smtplib assumed the existing value of emspt_features was
accurate, but it gets reset when starttls completes (and the new value does
not contain the starttls capability, since tls is already started at that
point). (There may be additional places where this lack of reset was an
issue as well.)
Patch by Milan Oberkirch.
|
| | |
|
| |
| |
| |
| | |
Patch by Milan Oberkirch.
|
|/
|
|
| |
Eventually these will want to convert to decode_data=False, I think.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Normally an SMTP server will return an error, and smtplib will then issue an
RSET to return the connection to the known starting state. Some servers,
however, disconnect after issuing certain errors. When we issue the RSET,
this would result in raising an SMTPServerDisconnected error, *instead* of
returning the error code the user of the library was expecting. This fix
makes the internal RSET calls ignore the disconnection so that the error code
is returned. The user of the library will then get the SMTPServerDisconnected
error the next time they try to talk to the server.
Patch by Kushal Das.
|
| |
|
|\ |
|
| | |
|
| |
| |
| |
| |
| | |
The SMTP server advertises four different authentication methods, and
the code will try CRAM-MD5 first, which will fail, but LOGIN succeeds.
|
|\ \
| |/ |
|
| | |
|
|\ \
| |/ |
|
| | |
|
|\ \
| |/ |
|
| |\ |
|
| | | |
|
|\ \ \
| |/ / |
|
| |\ \
| | |/ |
|