python-pushover icon indicating copy to clipboard operation
python-pushover copied to clipboard

Use_2to3 has been removed from setuptools. No longer builds.

Open mcondren opened this issue 3 years ago • 11 comments

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.

mcondren avatar Oct 12 '21 17:10 mcondren

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

chrisjohnson00 avatar Nov 01 '21 15:11 chrisjohnson00

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.

mcondren avatar Nov 01 '21 16:11 mcondren

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

chrisjohnson00 avatar Nov 14 '21 20:11 chrisjohnson00

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?

laurent-radoux avatar Nov 22 '21 18:11 laurent-radoux

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.

mcondren avatar Nov 22 '21 18:11 mcondren

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?

laurent-radoux avatar Nov 22 '21 18:11 laurent-radoux

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

roseeng avatar Mar 25 '22 18:03 roseeng

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

karolzlot avatar Mar 26 '22 09:03 karolzlot

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.

mcondren avatar Mar 30 '22 14:03 mcondren

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 avatar Sep 06 '22 19:09 mcelhennyi

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 https://github.com/Thibauth/python-pushover/pull/27

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

dchevell avatar Sep 26 '22 21:09 dchevell