-
Notifications
You must be signed in to change notification settings - Fork 12
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
Support Python 3.7 #564
Closed
Closed
Support Python 3.7 #564
Conversation
This file contains 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
This commit makes the test scripts compatible with Python 3.8. - It removes all typing annotations, adding some additional commentary instead. - It removes the | operator for dictionaries - It removes `match` on enums - It removes `removeprefix()` It also notes and fixes some problematic uses of objects (specifically `{}` and `[]`) being used for default-values; `None` is used instead and the intended default values installed at the beginning of the function. Signed-off-by: Hanno Becker <[email protected]>
This enables the use of the `functest` action outside of the nix shell, where `./scripts` and `./scripts/ci` may not be in the PATH. Signed-off-by: Hanno Becker <[email protected]>
Signed-off-by: Hanno Becker <[email protected]>
This commit makes the use of `sudo` optional in the `setup-ubuntu` action. This is to make it suitable for running on Ubuntu Docker images, which do not come with `sudo` by default. Signed-off-by: Hanno Becker <[email protected]>
Signed-off-by: Hanno Becker <[email protected]>
Some compilers don't seem to like it. Signed-off-by: Hanno Becker <[email protected]>
Signed-off-by: Hanno Becker <[email protected]>
This commit extends the CI to run compatibility tests for Docker images - ubuntu-22.04:gcc-12x - ubuntu-22.04:gcc-11x - ubuntu-20.04:gcc-8x - ubuntu-20.04:gcc-7x - ubuntu-20.04:clang-9x - ubuntu-20.04:clang-8x - ubuntu-20.04:clang-7x-bm-framework - ubuntu-20.04:clang-7x - ubuntu-20.04:clang-10x - ubuntu-22.04:base Those images are pre-built on a custom EC2 AMI, and match the images used in the AWS-LC CI. Signed-off-by: Hanno Becker <[email protected]>
mkannwischer
force-pushed
the
python3.7
branch
2 times, most recently
from
December 21, 2024 16:41
4778401
to
792fb85
Compare
The recent pyyaml 6.0.2 dropped support for anything before Python 3.8. As we want to support Python 3.7, we cannot use the most recent version of pyyaml. Using an old version (6.0.1) would be a workaround. This commit eliminates the dependency on pyyaml. We only use yaml in a single place to parse META.yml which contains meta-information (we mostly care about various testvector hashes that we compare to). This commit switches that to a json representation as json parsing is well supported natively in all Python versions we care about (and we use json parsing in the ACVP tests anyway). Signed-off-by: Matthias J. Kannwischer <[email protected]>
For some reason f"{enum_value}" evaluates to the numeric representation (e.g, "1" for TEST_TYPES.MLKEM) in Python3.7, while it evaluates to the string representation (__str__) in Python >=3.8. Workaround would to be to add an explicit str(...), but this commit instead adds an explicit function called make_target mapping a test type to a make target. This would also allow us to use a differnt name for the make target than the name of the enum value. Signed-off-by: Matthias J. Kannwischer <[email protected]>
mkannwischer
force-pushed
the
python3.7
branch
from
December 21, 2024 16:44
792fb85
to
02343f8
Compare
Included in #562 |
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.
Depends on #563