-
Notifications
You must be signed in to change notification settings - Fork 160
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
Fix IPv6 zone handling, lowercase in domain name and compressed ip ad… #144
Conversation
except ValueError: | ||
pass | ||
netloc = netloc.encode('idna').decode('ascii') |
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.
In [15]: timeit 'lasdhglajkdshflkajsdfh.asdf.asdf.asdf.asdf.asdf.rtyty'.encode('ascii')
1000000 loops, best of 3: 283 ns per loop
In [16]: timeit 'lasdhglajkdshflkajsdfh.asdf.asdf.asdf.asdf.asdf.rtyty'.encode('idna').decode('ascii')
100000 loops, best of 3: 2.77 µs per loop
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.
Is it the case ?
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.
Sorry, don't follow the question.
Codecov Report
@@ Coverage Diff @@
## master #144 +/- ##
==========================================
+ Coverage 99.63% 99.63% +<.01%
==========================================
Files 2 2
Lines 542 544 +2
Branches 135 137 +2
==========================================
+ Hits 540 542 +2
Partials 2 2
Continue to review full report at Codecov.
|
else: | ||
(ip, *zone) = netloc.split('%', 1) |
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.
use .partition()
Merged by 7d8f58b |
…dresses.