-
Notifications
You must be signed in to change notification settings - Fork 26
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
[Review 4] Fixes #1072: Ensuring ASCII-only in exceptions, warnings and repr() #1397
Conversation
3581532
to
c6cba1e
Compare
b4f573a
to
290a0f6
Compare
bad6958
to
48783fd
Compare
c426a62
to
40a779a
Compare
40a779a
to
920a55d
Compare
920a55d
to
195eea3
Compare
195eea3
to
3973cc8
Compare
fdb4d45
to
8904562
Compare
f986e55
to
7ee5dbd
Compare
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 looked through a bunch of the changes. I also ran the tests and Pegasus tests and did not find anything. However, I did not review each and every change in all 20 something files.
I could not find the changes.rst change to cover this. Finally, does this mean that we really want to force all prints in the future to use format??? |
Details: * Changed all usages of old-style formatting (i.e. using '%') to use new-style formatting with the new `_utils._format()` function. Usages of %r have been made ASCII-ensuring by the use of the new 'A' conversion specifier. Some usages of %s have also been made ASCII-ensuring that way. * Changed most usages of new-style formatting based on the str.format() function to use the new `_utils._format()` function. All usages of 'r' conversion have been changed to use the new 'A' conversion. Some usages of 's' conversion (the default) have also been changed to use the new 'A' conversion, in order to ensure ASCII-only. * Changed all implementations of `__repr__()` functions to use use new-style formatting with the new `_utils._format()` function and the new 'A' conversion specifier instead of '%r' or '!r'. * Adjusted the expected test results intest_cim_obj.py accordingly. * Now that the CIM object representations use the ASCII-only formatting, their repr() output is the same for py2 and py3. This allowed further simplifying test_recorder.py to get rid of the post-processing of the unicode indicator 'u'. Signed-off-by: Andreas Maier <andreas.r.maier@gmx.de>
7ee5dbd
to
c90d7eb
Compare
I added a change log entry. |
As discussed in the call today, we would use new-style formatting for all future use. And also convert the old-style formatting to new-style in testsuite. |
Note: This PR is on top of PR #1403.
For details, see the commit message (of the last commit).
Ready for review and merge.