Bug 1788084

Summary: python3-astroid-2.3.3-2.gitace7b29.fc31 breaks pylint
Product: [Fedora] Fedora Reporter: Jan Pazdziora <jpazdziora>
Component: python-astroidAssignee: Gwyn Ciesla <gwync>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 31CC: bnocera, edewata, gwync, joachim.metz, jpazdziora, orion, philip.wyett
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: python-astroid-2.3.3-4.gitace7b29.fc31 python-astroid-2.3.3-6.gitace7b29.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-01-09 01:26:52 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:

Description Jan Pazdziora 2020-01-06 11:09:52 UTC
Description of problem:

With python3-astroid-2.3.3-2.gitace7b29.fc31, even plain pylint-3 --version now fails.

Version-Release number of selected component (if applicable):

python3-astroid-2.3.3-2.gitace7b29.fc31
python3-pylint-2.3.1-2.fc31.noarch

How reproducible:

Deterministic.

Steps to Reproduce:
1. pylint-3 --version

Actual results:

Traceback (most recent call last):
  File "/usr/bin/pylint-3", line 6, in <module>
    from pkg_resources import load_entry_point
  File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 3250, in <module>
    @_call_aside
  File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 3234, in _call_aside
    f(*args, **kwargs)
  File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 3263, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 583, in _build_master
    ws.require(__requires__)
  File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 900, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 786, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'typed-ast<1.5,>=1.4.0' distribution was not found and is required by astroid

Expected results:

pylint-3 2.3.1
astroid 2.3.3
Python 3.7.4 (default, Aug 12 2019, 14:45:07) 
[GCC 9.1.1 20190605 (Red Hat 9.1.1-2)]

Additional info:

Downgrading to python3-astroid-2.2.5-4.git28fc86f.fc31.noarch seems to help.

Comment 1 Gwyn Ciesla 2020-01-06 16:08:01 UTC
*** Bug 1787688 has been marked as a duplicate of this bug. ***

Comment 2 Fedora Update System 2020-01-06 16:11:22 UTC
FEDORA-2020-b9a7ade736 has been submitted as an update to Fedora 31. https://bodhi.fedoraproject.org/updates/FEDORA-2020-b9a7ade736

Comment 3 Fedora Update System 2020-01-07 01:07:44 UTC
python-lazy-object-proxy-1.4.3-1.fc31 has been pushed to the Fedora 31 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-b9a7ade736

Comment 4 Jan Pazdziora 2020-01-07 08:14:50 UTC
Even with python3-lazy-object-proxy-1.4.3-1.fc31.x86_64, I still get

# pylint-3 --version
Traceback (most recent call last):
  File "/usr/bin/pylint-3", line 6, in <module>
    from pkg_resources import load_entry_point
  File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 3250, in <module>
    @_call_aside
  File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 3234, in _call_aside
    f(*args, **kwargs)
  File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 3263, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 583, in _build_master
    ws.require(__requires__)
  File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 900, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 786, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'typed-ast<1.5,>=1.4.0' distribution was not found and is required by astroid

Comment 5 Bastien Nocera 2020-01-07 09:15:05 UTC
Also fails with:
python3-lazy-object-proxy-1.3.1-10.fc31.x86_64
as used in totem's rawhide CI:
https://gitlab.gnome.org/GNOME/totem/-/jobs/546056

Comment 6 Gwyn Ciesla 2020-01-07 16:21:14 UTC
Do you have python3-typed_ast installed, and if not, does that fix it?

Comment 7 Sandro Bonazzola 2020-01-07 16:25:44 UTC
I would recommend to add python3-typed_ast as dependency in python3-astroid to ensure it's available on the system.

Comment 8 Gwyn Ciesla 2020-01-07 16:32:48 UTC
Doing so.

Comment 9 Bastien Nocera 2020-01-08 10:06:58 UTC
I also needed to force the installation of a newer version of python-lazy-object-proxy, as version 1.3 isn't new enough, and it would still fail at runtime. This also needs to be added as an explicit dependency in the package.

    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'lazy_object_proxy==1.4.*' distribution was not found and is required by astroid

Comment 10 Jan Pazdziora 2020-01-08 13:17:30 UTC
Fresh installation of python3-pylint-2.3.1-2.fc31.noarch pulls in python3-astroid-2.3.3-2.gitace7b29.fc31.noarch but not python3-typed_ast.

Downgrading python3-astroid to python3-astroid-2.2.5-4.git28fc86f.fc31.noarch pulls in python3-typed_ast-1.4.0-2.fc31.x86_64.

