rsgalloway / pyseq

Compressed sequence string module for Python
https://pyseq.rsgalloway.com/
Other
123 stars 36 forks source link

0.5.3 Install Fails with Python 2.7 #64

Closed Anti-Distinctlyminty closed 3 years ago

Anti-Distinctlyminty commented 3 years ago

I know things are supposed to be moving to Python 3, but if I try to pip install 0.5.3 with Python 2.7 I get

Collecting pyseq
  Using cached pyseq-0.5.3.1.tar.gz (12 kB)
    ERROR: Command errored out with exit status 1:
     command: 'c:\users\workstationl\python\tests\nymusclient\.venv\scripts\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'c:\\users\\workst~1\\appdata\\local\\temp\\pip-install-xtppgu\\pyseq\\setup.py'"'"'; __file__='"'"'c:\\users\\workst~1\\appdata\\local\\temp\\pip-install-xtppgu\\pyseq\\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 'c:\users\workst~1\appdata\local\temp\pip-pip-egg-info-gk711c'
         cwd: c:\users\workst~1\appdata\local\temp\pip-install-xtppgu\pyseq\
    Complete output (5 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "c:\users\workst~1\appdata\local\temp\pip-install-xtppgu\pyseq\setup.py", line 13, in <module>
        with open(path.join(this_directory, 'README.rst'), encoding='utf-8') as f:
    TypeError: 'encoding' is an invalid keyword argument for this function
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

0.5.2 installs ok.

rsgalloway commented 3 years ago

Thanks for the report. Sorry this slipped through the cracks. Seems like an easy fix, but I'll need to install py27 to test it (maybe naively assumed py3 is the standard now).

jrottenberg commented 3 years ago

Thank you @Anti-Distinctlyminty I wanted to report the same issue, it is not py26 related. It looks like some metadata were added on the package creating 0.5.3 (good) and 0.5.3.1 (one too many digit for semver)

$ docker run -it python:3-stretch bash
root@1fba709f3f92:/# pip install pyseq==0.5.3
Collecting pyseq==0.5.3
  ERROR: Could not find a version that satisfies the requirement pyseq==0.5.3 (from versions: 0.2.0b0, 0.2.1b0, 0.3.0, 0.3.1, 0.4.1, 0.4.2, 0.4.3, 0.4.4, 0.5.0, 0.5.1, 0.5.2, 0.5.3.1)
ERROR: No matching distribution found for pyseq==0.5.3
WARNING: You are using pip version 19.2.3, however version 21.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

See that extra .1 ?

I'm sure that was not intended :

$ docker run -it python:3-stretch bash
root@545946522f6b:/# pip install pyseq==0.5.3.1
Collecting pyseq==0.5.3.1
  Downloading https://files.pythonhosted.org/packages/6a/d0/95249d6e2da46869ff21ff2ade74397ad71a8a53d8c315973b79bf617c92/pyseq-0.5.3.1.tar.gz
  WARNING: Requested pyseq==0.5.3.1 from https://files.pythonhosted.org/packages/6a/d0/95249d6e2da46869ff21ff2ade74397ad71a8a53d8c315973b79bf617c92/pyseq-0.5.3.1.tar.gz#sha256=76df331310a020109fb074d460851a92199c4ebb394decdfeabdff98070967a4, but installing version 0.5.3
Building wheels for collected packages: pyseq
  Building wheel for pyseq (setup.py) ... done
  Created wheel for pyseq: filename=pyseq-0.5.3-cp37-none-any.whl size=14093 sha256=074a60c5aea54d57388ed742c5c15201f9de2a9fa7bd1fae10e8cec4117175d3
  Stored in directory: /root/.cache/pip/wheels/ae/5d/95/12634830be18bb410c9c00037b788bdf8c11cf45926d78df27
Successfully built pyseq
Installing collected packages: pyseq
Successfully installed pyseq-0.5.3
WARNING: You are using pip version 19.2.3, however version 21.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
root@545946522f6b:/# pip freeze
pyseq==0.5.3
jrottenberg commented 3 years ago

@rsgalloway Would it be worth creating a new release ?

It's blocking installation, for example with a pipenv based project :

[packages]
pyseq = "==0.5.*"

On install it fails with :

[...]
ar/folders/w5/wd__d7vn6tjc0k0ktztlchs40000gn/T/pipenv-c5wv7zdw-requirements/pipenv-vvum3er4-requirement.txt (line 1)) has inconsistent version: filename has '0.5.3.1', but metadata has '0.5.3'
[pipenv.exceptions.InstallError]: ERROR: Could not find a version that satisfies the requirement pyseq==0.5.3.1
[pipenv.exceptions.InstallError]: ERROR: No matching distribution found for pyseq==0.5.3.1

We can pin in the Pipfile to 0.5.2, since 0.5.3 is not installable, but we will have to adjust on 0.5.4.

rsgalloway commented 3 years ago

There was a minor issue with the 0.5.3 release and pypi does not support overriding existing uploads, hence the 0.5.3.1 pypi version.

I agree, the easiest solution may be cutting a 0.5.4 release to address this and the py2.7 compatibility. Will work on that today and push an update.

rsgalloway commented 3 years ago

pull request posted here: https://github.com/rsgalloway/pyseq/pull/65

let me know if you see any issues, otherwise will merge and push to pypi tomorrow.

rsgalloway commented 3 years ago

Just pushed 0.5.4 to pypi, hopefully this issue is resolved now.

https://pypi.org/project/pyseq/0.5.4/

jrottenberg commented 3 years ago

Confirmed, thank you @rsgalloway !