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

Use python-swiftclient instead of requests #31

Closed
mgeisler opened this issue Mar 17, 2014 · 4 comments
Closed

Use python-swiftclient instead of requests #31

mgeisler opened this issue Mar 17, 2014 · 4 comments
Assignees

Comments

@mgeisler
Copy link
Contributor

Currently, zpm interacts with Swift using our own little Swift client. We should reuse the client made by OpenStack.

@larsbutler
Copy link
Member

It seems that there are some issues with python-swiftclient and python3. I'm going to investigate further.

@larsbutler
Copy link
Member

Yup, indeed there are some issues. See https://review.openstack.org/#/c/67637/.

@larsbutler
Copy link
Member

After talking with one of the core contributors to python-swiftclient in the #openstack-dev channel, it seems this issue is close to being resolved. IRC transcript:

chmouel: larsbutler: we are working on getting swiftclient with python3  we have two patches left to merge and this should all be passing under py3 (and gated after)
chmouel: larsbutler: i don't think swift depend of swiftclient anymore since we have been working toward removing that dependence in this release

chmouel also mentioned that there are two related patches currently under review:

@larsbutler larsbutler removed their assignment May 21, 2014
@mgeisler
Copy link
Contributor Author

I looked into this yesterday and we're almost good to go. The remaining problem is a lack of support for Python 3.2 in python-swiftclient.

More precisely, python-swiftclient pulls in simplejson, which has no Python 3.2 support. It is an optional dependency, but merely trying to import simplejson in Python 3.2 results in a SyntaxError. I've opened tickets and pull requests for this with requests and pip:

I hope we'll see this merged in the near future and then we can get rid of the miniswift module.

mgeisler added a commit to mgeisler/zpm that referenced this issue May 27, 2014
Python version 3.0 to 3.2 had no support for u'...' Unicode literals.
The support was added again in Python 3.3 to make it easier to port
code from Python 2.x.

The lack of u'...' support has not been a direct problem for us, we
would like to use python-swiftclient instead of our own miniswift
module (zerovm#31). However, python-swiftclient only supports Python 3.3 and
later. More precisely, python-swiftclient tries to import simplejson
and this fails with a SyntaxError on Python 3.2.

The simplejson project will probably not support Python 3.2 anytime
soon:

  simplejson/simplejson#66

We will therefore also drop support for Python 3.2 for now. We will
work with the upstream projects to see if it is easy to restore Python
3.2 support. The first pull request for one of our dependencies has
been positively received:

  https://github.com/kennethreitz/requests/pull/2064

Pip is also affected by this problem and an issue has been created:

  pypa/pip#1839
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants