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

Python 3 support #13

Open
lddubeau opened this issue Sep 21, 2016 · 7 comments
Open

Python 3 support #13

lddubeau opened this issue Sep 21, 2016 · 7 comments

Comments

@lddubeau
Copy link
Contributor

Running caniusepython3 on the requirements of my project reports eulexistdb as a blocking package. Indeed, looking at the tox.ini it seems it is not yet supported on Python 3. Are there plans for such support?

@rlskoeser
Copy link
Contributor

@lddubeau no current plans

@lddubeau
Copy link
Contributor Author

Ok, it is something that I may be able to contribute at some point but I currently do not have a timeline for this.

@miraenator
Copy link

miraenator commented Nov 4, 2016

I was able to run it (Docker from FROM zopyx/existdb-30), debian based. I needed to perfrom the following steps (copied from my Dockerfile).

Note that I've only tested eulexistdb.db.ExistDB() and createCollection() functions.

// installation
apt-get install python3-pip python3-lxml python3-urllib3 libzip-dev libxml2-dev libxslt-dev
pip3 install eulexistdb

// fles to be modified
ENV EXISTDB_PKG /usr/local/lib/python3.4/dist-packages/eulexistdb
ENV EXISTDB_PY ${EXISTDB_PKG}/db.py
ENV EXISTDB_PATCH ${EXISTDB_PKG}/patch.py
ENV EXISTDB_EXC ${EXISTDB_PKG}/exceptions.py
ENV EXISTDB_QRY ${EXISTDB_PKG}/query.py

// substitute imports and certain vars
RUN
sed -i 's/import xmlrpclib/import xmlrpc.client/' $EXISTDB_PY &&
sed -i 's/xmlrpclib/xmlrpc/g' $EXISTDB_PY &&
sed -i 's/xmlrpclib/xmlrpc/g' $EXISTDB_PATCH &&
sed -i 's/xmlrpclib/xmlrpc/g' $EXISTDB_EXC &&
sed -i 's/iteritems()/items()/g' $EXISTDB_PY &&
sed -i 's/iteritems()/items()/g' $EXISTDB_QRY &&
sed -i 's/import urlparse/import urllib.parse/' $EXISTDB_PY &&
sed -i 's/from urllib import splittype/from urllib.request import splittype/' $EXISTDB_PY &&
sed -i 's/xmlrpc.Transport/xmlrpc.client.Transport/g' $EXISTDB_PY &&
sed -i 's/xmlrpc.Fault/xmlrpc.client.Fault/g' $EXISTDB_PY &&
sed -i 's/xmlrpc.ProtocolError/xmlrpc.client.ProtocolError/g' $EXISTDB_PY &&
sed -i 's/xmlrpc.ServerProxy/xmlrpc.client.ServerProxy/g' $EXISTDB_PY &&
sed -i 's/xmlrpc.version/xmlrpc.client.version/g' $EXISTDB_PY &&
sed -i 's/from urllib import unquote_plus/from urllib.parse import unquote_plus/' $EXISTDB_EXC &&
sed -i 's/from types import BooleanType//' $EXISTDB_QRY &&
sed -i 's/BooleanType/boolean/g' $EXISTDB_QRY && \

@zmbq
Copy link

zmbq commented Apr 12, 2018

We have a fork of this project that is compatible with Python 3 (in fact, it is not compatible with Python 2). You can find it here.

You can simply install it with pip install pyexistdb .

@lddubeau
Copy link
Contributor Author

@zmbq The project here seems to have been abandoned (I'm saying this due to the lack of activity on both this and eulxml). Your fork could become the successor to eulexistdb, but there's no way to file an issue on your fork right now, and because it is treated as a fork rather than a standalone repository, github does not allow searching through your code.

@rlskoeser
Copy link
Contributor

rlskoeser commented Sep 5, 2019

@lddubeau @zmbq agree that Emory seems to have no interest in maintaining this project - it doesn't look like it's been touched since I left Emory about 3 years ago.

It makes me happy that there's an active fork! Not sure how you resolve the repo being a fork rather than a standalone repo, but I imagine there is some way around that.

I suggest you open an issue asking that Emory mark this package as deprecated / no longer actively maintained and link to your version as the replacement. They ought to be glad to do that!

@zmbq
Copy link

zmbq commented Sep 5, 2019

@lddubeau , I'm not sure how to unfork a project. I'll probably need to contact github support, or just create a new copy in another repo.

@rlskoeser , we're not really maintaining this fork. We needed eXistdb for a small project, and didn't want to use Python 2.7, so we forked this library. We have not used eXist db since, and had no use for the library, either. If there's something specific to fix, and it only takes a little while, we can fix it, but I doubt it will be anything substantial.

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

No branches or pull requests

4 participants