{"action":"created","issue":{"url":"https://api.github.com/repos/PyCQA/pylint/issues/1216","repository_url":"https://api.github.com/repos/PyCQA/pylint","labels_url":"https://api.github.com/repos/PyCQA/pylint/issues/1216/labels{/name}","comments_url":"https://api.github.com/repos/PyCQA/pylint/issues/1216/comments","events_url":"https://api.github.com/repos/PyCQA/pylint/issues/1216/events","html_url":"https://github.com/PyCQA/pylint/issues/1216","id":195644924,"number":1216,"title":"pylint failing on Python 3.5","user":{"login":"jonparrott","id":250995,"avatar_url":"https://avatars.githubusercontent.com/u/250995?v=3","gravatar_id":"","url":"https://api.github.com/users/jonparrott","html_url":"https://github.com/jonparrott","followers_url":"https://api.github.com/users/jonparrott/followers","following_url":"https://api.github.com/users/jonparrott/following{/other_user}","gists_url":"https://api.github.com/users/jonparrott/gists{/gist_id}","starred_url":"https://api.github.com/users/jonparrott/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonparrott/subscriptions","organizations_url":"https://api.github.com/users/jonparrott/orgs","repos_url":"https://api.github.com/users/jonparrott/repos","events_url":"https://api.github.com/users/jonparrott/events{/privacy}","received_events_url":"https://api.github.com/users/jonparrott/received_events","type":"User","site_admin":false},"labels":[{"id":297274515,"url":"https://api.github.com/repos/PyCQA/pylint/labels/bug","name":"bug","color":"fc2929","default":true}],"state":"closed","locked":false,"assignee":{"login":"PCManticore","id":448166,"avatar_url":"https://avatars.githubusercontent.com/u/448166?v=3","gravatar_id":"","url":"https://api.github.com/users/PCManticore","html_url":"https://github.com/PCManticore","followers_url":"https://api.github.com/users/PCManticore/followers","following_url":"https://api.github.com/users/PCManticore/following{/other_user}","gists_url":"https://api.github.com/users/PCManticore/gists{/gist_id}","starred_url":"https://api.github.com/users/PCManticore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PCManticore/subscriptions","organizations_url":"https://api.github.com/users/PCManticore/orgs","repos_url":"https://api.github.com/users/PCManticore/repos","events_url":"https://api.github.com/users/PCManticore/events{/privacy}","received_events_url":"https://api.github.com/users/PCManticore/received_events","type":"User","site_admin":false},"assignees":[{"login":"PCManticore","id":448166,"avatar_url":"https://avatars.githubusercontent.com/u/448166?v=3","gravatar_id":"","url":"https://api.github.com/users/PCManticore","html_url":"https://github.com/PCManticore","followers_url":"https://api.github.com/users/PCManticore/followers","following_url":"https://api.github.com/users/PCManticore/following{/other_user}","gists_url":"https://api.github.com/users/PCManticore/gists{/gist_id}","starred_url":"https://api.github.com/users/PCManticore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PCManticore/subscriptions","organizations_url":"https://api.github.com/users/PCManticore/orgs","repos_url":"https://api.github.com/users/PCManticore/repos","events_url":"https://api.github.com/users/PCManticore/events{/privacy}","received_events_url":"https://api.github.com/users/PCManticore/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/PyCQA/pylint/milestones/2","html_url":"https://github.com/PyCQA/pylint/milestone/2","labels_url":"https://api.github.com/repos/PyCQA/pylint/milestones/2/labels","id":1755668,"number":2,"title":"2.0","description":"Wanted features:\r\n\r\n- less verbose by default, tiered analysis\r\n\r\n- proper confidence levels\r\n\r\n- proper defaults\r\n\r\n- Python 3.6 support\r\n\r\n- f-strings","creator":{"login":"PCManticore","id":448166,"avatar_url":"https://avatars.githubusercontent.com/u/448166?v=3","gravatar_id":"","url":"https://api.github.com/users/PCManticore","html_url":"https://github.com/PCManticore","followers_url":"https://api.github.com/users/PCManticore/followers","following_url":"https://api.github.com/users/PCManticore/following{/other_user}","gists_url":"https://api.github.com/users/PCManticore/gists{/gist_id}","starred_url":"https://api.github.com/users/PCManticore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PCManticore/subscriptions","organizations_url":"https://api.github.com/users/PCManticore/orgs","repos_url":"https://api.github.com/users/PCManticore/repos","events_url":"https://api.github.com/users/PCManticore/events{/privacy}","received_events_url":"https://api.github.com/users/PCManticore/received_events","type":"User","site_admin":false},"open_issues":10,"closed_issues":18,"state":"open","created_at":"2016-05-09T15:04:09Z","updated_at":"2016-12-16T13:29:59Z","due_on":"2016-11-15T00:00:00Z","closed_at":null},"comments":5,"created_at":"2016-12-14T21:02:46Z","updated_at":"2016-12-16T17:51:47Z","closed_at":"2016-12-16T13:29:59Z","body":"### Steps to reproduce\r\n1. clone https://github.com/GoogleCloudPlatform/google-auth-library-python\r\n2. run `tox -e lint`\r\n\r\n### Current behavior\r\n\r\nFails with the following stacktrace:\r\n\r\n```\r\nlint runtests: commands[2] | python scripts/run_pylint.py\r\nTraceback (most recent call last):\r\n  File \".tox/lint/lib/python3.5/site-packages/astroid/manager.py\", line 172, in file_from_module_name\r\n    value = self._mod_file_cache[(modname, contextfile)]\r\nKeyError: ('google.auth._default', None)\r\n\r\nDuring handling of the above exception, another exception occurred:\r\n\r\nTraceback (most recent call last):\r\n  File \".tox/lint/bin/pylint\", line 11, in <module>\r\n    sys.exit(run_pylint())\r\n  File \".tox/lint/lib/python3.5/site-packages/pylint/__init__.py\", line 13, in run_pylint\r\n    Run(sys.argv[1:])\r\n  File \".tox/lint/lib/python3.5/site-packages/pylint/lint.py\", line 1311, in __init__\r\n    linter.generate_reports()\r\n  File \"/python3/3.5.1/Frameworks/Python.framework/Versions/3.5/lib/python3.5/contextlib.py\", line 77, in __exit__\r\n    self.gen.throw(type, value, traceback)\r\n  File \".tox/lint/lib/python3.5/site-packages/pylint/lint.py\", line 1133, in fix_import_path\r\n    yield\r\n  File \".tox/lint/lib/python3.5/site-packages/pylint/lint.py\", line 1310, in __init__\r\n    linter.check(args)\r\n  File \".tox/lint/lib/python3.5/site-packages/pylint/lint.py\", line 732, in check\r\n    self._do_check(files_or_modules)\r\n  File \".tox/lint/lib/python3.5/site-packages/pylint/lint.py\", line 863, in _do_check\r\n    self.check_astroid_module(ast_node, walker, rawcheckers, tokencheckers)\r\n  File \".tox/lint/lib/python3.5/site-packages/pylint/lint.py\", line 944, in check_astroid_module\r\n    walker.walk(ast_node)\r\n  File \".tox/lint/lib/python3.5/site-packages/pylint/utils.py\", line 944, in walk\r\n    self.walk(child)\r\n  File \".tox/lint/lib/python3.5/site-packages/pylint/utils.py\", line 941, in walk\r\n    cb(astroid)\r\n  File \".tox/lint/lib/python3.5/site-packages/pylint/checkers/variables.py\", line 1055, in visit_importfrom\r\n    module = self._check_module_attrs(node, module, name_parts[1:])\r\n  File \".tox/lint/lib/python3.5/site-packages/pylint/checkers/variables.py\", line 1125, in _check_module_attrs\r\n    module = next(module.getattr(name)[0].infer())\r\n  File \".tox/lint/lib/python3.5/site-packages/astroid/scoped_nodes.py\", line 92, in decorator\r\n    nodes = [n for n in func(*args, **kwargs) if not isinstance(n, cls)]\r\n  File \".tox/lint/lib/python3.5/site-packages/astroid/scoped_nodes.py\", line 434, in getattr\r\n    return [self.import_module(name, relative_only=True)]\r\n  File \".tox/lint/lib/python3.5/site-packages/astroid/scoped_nodes.py\", line 492, in import_module\r\n    return MANAGER.ast_from_module_name(absmodname)\r\n  File \".tox/lint/lib/python3.5/site-packages/astroid/manager.py\", line 116, in ast_from_module_name\r\n    filepath, mp_type = self.file_from_module_name(modname, context_file)\r\n  File \".tox/lint/lib/python3.5/site-packages/astroid/manager.py\", line 176, in file_from_module_name\r\n    modname.split('.'), context_file=contextfile)\r\n  File \".tox/lint/lib/python3.5/site-packages/astroid/modutils.py\", line 369, in file_info_from_modpath\r\n    return _file_from_modpath(modpath, path, context)\r\n  File \".tox/lint/lib/python3.5/site-packages/astroid/modutils.py\", line 582, in _file_from_modpath\r\n    mtype, mp_filename = _module_file(modpath, path)\r\n  File \".tox/lint/lib/python3.5/site-packages/astroid/modutils.py\", line 670, in _module_file\r\n    stream, mp_filename, mp_desc = imp.find_module(modname, path)\r\n  File \".tox/lint/lib/python3.5/imp.py\", line 270, in find_module\r\n    \"not {}\".format(type(name)))\r\nRuntimeError: 'list' must be None or a list, not <class 'str'>\r\nPylint failed on Library with status 1.\r\n```\r\n\r\n### Expected behavior\r\n\r\nI expected it to lint and yell at me about *my* code. :)\r\n\r\n### pylint --version output\r\n\r\n```\r\n$ ./.tox/lint/bin/pylint --version\r\nNo config file found, using default configuration\r\npylint 1.6.4,\r\nastroid 1.4.8\r\nPython 3.5.1 (default, Jan 22 2016, 11:49:07)\r\n[GCC 4.2.1 Compatible Apple LLVM 7.0.2 (clang-700.1.81)]\r\n```\r\n\r\n### Some herrings\r\n\r\n1. This only occurs on 3.5, it doesn't occur with 3.4 (and we don't test against 3.3).\r\n1. This could be related to https://github.com/pypa/setuptools/issues/885 as we saw the issues arise at the same time, but maybe not. \r\n1. google-auth is a namespace package, and those always cause all kinds of fun. :)\r\n\r\nPlease let me know if I can do anything to help reproduce or fix."},"comment":{"url":"https://api.github.com/repos/PyCQA/pylint/issues/comments/267654342","html_url":"https://github.com/PyCQA/pylint/issues/1216#issuecomment-267654342","issue_url":"https://api.github.com/repos/PyCQA/pylint/issues/1216","id":267654342,"user":{"login":"jonparrott","id":250995,"avatar_url":"https://avatars.githubusercontent.com/u/250995?v=3","gravatar_id":"","url":"https://api.github.com/users/jonparrott","html_url":"https://github.com/jonparrott","followers_url":"https://api.github.com/users/jonparrott/followers","following_url":"https://api.github.com/users/jonparrott/following{/other_user}","gists_url":"https://api.github.com/users/jonparrott/gists{/gist_id}","starred_url":"https://api.github.com/users/jonparrott/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonparrott/subscriptions","organizations_url":"https://api.github.com/users/jonparrott/orgs","repos_url":"https://api.github.com/users/jonparrott/repos","events_url":"https://api.github.com/users/jonparrott/events{/privacy}","received_events_url":"https://api.github.com/users/jonparrott/received_events","type":"User","site_admin":false},"created_at":"2016-12-16T17:51:47Z","updated_at":"2016-12-16T17:51:47Z","body":"@PCManticore seems so - using the latest code from git for `pylint` and `astroid` I get the following:\r\n\r\n```\r\ntox --recreate -e lint\r\nGLOB sdist-make: /Users/jonwayne/workspace/google-auth/setup.py\r\nlint recreate: /Users/jonwayne/workspace/google-auth/.tox/lint\r\nlint installdeps: flake8, flake8-import-order, git+git://github.com/PyCQA/astroid.git, git+git://github.com/PyCQA/pylint.git, docutils\r\nlint inst: /Users/jonwayne/workspace/google-auth/.tox/dist/google-auth-0.5.0.zip\r\nlint installed: astroid==1.5.0,docutils==0.13.1,editdistance==0.3.1,flake8==3.2.1,flake8-import-order==0.11,google-auth==0.5.0,isort==4.2.5,lazy-object-proxy==1.2.2,mccabe==0.5.3,pyasn1==0.1.9,pyasn1-modules==0.0.8,pycodestyle==2.2.0,pyflakes==1.3.0,pylint==2.0.0,rsa==3.4.2,six==1.10.0,wrapt==1.10.8\r\nlint runtests: PYTHONHASHSEED='3650788564'\r\nlint runtests: commands[0] | python setup.py check --metadata --restructuredtext --strict\r\nrunning check\r\nlint runtests: commands[1] | flake8 --import-order-style=google --application-import-names=google,tests,system_tests google tests\r\nlint runtests: commands[2] | python /Users/jonwayne/workspace/google-auth/scripts/run_pylint.py\r\nTraceback (most recent call last):\r\n  File \"/Users/jonwayne/workspace/google-auth/.tox/lint/bin/pylint\", line 11, in <module>\r\n    load_entry_point('pylint==2.0.0', 'console_scripts', 'pylint')()\r\n  File \"/Users/jonwayne/workspace/google-auth/.tox/lint/lib/python3.5/site-packages/pylint/__init__.py\", line 13, in run_pylint\r\n    Run(sys.argv[1:])\r\n  File \"/Users/jonwayne/workspace/google-auth/.tox/lint/lib/python3.5/site-packages/pylint/lint.py\", line 1301, in __init__\r\n    linter.generate_reports()\r\n  File \"/Users/jonwayne/homebrew/Cellar/python3/3.5.1/Frameworks/Python.framework/Versions/3.5/lib/python3.5/contextlib.py\", line 77, in __exit__\r\n    self.gen.throw(type, value, traceback)\r\n  File \"/Users/jonwayne/workspace/google-auth/.tox/lint/lib/python3.5/site-packages/pylint/lint.py\", line 1124, in fix_import_path\r\n    yield\r\n  File \"/Users/jonwayne/workspace/google-auth/.tox/lint/lib/python3.5/site-packages/pylint/lint.py\", line 1300, in __init__\r\n    linter.check(args)\r\n  File \"/Users/jonwayne/workspace/google-auth/.tox/lint/lib/python3.5/site-packages/pylint/lint.py\", line 726, in check\r\n    self._do_check(files_or_modules)\r\n  File \"/Users/jonwayne/workspace/google-auth/.tox/lint/lib/python3.5/site-packages/pylint/lint.py\", line 855, in _do_check\r\n    self.check_astroid_module(ast_node, walker, rawcheckers, tokencheckers)\r\n  File \"/Users/jonwayne/workspace/google-auth/.tox/lint/lib/python3.5/site-packages/pylint/lint.py\", line 934, in check_astroid_module\r\n    walker.walk(ast_node)\r\n  File \"/Users/jonwayne/workspace/google-auth/.tox/lint/lib/python3.5/site-packages/pylint/utils.py\", line 997, in walk\r\n    self.walk(child)\r\n  File \"/Users/jonwayne/workspace/google-auth/.tox/lint/lib/python3.5/site-packages/pylint/utils.py\", line 994, in walk\r\n    cb(astroid)\r\n  File \"/Users/jonwayne/workspace/google-auth/.tox/lint/lib/python3.5/site-packages/pylint/checkers/imports.py\", line 410, in visit_importfrom\r\n    self._add_imported_module(node, '%s.%s' % (importedmodnode.name, name))\r\n  File \"/Users/jonwayne/workspace/google-auth/.tox/lint/lib/python3.5/site-packages/pylint/checkers/imports.py\", line 641, in _add_imported_module\r\n    module_file)\r\n  File \"/Users/jonwayne/workspace/google-auth/.tox/lint/lib/python3.5/site-packages/astroid/modutils.py\", line 437, in get_module_part\r\n    context_file=context_file)\r\n  File \"/Users/jonwayne/workspace/google-auth/.tox/lint/lib/python3.5/site-packages/astroid/modutils.py\", line 338, in file_from_modpath\r\n    return file_info_from_modpath(modpath, path, context_file).location\r\n  File \"/Users/jonwayne/workspace/google-auth/.tox/lint/lib/python3.5/site-packages/astroid/modutils.py\", line 383, in file_info_from_modpath\r\n    return _spec_from_modpath(modpath, path, context)\r\n  File \"/Users/jonwayne/workspace/google-auth/.tox/lint/lib/python3.5/site-packages/astroid/modutils.py\", line 597, in _spec_from_modpath\r\n    found_spec = spec.find_spec(modpath, [context])\r\n  File \"/Users/jonwayne/workspace/google-auth/.tox/lint/lib/python3.5/site-packages/astroid/interpreter/_import/spec.py\", line 258, in find_spec\r\n    submodule_path or path)\r\n  File \"/Users/jonwayne/workspace/google-auth/.tox/lint/lib/python3.5/site-packages/astroid/interpreter/_import/spec.py\", line 220, in _find_spec_with_path\r\n    spec = finder.find_module(modname, module_parts, processed, submodule_path)\r\n  File \"/Users/jonwayne/workspace/google-auth/.tox/lint/lib/python3.5/site-packages/astroid/interpreter/_import/spec.py\", line 87, in find_module\r\n    stream, mp_filename, mp_desc = imp.find_module(modname, submodule_path)\r\n  File \"/Users/jonwayne/workspace/google-auth/.tox/lint/lib/python3.5/imp.py\", line 270, in find_module\r\n    \"not {}\".format(type(name)))\r\nRuntimeError: 'list' must be None or a list, not <class 'str'>\r\nPylint failed on Library with status 1.\r\nERROR: InvocationError: '/Users/jonwayne/workspace/google-auth/.tox/lint/bin/python /Users/jonwayne/workspace/google-auth/scripts/run_pylint.py'\r\n```"}}
{"actor":{"display_login":"jonparrott"}}