-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
S3 support #190
S3 support #190
Conversation
Nice, thanks for contribution! |
@@ -46,8 +46,8 @@ def __init__( | |||
self._load_from_env() | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have doubts about backwards compatibility, because change in major section name might cause some troubles in fluent transition from 4.x.x to 5.x.x.
I would start with deprecation and add something like that:
if self.has_section("minio") and not self.has_section("s3"): | |
warning.warn("[minio] section in configuration is deprecated, replace it with [s3]", DeprecationWarning) | |
self._config["s3"] = self._config["minio"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah why not
Co-authored-by: Paweł Srokosz <psrok1@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great, thanks! 🎉 Added a bit better fallback and found that DeprecationWarnings are actually ignored outside __main__
(https://docs.python.org/3/library/exceptions.html#DeprecationWarning).
MinIO is S3 compatible so it may make sense to use just S3 compatible lib instead of minio-py - this also allows to use other S3-compatibile storage such as amazon or ceph