-
Notifications
You must be signed in to change notification settings - Fork 86
Fixed issue #61 #187
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
Fixed issue #61 #187
Conversation
…all changes so formatting may be slightly different, but it should be the same functionality wise. I have a couple errors that I believe are not from my own changes (they were there on master when I pulled and pertain to there not being valid AWS credentials for tests for the most part), but they should not be important.
instead of AlgorithmSuite. Changed messages in the docs accordingly. Now if you go to RTD you will see everything links together nicely. What I did not do: change the variable names from "algorithm" to i.e. "algorithm_suite". Mainly because this is a rabbit hole and not immediately important I think. To do it you need to change every single thing that calls another thing that calls another thing that has "algorithm" instead of "algorithm_suite" and I wanted to keep it simple. I also found what I think was an incorrect test. In /test/integration/test_i_aws_encryption_sdk_client.py in function test_remove_bad_client() there was an assertion error for my tox env tests that the dict containing the regional clients was not empty when it should have been supposedly. I believe that it was not meant for it to be empty, but for the bad client "us-fakey-12" to be removed, and it was assumed that in __init__ for KMSMasterKeyProvider() no regional clients were added, but this is false because there is a default added depending on some features of the botocore session etc... So when it was checking to see if it was empty it wanted to see that a bad client was added, and then was rightfully removed -> back to an empty dict, but if the dict did not start out empty the test would fail. So I made a one line change of this test to make it test that specifically the dict did not contain the exact bad client that the test was using. Please get back to me on this final change because you guys know this SDK way better than me and I don't want to break anything. Thanks!
AES_128_GCM_IV12_TAG16_NO_PADDING = (EncryptionType.SYMMETRIC, Algorithm.AES_128_GCM_IV12_TAG16, None, None, None) | ||
AES_192_GCM_IV12_TAG16_NO_PADDING = (EncryptionType.SYMMETRIC, Algorithm.AES_192_GCM_IV12_TAG16, None, None, None) | ||
AES_256_GCM_IV12_TAG16_NO_PADDING = (EncryptionType.SYMMETRIC, Algorithm.AES_256_GCM_IV12_TAG16, None, None, None) | ||
AES_128_GCM_IV12_TAG16_NO_PADDING = ( |
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.
Any specific reason you changed the formatting style here? (Many lines vs. one line per constant?) These should all match.
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.
this is a function of tox -re autoformat (and python black).
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.
Auto-formatting does this because some lines are too long, but some aren't. Making them all one line will fail flake8. They do pass if you make them all the new format, however. So the options are either to add some variables to shorten the text and make them all one line or make them all the new format. I think the latter is more readable, but both are valid options. I've committed changes to standardize to the second option tentatively.
Closing stale PR, please reopen as needed |
Same as PR #182 but actually works. Thank goodness for git reset --hard because otherwise the keyring stuff just messed up my entire PR.
This replaces all references to Algorithm with references to AlgorithmSuite to fix readthedocs Sphinx linking.