Skip to content
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

Add support for Python3.10 #300

Merged
merged 3 commits into from
Aug 27, 2024
Merged

Conversation

mihaimaruseac
Copy link
Collaborator

Summary

Suport Python 3.10 so that we can use the library in Google Colab without having to reinstall.

We only need 2 changes:

  • Self needs to be imported from typing_extensions
  • hashlib.file_digest needs to be implemented manually. I backported the implementation that Python uses, adapted to our scenario.

Release Note

NONE

Documentation

NONE

Signed-off-by: Mihai Maruseac <[email protected]>
Signed-off-by: Mihai Maruseac <[email protected]>
@mihaimaruseac mihaimaruseac marked this pull request as ready for review August 27, 2024 18:47
@mihaimaruseac mihaimaruseac requested review from a team as code owners August 27, 2024 18:47
@mihaimaruseac mihaimaruseac added this to the V1 release milestone Aug 27, 2024
spencerschrock
spencerschrock previously approved these changes Aug 27, 2024
Comment on lines 202 to 203
else:
# Polyfill for Python 3.10
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TIL about polyfill. Just another term for backport?

Optional: The Go dev in me would say drop the else to reduce indentation one block, but dont know if this applies in Python so free to ignore.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's from Javascript, it's for anything that covers a gap in some implementation (like a browser missing some feature). In our case it's the same as backport.

Good idea on dropping the else. I shortened the link too, so now we don't have a line that is too long.

Signed-off-by: Mihai Maruseac <[email protected]>
@mihaimaruseac mihaimaruseac merged commit ae62038 into sigstore:main Aug 27, 2024
17 checks passed
@mihaimaruseac mihaimaruseac deleted the py3.10 branch August 27, 2024 20:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants