-
Notifications
You must be signed in to change notification settings - Fork 50
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
Don't shell out to GPG on import #437
Changes from all commits
56697ad
cb8e32b
19ba269
c879125
a5c0087
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
# and then run "tox" from this directory. | ||
|
||
[tox] | ||
envlist = mypy, py37, py38, py39, py310, purepy38, py38-no-gpg | ||
envlist = mypy, py37, py38, py39, py310, purepy38, py38-no-gpg, py38-test-gpg-fails | ||
skipsdist = True | ||
|
||
[testenv] | ||
|
@@ -33,6 +33,14 @@ setenv = | |
commands = | ||
python -m tests.check_public_interfaces_gpg | ||
|
||
# This checks that importing securesystemslib.gpg.constants doesn't shell out on | ||
# import. | ||
[testenv:py38-test-gpg-fails] | ||
setenv = | ||
GNUPG = false | ||
commands = | ||
python -c "import securesystemslib.gpg.constants" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
This failed before occasionally (e.g. on timeout), right? I don't think we need this in addition to There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @znewman01, please remove unless necessary. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It failed every time before, not occasionally. Note that I set I don't believe that It might be clearer to replace As to the question—is this necessary? I don't know; are any tests necessary? Without it, we're not really checking that the issue is fixed—I could revert the rest of the PR and the existing tests would still pass. Up to the maintainers whether you want a test for the fix or not. |
||
|
||
[testenv:mypy] | ||
commands = | ||
mypy |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
May I ask why
maxsize=3
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have to put a maxsize for py3.7, which is in the tox matrix. Otherwise would use the default.
I picked 3 because we should only call it three times under normal circumstances (
gpg
,gpg2
,$GNUPG
). That's perhaps a little bit too clever but I had a hard time justifying other numbers.