-
Notifications
You must be signed in to change notification settings - Fork 438
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
Do not raise a DeprecationWarning in stripe.app_info
#1168
Do not raise a DeprecationWarning in stripe.app_info
#1168
Conversation
I'm afraid we need that line for the reason the comment outlined.
work? |
@pakrym-stripe What is the late import the comment refers to? I tried figuring it out, but no luck. As I see it, the line stripe-python/stripe/__init__.py Line 18 in 5ab12c6
ends up importing Then, the name is overwritten with stripe-python/stripe/__init__.py Line 31 in 5ab12c6
|
Yes, and |
I'm still not following the terminology "late import" here, unless you mean this corner-case situation (which is not really what I'd call a late import), when an user imports
(Across all of GitHub, there seems to be exactly one place that does |
Also, with the current setup there's actually no point in On that note, if you like, @pakrym-stripe, I can rework this PR to just remove the DeprecationWarning from there. |
Yep, that.
If
You are right here, but we'd like to keep all backward compatibility re-exporting files uniform. We also have have a linter that depend on the warning being there (https://github.com/stripe/stripe-python/blob/master/flake8_stripe/flake8_stripe.py#L136) |
I think the suggested |
Alright, but please leave the
part as a comment |
2ad13f1
to
980d4b5
Compare
stripe.app_info
stripe.app_info
@pakrym-stripe Okiedoke, changed. Flake8 seems to be happy locally too. |
Great work! Thank you for your help @akx ! |
Fixes #1167.
Regressed in 0c7ad96 (#1153).