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_2to3 has been removed from setuptools. No longer builds. #42

Open
mcondren opened this issue Oct 12, 2021 · 11 comments
Open

Use_2to3 has been removed from setuptools. No longer builds. #42

mcondren opened this issue Oct 12, 2021 · 11 comments

Comments

@mcondren
Copy link

mcondren commented Oct 12, 2021

https://setuptools.pypa.io/en/latest/history.html#v58-0-0

No longer installs it throws a

bash-5.1# pip3 install python-pushover Collecting python-pushover Using cached python-pushover-0.4.tar.gz (19 kB) ERROR: Command errored out with exit status 1: command: /usr/local/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-rdilmzkd/python-pushover/setup.py'"'"'; __file__='"'"'/tmp/pip-install-rdilmzkd/python-pushover/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-d0zpskx4 cwd: /tmp/pip-install-rdilmzkd/python-pushover/ Complete output (1 lines): error in python-pushover setup command: use_2to3 is invalid. ----------------------------------------

due to a call to use_2to3 in setup.py.

@chrisjohnson00
Copy link

Workaround:

Install setuptools 57.x.x

For example:

    pip install --upgrade pip setuptools==57.5.0
    pip install --upgrade python-pushover
    pip freeze > requirements.txt

@mcondren
Copy link
Author

mcondren commented Nov 1, 2021

Yes, thanks. On my own system I used 2to3 to convert the 3 code file permanently and then removed it as a requirement, however there are third-party docker containers that pull this API in and do pip installs on startup each time. My request was a fix at the source and in the pip repo so that the workarounds weren’t needed downstream.

@chrisjohnson00
Copy link

Understood and agreed... given the last release on this repo was in 2018, I figured others might land here and find the workaround helpful.

@laurent-radoux
Copy link

I encounter the same issue for one of my projects which makes it impossible to run tests via tox.
https://github.com/laurent-radoux/wanikani_notifier

Does anyone know what I could do?

@mcondren
Copy link
Author

I had to do a few things. Run all the .py files through 2_to_3, and also modify one of the the iteration methods to use the python 3 method of iteration. I could submit a PR, but I see an unapproved PR from last year, so I don’t want to put in that time to figure out how to submit it, if it won’t get merged.

@laurent-radoux
Copy link

Ok, thanks for the info.

Does that mean I should fork this repo, update it according to your instructions and reference the fork as a requirement for the projet that depends on this package?

@roseeng
Copy link

roseeng commented Mar 25, 2022

If you don't need exactly this package, a suggestion to people who come here is to use https://github.com/Wyattjoh/pushover

pip install git+https://github.com/Wyattjoh/pushover

@karolzlot
Copy link

karolzlot commented Mar 26, 2022

Another solution is to switch to this fork which solves the issue: https://github.com/almir1904/python-pushover

I think it is good idea to star it, so it will at some point become default (when number of stars will be greater than stars here).

You can add in requirements.txt:

--editable=git+https://github.com/almir1904/python-pushover.git#egg=python-pushover

@mcondren
Copy link
Author

I ended up dumping pushover in HA and using the node-red pushover node for alerting in my automation flows. That gets around these issues as it’s kept updated.

@mcelhennyi
Copy link

Another solution is to switch to this fork which solves the issue: https://github.com/almir1904/python-pushover

I think it is good idea to star it, so it will at some point become default (when number of stars will be greater than stars here).

You can add in requirements.txt:

--editable=git+https://github.com/almir1904/python-pushover.git#egg=python-pushover

I am not seeing a "Client" in the api, is this not a full fork?

@dchevell
Copy link
Contributor

dchevell commented Sep 26, 2022

Another solution is to switch to this fork which solves the issue: https://github.com/almir1904/python-pushover
I think it is good idea to star it, so it will at some point become default (when number of stars will be greater than stars here).
You can add in requirements.txt:

--editable=git+https://github.com/almir1904/python-pushover.git#egg=python-pushover

I am not seeing a "Client" in the api, is this not a full fork?

@mcelhennyi you'll notice that this repo has also dropped the Client class, the fork just reflects that. See #27

(Caught me by surprise too, especially since docs were never updated)

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