Comments (4)
Thanks for reporting!
Current expected behaviour is that two timeout
kwargs set the instance valueβ __init__
and connect
. Other methods should not persist the timeout. This might not be documented correctly.
I agree this doesn't work well for the case where the connect timeout should be different than the default.
I'll have a look but I think the suggested change is reasonable, probably I can proceed with that π
from aiosmtplib.
Hi Cole, thanks for the great lib!
I'm happy to contribute and implement this change. I haven't checked other methods, only connect
. Let me see how they handle timeout
without persisting it, and I'll create a pull request.
from aiosmtplib.
Ok, so SMTP.timeout
is updated by _update_settings_from_kwargs()
in connect()
and starttls()
. I changed those methods to handle passed timeout
value similar to how execute_command()
does.
This required changing the signature of _create_connection()
and adding the timeout
argument, but I suppose it shouldn't be an issue, since it's a private method.
The timeout argument was also removed from _update_settings_from_kwargs()
as it's not supposed to be updated there anymore.
If this makes sense, I suppose some tests should be added?
from aiosmtplib.
Didn't realize the pull request was created in the wrong repository/branch.
from aiosmtplib.
Related Issues (20)
- TypeError: connect() takes 1 positional argument but 2 were given HOT 3
- Source Address is not used in socket connection HOT 5
- Support URL for connection HOT 1
- CancelledError thrown when trying to send without authentication HOT 2
- Enabling UTF-8 for Authetication HOT 5
- 4 failing tests HOT 7
- add github issues url to bug reporting docs section HOT 1
- [Debian] Please include CHANGELOG.rst in your pypi releases. HOT 2
- Please support choice of outbound IP address HOT 1
- Suggestion: Support 'TLS optional' usage HOT 3
- Add testing section to docs HOT 2
- Timed out waiting for server ready message HOT 3
- Error trying to use the mail_options or rcpt_options arguments HOT 1
- Do not receive emails using Bcc, Cc headers HOT 2
- Custom DNS resolver HOT 1
- aiosmtplib is not working. [SSL: WRONG_VERSION_NUMBER] wrong version number HOT 1
- packaging issue: deployment of tests HOT 1
- Gives AttributeError when calling with when HOT 2
- Support LMTP HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aiosmtplib.