dmeranda / demjson

Python module for JSON data encoding, including jsonlint. See the project Wiki here on Github. Also read the README at the bottom of this page, or the project homepage at
http://deron.meranda.us/python/demjson/
Other
302 stars 76 forks source link

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

Open techdragon opened 2 years ago

techdragon commented 2 years ago

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

ra-esmith commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

@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.

intgr commented 2 years ago

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 commented 2 years ago

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

thmo commented 2 years ago

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

LaikaN57 commented 2 years ago

@dmeranda bump (comments above)