Closed gabor-varga closed 2 months ago
Thanks for submitting your first pull request! You are awesome! :hugs:
If you haven't done so already, check out EBP's Code of Conduct and our Contributing Guide, as this will greatly help the review process.
Welcome to the EBP community! :tada:
Heya, usedforsecurity
was only added in Python 3.9 https://docs.python.org/3/library/hashlib.html#hash-algorithms, so some handling for <3.9 needs to be implemented 😄
Heya,
usedforsecurity
was only added in Python 3.9 https://docs.python.org/3/library/hashlib.html#hash-algorithms, so some handling for <3.9 needs to be implemented 😄
Ah indeed, and I thought it was just a nice one-line PR :)
Ah indeed, and I thought it was just a nice one-line PR
They never are 😂
Ah indeed, and I thought it was just a nice one-line PR
They never are 😂
So I am not too proficient with python
, maybe you can recommend the best solution for this. This seems to be straightforward:
has_usedforsecurity_support = float(sys.version[:3]) >= 3.9
Or something with the inspect
module to check if md5
function supports the usedforsecurity
kwargs, although that seems convoluted.
And then just use something like:
md5_kwargs = {"usedforsecurity": False} if has_usedforsecurity_support else {}
hash = hashlib.md5(content.encode("utf8"), **md5_kwargs ).hexdigest()
Patch coverage is 100.00%
of modified lines.
Files Changed | Coverage |
---|---|
sphinx_design/extension.py | 100.00% |
:loudspeaker: Thoughts on this report? Let us know!.
@chrisjsewell do you think this is sufficient? I'll use my fork until the next release.
@chrisjsewell do you think this is sufficient? I'll use my fork until the next release.
Yep I think it's fine but bare with me to merge
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 90.01%. Comparing base (
074f21f
) to head (4651d30
).:exclamation: Current head 4651d30 differs from pull request most recent head f66fd84
Please upload reports for the commit f66fd84 to get more accurate results.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Congrats on your first merged pull request in this project! :tada:
Thank you for contributing, we are very proud of you! :heart:
Closes #161