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 python packages cbor2 and pyhpke to third party tools #49598

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

xtlsheep
Copy link

@xtlsheep xtlsheep commented Dec 9, 2024

Add new python packages cbor2 and pyhpke to tools/third_party for Google Chrome WPT support. This change is based on the discussion of web-platform-tests/rfcs#208.

Note for cbor2, the imported version is release 5.6.5 which is the last version to support python 3.8 in Web Platform Tests.

cbor2: https://github.com/agronholm/cbor2
pyhpke: https://github.com/dajiaji/pyhpke

@gsnedders
Copy link
Member

  • Use typing.Mapping instead of collections.abc.Mapping for class FrozenDictin in tools/third_party/cbor2/cbor2/_types.py to avoid python version error.

What error are you avoiding by doing that? Both typing.Mapping and collections.abc.Mapping should exist in Python 3.8 and later.

@xtlsheep
Copy link
Author

xtlsheep commented Dec 9, 2024

  • Use typing.Mapping instead of collections.abc.Mapping for class FrozenDictin in tools/third_party/cbor2/cbor2/_types.py to avoid python version error.

What error are you avoiding by doing that? Both typing.Mapping and collections.abc.Mapping should exist in Python 3.8 and later.

I got this error:

TypeError: 'ABCMeta' object is not subscriptable

@gsnedders
Copy link
Member

gsnedders commented Dec 9, 2024

Oh, right.

agronholm/cbor2@d9cee77 made the change here to drop Python 3.8 support, but that commit doesn't appear in any release. Is there a reason why we're pulling in the current master branch rather than an actual release?

Relatedly, can you please add to the commit message what versions are being imported, such that anyone in the future could replicate this?

@xtlsheep
Copy link
Author

Oh, right.

agronholm/cbor2@d9cee77 made the change here to drop Python 3.8 support, but that commit doesn't appear in any release. Is there a reason why we're pulling in the current master branch rather than an actual release?

Relatedly, can you please add to the commit message what versions are being imported, such that anyone in the future could replicate this?

Good point, are you suggesting that I should import the version which still supports python 3.8?

@xtlsheep xtlsheep changed the title Add python packages cbor2 and pyhpke to third party tools Revert cbor2 to release 5.6.5 which supports python 3.8 Dec 12, 2024
@xtlsheep
Copy link
Author

Oh, right.

agronholm/cbor2@d9cee77 made the change here to drop Python 3.8 support, but that commit doesn't appear in any release. Is there a reason why we're pulling in the current master branch rather than an actual release?

Relatedly, can you please add to the commit message what versions are being imported, such that anyone in the future could replicate this?

Revert cbor2 to release 5.6.5 and I have verified that this version works well with WPT.

@xtlsheep xtlsheep changed the title Revert cbor2 to release 5.6.5 which supports python 3.8 Add python packages cbor2 and pyhpke to third party tools Dec 12, 2024
@WeizhongX WeizhongX requested a review from gsnedders December 17, 2024 20:01
@WeizhongX
Copy link
Contributor

@gsnedders is your question all addressed? can you pls approve this one?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants