Skip to content

Conversation

@kdmccormick
Copy link

@kdmccormick kdmccormick commented Sep 26, 2019

This PR fixes an issue where I was while running into while trying to run the latest pylint (2.4.1) with the latest pylint-django (2.0.11):

Traceback (most recent call last):
  File "/home/kyle/worktracker/venv/lib/python3.7/site-packages/pylint_plugin_utils/__init__.py", line 3, in <module>
    from pylint.utils import UnknownMessage
ImportError: cannot import name 'UnknownMessage' from 'pylint.utils' (/home/kyle/worktracker/venv/lib/python3.7/site-packages/pylint/utils/__init__.py)

I did some digging, and it looks like UnknownMessageError has lived in pylint.exceptions since Pylint v1.7: https://github.com/PyCQA/pylint/blob/033201f7216512757dcda1f09ea6d4f7ba9fc2e3/pylint/utils.py#L36. However, this library continued to work because Python allows you to import names that have been imported into a module. Around Pylint 2.4, the utils module was refactored in such a way that it didn't expose `UnknownMessageError , which broke this library.

This PR fixes the import path, and bumps the version from 0.5 to 0.6.

@kdmccormick kdmccormick marked this pull request as ready for review September 26, 2019 03:32
@kdmccormick
Copy link
Author

Closed because this duplicates #16

@kdmccormick kdmccormick deleted the kdmccormick/import-fix branch September 26, 2019 03:35
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.

1 participant