Skip to content

Python Requirements Update #89

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

Merged
merged 2 commits into from
Jan 24, 2022

Conversation

edx-requirements-bot
Copy link
Contributor

Python requirements update.Please review the changelogs for the upgraded packages.

Deleted obsolete pull_requests:
#87

@michaelroytman
Copy link
Contributor

The one breaking change is in the setuptools library, but I don't believe it'll affect this library. See release notes here.

@michaelroytman
Copy link
Contributor

There is a failing test. The error is

`ImportError: cannot import name 'scoped_nodes' from 'astroid.nodes' (/home/runner/work/super-csv/super-csv/.tox/quality/lib/python3.8/site-packages/astroid/nodes.py)

I believe this is due to a conflict between the versions of astroid==2.6.6 and pylint-django==2.5.0.

pylint-django==2.5.0 includes a change to the way modules from the astroid library are imported. In particular, from astroid import MANAGER, AstroidImportError, inference_tip, nodes, scoped_nodes changed to from astroid.nodes import scoped_nodes. It doesn't appear that pylint-django lists its dependencies, but the pull request references the following

astroid.scoped_nodes is deprecated and will be moved to astroid.nodes.scoped_nodes in astroid 3.0 - see https://github.com/PyCQA/astroid/blob/main/astroid/scoped_nodes.py#L26

However it seems like the release of 2.9.1 moved some members already, so this PR just uses the new locations.

The 2.5.0 version of pylint-django assumes astroid >= 2.9.1 is installed. However, we have an older version of astroid installed that has not yet moved the module, hence the error, as our version of pylint-django expects the moved module.

The older version of astroid comes from pylint and pylint-celery. Our version of pylint is 2.7.4. We have a constraint pylint<2.8, with the comment version 2.8 introduced breaking changes that have not yet been resolved, can be removed when version 2.8.2 is released. pylint is on version 2.12.2, so we have passed the threshold for removing this constraint. I'm going to try removing this constraint and see what happens.

@michaelroytman michaelroytman force-pushed the jenkins/upgrade-python-requirements-026331e branch 2 times, most recently from 6b46347 to d649bfb Compare January 21, 2022 21:54
Copy link
Contributor

@matthugs matthugs left a comment

Choose a reason for hiding this comment

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

good call just adding ignores for the with pylint rule

When running pylint, the following error occurs, "ImportError: cannot import name 'scoped_nodes' from 'astroid.nodes' (/home/runner/work/super-csv/super-csv/.tox/quality/lib/python3.8/site-packages/astroid/nodes.py)".

This is due to a conflict between the versions of astroid==2.6.6 and pylint-django==2.5.0.

pylint-django==2.5.0 includes a change to the way modules from the astroid library are imported. In particular, "from astroid import MANAGER, AstroidImportError, inference_tip, nodes, scoped_nodes" changed to "astroid.nodes import scoped_nodes". It doesn't appear that pylint-django lists its dependencies, but the pull request references the following

"astroid.scoped_nodes is deprecated and will be moved to astroid.nodes.scoped_nodes in astroid 3.0 - see https://github.com/PyCQA/astroid/blob/main/astroid/scoped_nodes.py#L26

However it seems like the release of 2.9.1 moved some members already, so this PR just uses the new locations."

The 2.5.0 version of pylint-django assumes astroid>=2.9.1 is installed. However, we have an older version of astroid installed that has not yet moved the nodes module, hence the error, as our version of pylint-django expects the moved module.

The older version of astroid comes from pylint and pylint-celery. Our version of pylint is 2.7.4. We have a constraint pylint<2.8` with the comment "version 2.8 introduced breaking changes that have not yet been resolved, can be removed when version 2.8.2 is released". pylint is on version 2.12.2, so we have passed the threshold for removing this constraint.
@michaelroytman michaelroytman force-pushed the jenkins/upgrade-python-requirements-026331e branch from d649bfb to d98ac89 Compare January 24, 2022 18:45
@michaelroytman michaelroytman merged commit 2ce1597 into master Jan 24, 2022
@michaelroytman michaelroytman deleted the jenkins/upgrade-python-requirements-026331e branch January 24, 2022 18:48
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

Successfully merging this pull request may close these issues.

3 participants