Upgrading python3-astroid back to python3-astroid-2.3.3-2.gitace7b29.fc31.noarch keeps the python3-typed_ast installed and then I get the

  pkg_resources.DistributionNotFound: The 'lazy_object_proxy==1.4.*' distribution was not found and is required by astroid

error.

Upgrading python3-lazy-object-proxy to python3-lazy-object-proxy-1.4.3-1.fc31.x86_64 from updates-testing fixes the problem.

So it seems like the python3-typed_ast dependency got lost with some of the latest build of python3-astroid.

Comment 11 Fedora Update System 2020-01-08 14:16:26 UTC
python-astroid-2.3.3-3.gitace7b29.fc31 has been pushed to the Fedora 31 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-a7ca62459a

Comment 12 Jan Pazdziora 2020-01-08 14:23:18 UTC
Fresh installation of python3-pylint-2.3.1-2.fc31.noarch with https://kojipkgs.fedoraproject.org//packages/python-astroid/2.3.3/3.gitace7b29.fc31/noarch/python3-astroid-2.3.3-3.gitace7b29.fc31.noarch.rpm causes things to fail with

# pylint-3 --version
Traceback (most recent call last):
  File "/usr/bin/pylint-3", line 6, in <module>
    from pkg_resources import load_entry_point
  File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 3250, in <module>
    @_call_aside
  File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 3234, in _call_aside
    f(*args, **kwargs)
  File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 3263, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 583, in _build_master
    ws.require(__requires__)
  File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 900, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 786, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'six~=1.12' distribution was not found and is required by astroid

Comment 13 Fedora Update System 2020-01-08 14:33:38 UTC
FEDORA-2020-177c2edb58 has been submitted as an update to Fedora 31. https://bodhi.fedoraproject.org/updates/FEDORA-2020-177c2edb58

Comment 14 Fedora Update System 2020-01-08 14:33:45 UTC
FEDORA-EPEL-2020-22d337d626 has been submitted as an update to Fedora EPEL 8. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2020-22d337d626

Comment 15 Jan Pazdziora 2020-01-08 15:16:08 UTC
Installation with https://kojipkgs.fedoraproject.org//packages/python-astroid/2.3.3/4.gitace7b29.fc31/noarch/python3-astroid-2.3.3-4.gitace7b29.fc31.noarch.rpm pulls python3-typed_ast-1.4.0-2.fc31.x86_64 and python3-six-1.12.0-2.fc31.noarch in but the python3-lazy-object-proxy versioned dependency would be nice, to avoid

# pylint-3 --version
Traceback (most recent call last):
  File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 583, in _build_master
    ws.require(__requires__)
  File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 900, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 791, in resolve
    raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (lazy-object-proxy 1.3.1 (/usr/lib64/python3.7/site-packages), Requirement.parse('lazy_object_proxy==1.4.*'), {'astroid'})

During handling of the above exception, another exception occurred:

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

OTOH, manually upgrading to https://kojipkgs.fedoraproject.org//packages/python-lazy-object-proxy/1.4.3/1.fc31/x86_64/python3-lazy-object-proxy-1.4.3-1.fc31.x86_64.rpm fixes the issue, so if both the python3-lazy-object-proxy-1.4.3-1.fc31 and python3-astroid-2.3.3-4.gitace7b29.fc31 erratas are pushed, the problem will be solved even without the versioned dependency.

Comment 16 Fedora Update System 2020-01-09 01:26:52 UTC
python-lazy-object-proxy-1.4.3-1.fc31 has been pushed to the Fedora 31 stable repository. If problems still persist, please make note of it in this bug report.

Comment 17 Fedora Update System 2020-01-09 01:26:57 UTC
python-astroid-2.3.3-4.gitace7b29.fc31 has been pushed to the Fedora 31 stable repository. If problems still persist, please make note of it in this bug report.

Comment 18 Fedora Update System 2020-01-09 01:53:39 UTC
python-astroid-2.3.3-4.gitace7b29.el8 has been pushed to the Fedora EPEL 8 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2020-22d337d626

Comment 19 Fedora Update System 2020-01-18 00:10:44 UTC
python-astroid-2.3.3-6.gitace7b29.el8, python-lazy-object-proxy-1.4.3-2.el8 has been pushed to the Fedora EPEL 8 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2020-8841b40fce

Comment 20 Fedora Update System 2020-02-02 01:36:08 UTC
python-astroid-2.3.3-6.gitace7b29.el8, python-lazy-object-proxy-1.4.3-2.el8 has been pushed to the Fedora EPEL 8 stable repository. If problems still persist, please make note of it in this bug report.