Merged
Conversation
ohemorange
requested changes
Jan 17, 2025
Contributor
ohemorange
left a comment
There was a problem hiding this comment.
I like this approach better! I agree it's not worth it to warn on import, this seems fine to me. I did just remember though that sphinx has a deprecated tag, which we should add.
Co-authored-by: ohemorange <ebportnoy@gmail.com>
ohemorange
approved these changes
Jan 17, 2025
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
this is an alternate to #206
one thing i noticed is that all code deprecated in #206 uses ComparableX509 in some way so maybe we could just put this warning in one spot. i also expanded the warning text a bit and put something about it in the changelog
initially i also wanted to make use of code like https://github.com/certbot/josepy/blob/main/src/josepy/util.py#L259-L293 so users who have code like
from josepy.util import ComparableX509get a warning about that problematic import as well, but it's kind of annoying because we also reexport ComparableX509 in__init__.py. we could also do the same thing there, but it gets a little messy because with a naive approach__init__.pywould be generating its own warning for importingjosepy.util.ComparableX509on top of generating another warning if anyone touches the reexported attribute. i personally think all that is probably too much to be worth the effort and this warning inComparableX509.__init__is good enougherica, feel free to suggest changes or update one of your own PRs with proposed alternatives