-
Notifications
You must be signed in to change notification settings - Fork 22
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
Change Python version checking due conflicts with libraries that patch urllib patching #36
Conversation
I realized in |
Concur - checking for a stdlib attribute as a way to differentiate between Python versions seems very roundabout. Any way to get this released? @MisterRios You might want to push this as a single commit. |
Since we're already importing from |
@agriffis The version of six bundled here only checks for PY3- https://github.com/zacharyvoase/urlobject/blob/master/urlobject/six.py#L31 The source six does check for PY2, but it's not available in this repo- https://bitbucket.org/gutworth/six/src/8b024292064c9d2fbd7a4f352c40b261b91fd058/six.py?fileviewer=file-view-default#six.py-36 The reason I check for PY2 in particular is that only python2 will use |
@agriffis I've inserted The possible future change in |
@MisterRios Thanks, this seems like a sensible approach. If we unbundle six eventually then we'll just rely on a sufficiently recent version. |
@agriffis Since the last release was a while ago - would it be possible to roll a quick point release with this commit? Our CI server (and we as well) would be extremely grateful! |
@jonasvp v2.4.2 now released on PyPI! |
Hi there, I found a conflict with the isort library in which urllib is patched: https://github.com/timothycrosley/isort/blob/develop/isort/pie_slice.py#L135
This causes urlobject to use
_qs_encode_py2
and_qs_decode_py2
functions.In Python3, this throws a
NameError: name 'unicode' is not defined
as Python3 no longer has the unicode type.Found via a Django project using spurl which has urlobject as a dependency.