-
Notifications
You must be signed in to change notification settings - Fork 18
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
Export all public version classes at package level #105
Export all public version classes at package level #105
Conversation
CC @JohanLorenzo as well. |
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.
FWIW this LGTM
@jcristau or @JohanLorenzo could anyone from you please review? Thanks. |
I can't say I'm a fan, to be honest. |
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.
Thank you for putting up this patch @whimboo! I personally don't have any strong preferences on whether we want to expose these classes to the top-level of mozilla-version. That said, I understand this may be hard for newcomers to find which class to use. Thus, I'm okay to make this change.
I chatted with @jcristau. A good compromise would be to expose only the supported products. I left details on which classes to take out. Let me know what you think!
c40d78c
to
dec9ba3
Compare
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.
Thank you!
Any chance a new minor release could be done so that those changes can be used by other projects? Thanks. |
Hey @whimboo! This is now done:
Let me know how it goes 🙂 |
Thanks a lot @JohanLorenzo! We appreciate. Once the contributor updated the patch I will let you know. But locally it was already working for me when I've created this PR. |
By exporting all the public version classes that consumers are allowed to use globally in
__init__.py
it will make it much easier to use them given that you don't have to import specific modules:A real use-case example you can find at: mozilla/mozdownload#632 (comment)
@jcristau this is what we discussed on Matrix two days ago. I hope that it's clearer now.