RPCError messages should use repr, not str#120
Merged
stylewarning merged 3 commits intomasterfrom Feb 25, 2020
Merged
Conversation
appleby
reviewed
Feb 24, 2020
2a57915 to
fb98d58
Compare
appleby
suggested changes
Feb 24, 2020
Contributor
There was a problem hiding this comment.
fyi, latest changes appear to have broken some of the pytests
https://gitlab.com/rigetti/forest/rpcq/-/jobs/448340424
Also for the record, it's worth considering whether there are any potential information leakage issues associated with switching from str to repr. I can't think of any reason why this should be considered an "unsafe" change, but mentioning it in case anyone else can. The only reason it occurs to me at all is I recently came across an internal issue that mentions scrubbing error messages to prevent leaking info.
edit: to be clear, I think any code that is depending on the difference between str and repr to hide sensitive info is already Doing it Wrong.
added 2 commits
February 24, 2020 12:42
appleby
approved these changes
Feb 24, 2020
stylewarning
approved these changes
Feb 25, 2020
appleby
added a commit
that referenced
this pull request
Feb 27, 2020
In #120 we switch from `str` to `repr` for printing exceptions, which broke the python tests on 3.7+ due a change in python's default BaseException.__repr__, which dropped the trailing comma. https://docs.python.org/3/whatsnew/3.7.html#changes-in-the-python-api
appleby
added a commit
that referenced
this pull request
Feb 27, 2020
In #120 we switched from `str` to `repr` for printing exceptions, which broke the python tests on 3.7+ due a change in python's default BaseException.__repr__, which dropped the trailing comma. https://docs.python.org/3/whatsnew/3.7.html#changes-in-the-python-api
stylewarning
pushed a commit
that referenced
this pull request
Feb 28, 2020
In #120 we switched from `str` to `repr` for printing exceptions, which broke the python tests on 3.7+ due a change in python's default BaseException.__repr__, which dropped the trailing comma. https://docs.python.org/3/whatsnew/3.7.html#changes-in-the-python-api
Merged
This file contains hidden or 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
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.
Using
stroften provides less information thanrepr.