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

Preserve non-decodable %-sequences intact when unquote. #532

Merged

Conversation

serhiy-storchaka
Copy link
Contributor

Closes #517.

@psf-chronographer psf-chronographer bot added the bot:chronographer:provided There is a change note present in this PR label Oct 13, 2020
@codecov
Copy link

codecov bot commented Oct 13, 2020

Codecov Report

Merging #532 into master will decrease coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #532      +/-   ##
==========================================
- Coverage   99.72%   99.72%   -0.01%     
==========================================
  Files           4        4              
  Lines         739      737       -2     
  Branches      167      165       -2     
==========================================
- Hits          737      735       -2     
  Misses          2        2              
Flag Coverage Δ
#unit 99.72% <100.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
yarl/_quoting_py.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 43c9c21...0ca3778. Read the comment docs.

CHANGES/517.bugfix Outdated Show resolved Hide resolved
@@ -12,7 +12,7 @@ junit_suite_name = yarl_test_suite


[flake8]
ignore = E301,E302,E704,W503,W504,F811
ignore = E203,E301,E302,E704,W503,W504,F811
Copy link
Member

Choose a reason for hiding this comment

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

I'd rather inject a few noqas if it's really necessary

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Too many noqas should be injected. blake produces code incompatible with flake8.

Co-authored-by: Sviatoslav Sydorenko <[email protected]>
@serhiy-storchaka
Copy link
Contributor Author

The downside is the loss of performance.
Before:

Cython unquote: 0.305 sec
Python unquote: 2.103 sec

After:

Cython unquote: 0.753 sec
Python unquote: 2.700 sec

@serhiy-storchaka
Copy link
Contributor Author

Fixed the performance regression in Cython:

Cython unquote: 0.266 sec
Python unquote: 2.615 sec

Copy link
Member

@asvetlov asvetlov left a comment

Choose a reason for hiding this comment

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

LGTM!

@asvetlov asvetlov merged commit 1ce7c84 into aio-libs:master Nov 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bot:chronographer:provided There is a change note present in this PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Only last octet is left in non-UTF-8 %-encoded sequence
3 participants