Skip to content

Commit

Permalink
Pin astroid to 2.2.5
Browse files Browse the repository at this point in the history
  • Loading branch information
chocoelho committed Jul 25, 2019
1 parent 0733796 commit 5ea0e95
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
if sys.version_info < (3, 0):
_INSTALL_REQUIRES += ['pylint<2', 'pylint-django<0.9']
else:
_INSTALL_REQUIRES += ['pylint==2.3.1', 'pylint-django==2.0.10']
_INSTALL_REQUIRES += ['pylint==2.3.1', 'pylint-django==2.0.10', 'astroid==2.2.5']

_PACKAGE_DATA = {
'prospector': [
Expand Down

4 comments on commit 5ea0e95

@olibre
Copy link

@olibre olibre commented on 5ea0e95 Oct 14, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi

Pinning astroid==2.2.5 produces an issue when installing latest stable prospector==1.1.7 using latest stable Pipenv (version 2018.11.26).

There is a sub-dependency of Prospector requiring astroid>=2.3.0 but I do not reach identifying it… 🤔

I had to uninstall Prospector. 😿

@olibre
Copy link

@olibre olibre commented on 5ea0e95 Oct 14, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have reached to generate the pipenv graph.

I have removed unnecessary lines to reduce noise:
prospector==1.1.7 requires pylint-celery==0.3 that does not pin a particular Pylint version and Pipenv installs the latest one (Pylint 2.4.2) that requires astroid>=2.3.0.

prospector==1.1.7
  - astroid [required: ==2.2.5, installed: 2.3.1]
  - pylint [required: ==2.3.1, installed: 2.4.2]
    - astroid [required: >=2.3.0,<2.4, installed: 2.3.1]
  - pylint-celery [required: ==0.3, installed: 0.3]
    - astroid [required: >=1.0, installed: 2.3.1]
    - pylint [required: >=1.0, installed: 2.4.2]
      - astroid [required: >=2.3.0,<2.4, installed: 2.3.1]
    - pylint-plugin-utils [required: >=0.2.1, installed: 0.6]
      - pylint [required: >=1.7, installed: 2.4.2]
        - astroid [required: >=2.3.0,<2.4, installed: 2.3.1]
  - pylint-django [required: ==2.0.10, installed: 2.0.10]
    - pylint [required: >=2.0, installed: 2.4.2]
      - astroid [required: >=2.3.0,<2.4, installed: 2.3.1]
    - pylint-plugin-utils [required: >=0.5, installed: 0.6]
      - pylint [required: >=1.7, installed: 2.4.2]
        - astroid [required: >=2.3.0,<2.4, installed: 2.3.1]
  - pylint-flask [required: ==0.6, installed: 0.6]
    - astroid [required: >=1.0, installed: 2.3.1]
    - pylint [required: >=1.0, installed: 2.4.2]
      - astroid [required: >=2.3.0,<2.4, installed: 2.3.1]
    - pylint-plugin-utils [required: >=0.2.1, installed: 0.6]
      - pylint [required: >=1.7, installed: 2.4.2]
        - astroid [required: >=2.3.0,<2.4, installed: 2.3.1]
  - pylint-plugin-utils [required: >=0.2.6, installed: 0.6]
    - pylint [required: >=1.7, installed: 2.4.2]
      - astroid [required: >=2.3.0,<2.4, installed: 2.3.1]
  - requirements-detector [required: >=0.6, installed: 0.6]
    - astroid [required: >=1.4, installed: 2.3.1]

If pin pylint==2.3.1 it works:

prospector==1.1.7
  - astroid [required: ==2.2.5, installed: 2.2.5]
  - pylint [required: ==2.3.1, installed: 2.3.1]
    - astroid [required: >=2.2.0,<3, installed: 2.2.5]
  - pylint-celery [required: ==0.3, installed: 0.3]
    - astroid [required: >=1.0, installed: 2.2.5]
    - pylint [required: >=1.0, installed: 2.3.1]
      - astroid [required: >=2.2.0,<3, installed: 2.2.5]
    - pylint-plugin-utils [required: >=0.2.1, installed: 0.6]
      - pylint [required: >=1.7, installed: 2.3.1]
        - astroid [required: >=2.2.0,<3, installed: 2.2.5]
  - pylint-django [required: ==2.0.10, installed: 2.0.10]
    - pylint [required: >=2.0, installed: 2.3.1]
      - astroid [required: >=2.2.0,<3, installed: 2.2.5]
    - pylint-plugin-utils [required: >=0.5, installed: 0.6]
      - pylint [required: >=1.7, installed: 2.3.1]
        - astroid [required: >=2.2.0,<3, installed: 2.2.5]
  - pylint-flask [required: ==0.6, installed: 0.6]
    - astroid [required: >=1.0, installed: 2.2.5]
    - pylint [required: >=1.0, installed: 2.3.1]
      - astroid [required: >=2.2.0,<3, installed: 2.2.5]
    - pylint-plugin-utils [required: >=0.2.1, installed: 0.6]
      - pylint [required: >=1.7, installed: 2.3.1]
        - astroid [required: >=2.2.0,<3, installed: 2.2.5]
  - pylint-plugin-utils [required: >=0.2.6, installed: 0.6]
    - pylint [required: >=1.7, installed: 2.3.1]
      - astroid [required: >=2.2.0,<3, installed: 2.2.5]
  - pyyaml [required: Any, installed: 5.1.2]
  - requirements-detector [required: >=0.6, installed: 0.6]
    - astroid [required: >=1.4, installed: 2.2.5]
  - setoptconf [required: >=0.2.0, installed: 0.2.0]

@chocoelho
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While we'll have to work on updating pylint soon as we expect pylint-dev/pylint#3016 to be merged, it's pretty odd that Pipenv is enforcing the latest pylint version as from the graph the highest version in there would be pylint [required: ==2.3.1, installed: 2.3.1] as prospector pins. I'll take a look a it to see if there's anything else to be done here as astroid pinning is necessary to avoid breaking builds on unexpected/untested dependencies updates.

@olibre
Copy link

@olibre olibre commented on 5ea0e95 Oct 16, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this is weird from Pipenv 🙄
(maybe fixed, but no Pipenv release from a while…)

Of course, the issue is also obtained using Pip 🤗

$ python3 -m pip list --user --outdated --format freeze |
  cut -d= -f1 |
  xargs --no-run-if-empty python3 -m pip install --user --upgrade
[...]
ERROR: prospector 1.1.7 has requirement astroid==2.2.5, but you'll have astroid 2.3.1 which is incompatible.
ERROR: prospector 1.1.7 has requirement pep8-naming<=0.4.1,>=0.3.3, but you'll have pep8-naming 0.8.2 which is incompatible.
ERROR: prospector 1.1.7 has requirement pycodestyle<=2.4.0,>=2.0.0, but you'll have pycodestyle 2.5.0 which is incompatible.
ERROR: prospector 1.1.7 has requirement pyflakes<2.0.0,>=0.8.1, but you'll have pyflakes 2.1.1 which is incompatible.
ERROR: prospector 1.1.7 has requirement pylint==2.3.1, but you'll have pylint 2.4.2 which is incompatible.
ERROR: prospector 1.1.7 has requirement pylint-django==2.0.10, but you'll have pylint-django 2.0.11 which is incompatible.
[...]

Please sign in to comment.