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

simplejson not installed when installing webargs on Python 2.7 #363

Closed
sloria opened this issue Jan 27, 2019 · 3 comments

Comments

@sloria
Copy link
Member

commented Jan 27, 2019

Discovered in: inveniosoftware/invenio-files-rest#185 (comment)

We are currently distributing a universal wheel built on Python 3.6 (in Travis). So when the wheel is built, this conditional is never True. This results in a wheel that doesn't contain simplejson as a dependency on Python 2.7.

One solution would be to distribute different wheels for Python 2 and for Python 3.

mostafa added a commit to mostafa/grest that referenced this issue Jan 28, 2019

1. Monkey-patch simplejson library to fix API inconsistencies in Python
marshmallow-code/webargs#360 marshmallow-code/webargs#363

2. Add simplejson to requirements.txt
3. Remove quick-fix changes to tests
4. Bump webargs version to 5.1.0

mostafa added a commit to mostafa/grest that referenced this issue Jan 28, 2019

1. Monkey-patch simplejson library to fix API inconsistencies in Python
marshmallow-code/webargs#360 marshmallow-code/webargs#363

2. Add simplejson to requirements.txt
3. Remove quick-fix changes to tests
4. Bump webargs version to 5.1.0
@lafrech

This comment has been minimized.

Copy link
Member

commented Jan 28, 2019

One solution would be to distribute different wheels for Python 2 and for Python 3.

That would be the ideal solution.

If it is too much trouble, we could drop the condition and require simplejson for any Python version. Until we manage to make two different builds or we drop Python 2...

@sloria

This comment has been minimized.

Copy link
Member Author

commented Jan 28, 2019

This might be as simple as setting universal = 0 in setup.cfg then adding a Travis build stage that runs in a Python 2 environment. I might give this a shot sometime this week.

sloria added a commit that referenced this issue Jan 28, 2019

Build separate wheels for Python 2 and 3
simplejson is conditionally required for Python 2, so
a separate wheel needs to be built for it.

see #363
@sloria

This comment has been minimized.

Copy link
Member Author

commented Jan 28, 2019

OK, webargs 5.1.1 will now install simplejson when installed with Python 2.

@sloria sloria closed this Jan 28, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.