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

Setuptools 58.0.0 has removed support for 2to3 during builds, breaks demjson for Python 3.x #40

Open
techdragon opened this issue Sep 6, 2021 · 8 comments

Comments

@techdragon
Copy link

More information here on the change is in the GitHub issue pypa/setuptools#2086 and in the setuptools ChangeLog https://setuptools.readthedocs.io/en/latest/history.html#v58-0-0

@ra-esmith
Copy link

Ok we are seeing this also. our pip install is throwing an error (which it was not a few days ago)
#11 15.16 Collecting demjson==2.2.4
#11 15.17 Downloading demjson-2.2.4.tar.gz (131 kB)
#11 15.34 ERROR: Command errored out with exit status 1:
#11 15.34 command: /usr/bin/python3 -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-7wn1mnox/demjson_e132b49dfc684875bd6306977e49549d/setup.py'"'"'; file='"'"'/tmp/pip-install-7wn1mnox/demjson_e132b49dfc684875bd6306977e49549d/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-h7oupxn7
#11 15.34 cwd: /tmp/pip-install-7wn1mnox/demjson_e132b49dfc684875bd6306977e49549d/
#11 15.34 Complete output (1 lines):
#11 15.34 error in demjson setup command: use_2to3 is invalid.
#11 15.34 ----------------------------------------
#11 15.34 WARNING: Discarding https://files.pythonhosted.org/packages/96/67/6db789e2533158963d4af689f961b644ddd9200615b8ce92d6cad695c65a/demjson-2.2.4.tar.gz#sha256=31de2038a0fdd9c4c11f8bf3b13fe77bc2a128307f965c8d5fb4dc6d6f6beb79 (from https://pypi.org/simple/demjson/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
#11 15.34 ERROR: Could not find a version that satisfies the requirement demjson==2.2.4 (from versions: 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 2.0, 2.0.1, 2.2, 2.2.1, 2.2.2, 2.2.3, 2.2.4)
#11 15.34 ERROR: No matching distribution found for demjson==2.2.4

@dmeranda
Copy link
Owner

dmeranda commented Sep 9, 2021

Thanks for the notification. This project has been in a "standby" mode for many years as it was written prior to the Python standard library having any JSON API. I was not aware how much this package was still being used.

To solve this I really need to make a Python 3 only major version and discontinue support for Python 2.

@ianrocha
Copy link

Ok we are seeing this also. our pip install is throwing an error (which it was not a few days ago)
#11 15.16 Collecting demjson==2.2.4
#11 15.17 Downloading demjson-2.2.4.tar.gz (131 kB)
#11 15.34 ERROR: Command errored out with exit status 1:
#11 15.34 command: /usr/bin/python3 -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-7wn1mnox/demjson_e132b49dfc684875bd6306977e49549d/setup.py'"'"'; file='"'"'/tmp/pip-install-7wn1mnox/demjson_e132b49dfc684875bd6306977e49549d/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-h7oupxn7
#11 15.34 cwd: /tmp/pip-install-7wn1mnox/demjson_e132b49dfc684875bd6306977e49549d/
#11 15.34 Complete output (1 lines):
#11 15.34 error in demjson setup command: use_2to3 is invalid.
#11 15.34 ----------------------------------------
#11 15.34 WARNING: Discarding https://files.pythonhosted.org/packages/96/67/6db789e2533158963d4af689f961b644ddd9200615b8ce92d6cad695c65a/demjson-2.2.4.tar.gz#sha256=31de2038a0fdd9c4c11f8bf3b13fe77bc2a128307f965c8d5fb4dc6d6f6beb79 (from https://pypi.org/simple/demjson/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
#11 15.34 ERROR: Could not find a version that satisfies the requirement demjson==2.2.4 (from versions: 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 2.0, 2.0.1, 2.2, 2.2.1, 2.2.2, 2.2.3, 2.2.4)
#11 15.34 ERROR: No matching distribution found for demjson==2.2.4

I'm having the same here :(

@techdragon
Copy link
Author

@dmeranda As a quick fix you could do a minor version or patch release of everything as it is but with a more specific version specified for setuptools But yeah a Python3 only release would be nice.

logan2211 added a commit to logan2211/consul-lock that referenced this issue Sep 13, 2021
Use the new demjson3 library to fix consullock install failure.
demjson is no longer possible to install on python3 when
setuptools >58.0.0 is used.

See this issue for more details:
dmeranda/demjson#40

Fixes wtsi-hgi#4
skovhus added a commit to electricitymaps/electricitymaps-contrib that referenced this issue Sep 21, 2021
demjson is no longer possible to install on python3 when
setuptools >58.0.0 is used.

dmeranda/demjson#40
skovhus added a commit to electricitymaps/electricitymaps-contrib that referenced this issue Sep 21, 2021
demjson is no longer possible to install on python3 when
setuptools >58.0.0 is used.

dmeranda/demjson#40
@intgr
Copy link

intgr commented Oct 5, 2021

It looks like there's already a Python 3 fork of this package at https://github.com/nielstron/demjson3 (PyPI: demjson3)

Maybe @dmeranda you could merge changes from that fork back here?

@intgr
Copy link

intgr commented Oct 5, 2021

Pinging @nielstron as well, the author of the demjson3 fork.

@thmo
Copy link

thmo commented Dec 6, 2021

Friendly ping from the Fedora package maintainer :)
@dmeranda, what is your position wrt @nielstron's Python3 fork?

@LaikaN57
Copy link

@dmeranda bump (comments above)

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

7 participants