Skip to content

pycodestyle 2.3.1 py36 egg in PyPI has "v2.4.0" code #764

@ginoledesma

Description

@ginoledesma

Hi, All

I'm not sure who maintains the publishing of the pycodestyle module in PyPI, but I've been running into issues very similar to #741 , where pytest-flake8 was pulling in v2.3.1 of pycodestyle yet failing to run with exactly the same stack trace as issue #741. We were getting inconsistent results depending on the way we were setting up our environment — pip vs setuptools.

It seems like a build of 2.3.1 at commit 8f3aebd was published as a py36 egg to PyPI, but this is different from the tagged release at https://github.com/PyCQA/pycodestyle/tree/2.3.1.

$ curl -O https://files.pythonhosted.org/packages/9a/4c/40238ba394be5c2d3d794f072695331dd3e2111351e2820e45352eefc9e9/pycodestyle-2.3.1-py2.7.egg
$ curl -O https://files.pythonhosted.org/packages/e4/81/78fe51eb4038d1388b7217dd63770b0f428370207125047312886c923b26/pycodestyle-2.3.1-py2.py3-none-any.whl
$ curl -O https://files.pythonhosted.org/packages/2a/ad/19df03d320cbf2b5e32444bdc9e52f212d2c2a8e9202137c68f780c7e6f4/pycodestyle-2.3.1-py3.6.egg
$ curl -O https://files.pythonhosted.org/packages/e1/88/0e2cbf412bd849ea6f1af1f97882add46a374f4ba1d2aea39353609150ad/pycodestyle-2.3.1.tar.gz

$ mkdir py27-egg py36-egg wheel tar

$ unzip pycodestyle-2.3.1-py2.py3-none-any.whl -d wheel/
$ unzip pycodestyle-2.3.1-py2.7.egg -d py27-egg/
$ unzip pycodestyle-2.3.1-py3.6.egg -d py36-egg/
$ tar -C tar/ -zxvf pycodestyle-2.3.1.tar.gz 

$ find . -type f -name pycodestyle.py -exec shasum {} ';'
1ffe96ff7a0e4f3602569c7a8136d035d4c3c52d  ./wheel/pycodestyle.py
59c6e99db5e1f02b95b56b1502f647b724a38700  ./py36-egg/pycodestyle.py
1ffe96ff7a0e4f3602569c7a8136d035d4c3c52d  ./tar/pycodestyle-2.3.1/pycodestyle.py
17c3428ec0c4c240ebca7a72a43d05a8bd71d6ab  ./py27-egg/pycodestyle.py

The python 2.7 egg seems to be working ok (haven't fully tested), but it's python 3.6 egg that's broken. If for some reason setuptools/pip picks up the egg version of the package (instead of wheel/source), and they happen to be running python 3.6+, then they could run into this problem as well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions