Skip to content
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

simplyfy ascii escaping by using backslashreplace error handling #2734

Merged

Conversation

RonnyPfannschmidt
Copy link
Member

No description provided.

@RonnyPfannschmidt RonnyPfannschmidt changed the title [wip] simplyfy ascii escaping by using backslashreplace error handling simplyfy ascii escaping by using backslashreplace error handling Aug 30, 2017
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.004%) to 92.111% when pulling 78a027e on RonnyPfannschmidt:simplify-string-safening into 488bbd2 on pytest-dev:features.

@RonnyPfannschmidt
Copy link
Member Author

oh fun, it seems like this is broken due to bugs on older python3's :(

@@ -146,13 +145,7 @@ def _ascii_escaped(val):

"""
if isinstance(val, bytes):
if val:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should fallback to the old code in Python 3.3 and Python 3.4. It will make the current code uglier of course, but at least when we drop 3.4 we will get the chance of getting the better version.

If we don't merge this I fear we end up just forgetting about it.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i will declare the a function sometime later to handle the detail

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good

@@ -0,0 +1 @@
- simplify ascii string escaping by using the backslashreplace error handler
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: please use full sentences:

Internal refactor: simplify ascii string escaping by using the backslashreplace error handler in newer Python 3 versions.

@RonnyPfannschmidt RonnyPfannschmidt self-assigned this Aug 31, 2017
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.04%) to 92.071% when pulling 13eac94 on RonnyPfannschmidt:simplify-string-safening into 488bbd2 on pytest-dev:features.

@nicoddemus
Copy link
Member

Thanks @RonnyPfannschmidt, took the liberty of applying the change I suggested to the CHANGELOG and merging, hope you don't mind. 👍

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.06%) to 92.054% when pulling 3d70727 on RonnyPfannschmidt:simplify-string-safening into 488bbd2 on pytest-dev:features.

@nicoddemus nicoddemus merged commit e1f2254 into pytest-dev:features Sep 6, 2017
@RonnyPfannschmidt
Copy link
Member Author

thanks for fixing what i missed 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants