Wednesday, December 30, 2020

Re: pylint-3: AttributeError: module '_ast' has no attribute 'Str'

On Sun, Dec 27, 2020 at 10:58:48PM -0500, Daniel Dickman wrote:
> Yeah, devel/py-astroid is not python 3.8 compatible from what I remember.
>
> To fix pylint, you'll need to get py-astroid updated to version 2.1.0 or
> later.
I see sthen and you have updated (and fixed) ports for pylint to work
again, thanks!

Sadly, pylint still complains, probably because our 1.6.5 is way behind
upstream's latest 2.6.0 release:
(I'll give the update a try now.)

$ pylint-3 -h
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/pkg_resources/__init__.py", line 583, in _build_master
ws.require(__requires__)
File "/usr/local/lib/python3.8/site-packages/pkg_resources/__init__.py", line 900, in require
needed = self.resolve(parse_requirements(requirements))
File "/usr/local/lib/python3.8/site-packages/pkg_resources/__init__.py", line 791, in resolve
raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (astroid 2.4.2 (/usr/local/lib/python3.8/site-packages), Requirement.parse('astroid<1.5.0,>=1.4.5'), {'pylint'})

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/bin/pylint-3", line 6, in <module>
from pkg_resources import load_entry_point
File "/usr/local/lib/python3.8/site-packages/pkg_resources/__init__.py", line 3252, in <module>
def _initialize_master_working_set():
File "/usr/local/lib/python3.8/site-packages/pkg_resources/__init__.py", line 3235, in _call_aside
f(*args, **kwargs)
File "/usr/local/lib/python3.8/site-packages/pkg_resources/__init__.py", line 3264, in _initialize_master_working_set
working_set = WorkingSet._build_master()
File "/usr/local/lib/python3.8/site-packages/pkg_resources/__init__.py", line 585, in _build_master
return cls._build_from_requirements(__requires__)
File "/usr/local/lib/python3.8/site-packages/pkg_resources/__init__.py", line 598, in _build_from_requirements
dists = ws.resolve(reqs, Environment())
File "/usr/local/lib/python3.8/site-packages/pkg_resources/__init__.py", line 786, in resolve
raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'astroid<1.5.0,>=1.4.5' distribution was not found and is required by pylint

No comments:

Post a Comment