-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Mitigate the pylint error caused by setuptools #1625
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Should probably have Derek weigh in as well.
Thank you. I just added @derekbekoe to the reviewers list as well. |
Even with the older version of setuptools, I'm still getting this import-error behavior with pylint on Python 3.5, but 2.7 works. |
Respond to @tjprescott last comment. More people may hit this. To fix the environment your need to:
|
@@ -25,13 +25,15 @@ def exec_command(command): | |||
print('Running dev setup...') | |||
print('Root directory \'{}\'\n'.format(root_dir)) | |||
|
|||
# install general requirements | |||
exec_command('pip install -r requirements.txt') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tjprescott There was a reason we has the install of requirements last.
It was to prevent command modules that are installed later from overriding what we have in requirements.txt.
It was with azure-mgmt-keyvault
back when we were using the azure
rollup package.
@troydai Is this particular change required for this fix to work?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since the PR has already been merged, I'm just bringing this to attention.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@derekbekoe it was required because otherwise it installs the newest setuptools, screws everything up, and then installs the desired setuptools. However, it seems that KeyVault no longer breaks even with this change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok then, so I can move the requirement.txt restore back to the bottom but specifically install setuptools==30.4.0 at the beginning, does it sound good?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we don't have the keyvault problem anymore, I have no issue with it as is. :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we no longer have the problem because we now depend on the individual packages. IIRC, the problem originated because we had modules depending on the roll-up package, which would replace the version of KV management that it needed with an older version.
Since 12/12/2016, the CI build on python 3.5-dev began failing while running pylint. The errors are import-error. The error was caused by setuptools. The python 3.5-dev build uses the latest setuptools. A change introduced between 30.4.0 and 31.0.0 add additional
.pth
file to the installation folder under virtualenv. The files obviously confused the pylint causeimport-error
in turn.This change will fix the setuptools version to 30.4.0 to mitigate this issue.