-
Notifications
You must be signed in to change notification settings - Fork 11
update to python3 #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
base: master
Are you sure you want to change the base?
Conversation
this was looking for the py2 urllib.addinforurl. Should this now look for http.client.HTTPResponse?
…tring, not string (is this always the case?) has_key is deprecated/gone
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.
Looks okay to me by glancing at the code.
The tests pass on Python 3.9, except for two ConnectionRefusedErrors, which you also saw.
It is not compatible with Python 2 though, because of changes in document.py
, see inline comment. I guess we would want both Python 2 and 3 compatibility, but maybe that is not needed. In that case we could drop the use of six
for urlopen
.
Can one of the contributors of this package comment on which Python versions should be supported with a new version? Any chance that this gets merged?
cc @glenfant @petri @kdeldycke @pdpotter. Are you still using this?
import fnmatch | ||
import urllib | ||
import imghdr | ||
from http.client import HTTPResponse |
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.
This gives an error on Python 2:
from . import document
openxmllib/document.py:13: in <module>
from http.client import HTTPResponse
E ImportError: No module named http.client
Hey @mauritsvanrees! Last time I used this library was 10 years ago! 😅 Maybe you can ask @glenfant (owner of the repo and original author) or @petri (last commiter/releaser) to grant you admin rights on so you can merge and clean up that PR. You can even cut a new release. I just realized I'm a maintainer on PyPi so I can invite you there. |
@mauritsvanrees , I just recognized you from my old Zope days, and you were a serious contributor back then. So to unblock any initiative of yours, I just invited you as owner of the |
@kdeldycke Thanks! |
Good thinking adding the |
+1 for merging & Python3 only being fine now. Someone wants to use this with Python2 can use the current soon-to-be older version. |
This updates the code package to be python3 compliant.
All tests pass except for 2 that try to request a doc from 127.0.0.1:8088. I'm not sure what that file is supposed to be.