Bug 1586028

Summary: python-pocketlint FTBFS with astroid 2.0.0
Product: [Fedora] Fedora Reporter: Miro Hrončok <mhroncok>
Component: python-pocketlintAssignee: Vojtech Trefny <vtrefny>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: jkonecny, vtrefny
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: python-pocketlint-0.16-1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-06-07 09:14:24 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1565020    

Description Miro Hrončok 2018-06-05 10:56:36 UTC
Description of problem: python-pocketlint FTBFS with astroid 2.0.0 (the version of astroid needed for Python 3.7).


Version-Release number of selected component (if applicable): 0.15-4.fc29


How reproducible: Build in rawhide.

+ make PYTHON=/usr/bin/python3 check
*** Running pylint to verify source ***
PYTHONPATH=./build/lib /usr/bin/python3 tests/pylint/runpylint.py
Traceback (most recent call last):
  File "/usr/bin/pylint-3", line 11, in <module>
    load_entry_point('pylint==2.0.0.dev0', 'console_scripts', 'pylint')()
  File "/usr/lib/python3.6/site-packages/pylint/__init__.py", line 18, in run_pylint
    Run(sys.argv[1:])
  File "/usr/lib/python3.6/site-packages/pylint/lint.py", line 1294, in __init__
    linter.load_plugin_modules(self._plugins)
  File "/usr/lib/python3.6/site-packages/pylint/lint.py", line 503, in load_plugin_modules
    module = modutils.load_module_from_name(modname)
  File "/usr/lib/python3.6/site-packages/astroid/modutils.py", line 190, in load_module_from_name
    return load_module_from_modpath(dotted_name.split('.'), path, use_sys)
  File "/usr/lib/python3.6/site-packages/astroid/modutils.py", line 233, in load_module_from_modpath
    module = imp.load_module(curname, mp_file, mp_filename, mp_desc)
  File "/usr/lib64/python3.6/imp.py", line 235, in load_module
    return load_source(name, filename, file)
  File "/usr/lib64/python3.6/imp.py", line 172, in load_source
    module = _load(spec)
  File "<frozen importlib._bootstrap>", line 684, in _load
  File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 678, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/builddir/build/BUILD/pocketlint-0.15/build/lib/pocketlint/checkers/pointless-override.py", line 114, in <module>
    class PointlessFunctionDefinition(PointlessData):
  File "/builddir/build/BUILD/pocketlint-0.15/build/lib/pocketlint/checkers/pointless-override.py", line 117, in PointlessFunctionDefinition
    _DEF_CLASS = astroid.Function
AttributeError: module 'astroid' has no attribute 'Function'
...
make: *** [Makefile:13: check] Error 1

Comment 1 Miro Hrončok 2018-06-05 11:12:53 UTC
Fix ready at https://github.com/rhinstaller/pocketlint/pull/22

Comment 2 Miro Hrončok 2018-06-07 09:14:24 UTC
Builds fine with Python 3.7, astroid 2.0.0. Simpleline builds fine as well. Thanks.