-
Notifications
You must be signed in to change notification settings - Fork 268
More compatibility with pep425tags #213
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Conversation
Comments are all stylistic. I will also say that I initially left the logging out as I wasn't sure how useful it would be since I didn't notice logging being used in 'packaging' itself. |
Hmm, maybe we should slightly change the API that |
@di yeah, if we are going to bother to include it I think it should be off since it's only helpful when debugging and with 'packaging' as a library I think it should be silent by default. |
Co-Authored-By: Brett Cannon <54418+brettcannon@users.noreply.github.com>
Co-Authored-By: Brett Cannon <54418+brettcannon@users.noreply.github.com>
Co-Authored-By: Brett Cannon <54418+brettcannon@users.noreply.github.com>
3116ef0
to
17a0fcd
Compare
17a0fcd
to
c954607
Compare
@@ -101,6 +105,16 @@ def parse_tag(tag): | |||
return frozenset(tags) | |||
|
|||
|
|||
def _get_config_var(name, warn=False): |
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.
So with this being false, how will this ever be true such that logging actually occurs? Is the assumption people will manually change locally when they need to? Or is it in case logging comes in the future for the whole the project or through some API?
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.
Right, great point. I think what would be best is that users can turn on logging via an argument to sys_tags
and this is propagated through. I feel like this would be easiest to integrate into pip
and would have the least effect on other packaging.tags
users. I added a commit which does this.
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.
The code changes LGTM. 2 blocker concerns:
- docs: we'd want to document the new warn parameter (packaging.tags is pretty well documented so this is in line with that)
- tests: the tests seem to be failing on the CI for pypy
Thanks @di! ^>^ @brettcannon I merged on the assumption that you're OK with post-your-approval changes, and if you're not, we can iterate on/discuss reverting specific commits if needed (though I doubt that's the case here). :) |
@pradyunsg I'm fine with it. 😄 |
This PR adds logging around
get_config_var
as mentioned here: pypa/pip#6908 (comment)It also fixes #171.
(cc @pradyunsg @cjerdonek)