-
Notifications
You must be signed in to change notification settings - Fork 68
Deprecates uname_attr and uname_info public methods
#370
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
Conversation
|
Up @python-distro/maintainers 🙏 |
1fec59b to
8eb720f
Compare
8eb720f to
3859e22
Compare
adamjstewart
left a comment
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.
Not sure about whether or not we should deprecate these, as I don't think I've used them before.
As for how to deprecate, we should at least provide suggested replacements or migration strategies for people who were previously using these.
Yes, see #322 for full context. Long story short : these methods should have never been public in the first place as distro ignores actual data for internal uses.
Indeed, |
|
Sounds good to me. |
3859e22 to
996fe9b
Compare
Thanks for your feedback ! |
996fe9b to
9daf557
Compare
distro as well as LinuxDistribution `uname_attr` and `uname_info` public methods are based on `_parse_uname_content` function which purposely ignores release information part from `uname -rs` command output on Linux platforms. This makes it specially designed for distro internals, and shouldn't be publicly available as stable API. We'll deprecate these methods in v1.10.0, in order to allow API removals in the future (e.g. distro v2). Developers are notified to rather use `os.uname` or `platform.uname` API from Python standard library. > closes #322
9daf557 to
7f0c2f9
Compare
adamjstewart
left a comment
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.
Could also remove it from the documentation. I don't know much about these tools but trust you to make the decision of whether or not to deprecate. I'm just approving the implementation.
Let's not while they actually exist (mostly because one might use them on the v1 branch).
Thanks ! These API are misleading users, as brought up by @braindevices in #322. I'm merging this to move on towards v1.10. |
(see #322 for context)
distro as well as LinuxDistribution
uname_attranduname_infopublic methods are based on_parse_uname_contentfunction which purposely ignores release information part fromuname -rscommand output on Linux platforms. This makes it specially designed for distro internals, and shouldn't be publicly available as stable API.We'll deprecate these methods in v1.10.0, in order to allow API removals in the future (e.g. distro v2).