Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 558278 - dev-python/flake8 requires dev-python/pep8!=1.6.0,!=1.6.1,!=1.6.2,>=1.5.7
Summary: dev-python/flake8 requires dev-python/pep8!=1.6.0,!=1.6.1,!=1.6.2,>=1.5.7
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-08-20 14:15 UTC by Attila Oláh
Modified: 2015-09-12 03:01 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Attila Oláh 2015-08-20 14:15:53 UTC
dev-python/flake8 requires 

Reproducible: Always

Steps to Reproduce:
1. emerge flake8
2. flake8
Actual Results:  
Traceback (most recent call last):
  File "/usr/lib64/python3.4/site-packages/pkg_resources/__init__.py", line 651, in _build_master
    ws.require(__requires__)
  File "/usr/lib64/python3.4/site-packages/pkg_resources/__init__.py", line 952, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/lib64/python3.4/site-packages/pkg_resources/__init__.py", line 844, in resolve
    raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (pep8 1.6.2 (/usr/lib64/python3.4/site-packages), Requirement.parse('pep8!=1.6.0,!=1.6.1,!=1.6.2,>=1.5.7'), {'flake8'})

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python-exec/python3.4/flake8", line 5, in <module>
    from pkg_resources import load_entry_point
  File "/usr/lib64/python3.4/site-packages/pkg_resources/__init__.py", line 3084, in <module>
    @_call_aside
  File "/usr/lib64/python3.4/site-packages/pkg_resources/__init__.py", line 3070, in _call_aside
    f(*args, **kwargs)
  File "/usr/lib64/python3.4/site-packages/pkg_resources/__init__.py", line 3097, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/usr/lib64/python3.4/site-packages/pkg_resources/__init__.py", line 653, in _build_master
    return cls._build_from_requirements(__requires__)
  File "/usr/lib64/python3.4/site-packages/pkg_resources/__init__.py", line 666, in _build_from_requirements
    dists = ws.resolve(reqs, Environment())
  File "/usr/lib64/python3.4/site-packages/pkg_resources/__init__.py", line 839, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'pep8!=1.6.0,!=1.6.1,!=1.6.2,>=1.5.7' distribution was not found and is required by flake8


Expected Results:  
flake8 should run.

dev-python/flake8-2.4.1::gentoo was built with the following:
USE="-test" ABI_X86="64" PYTHON_TARGETS="python2_7 python3_4 -python3_3"

dev-python/pep8-1.6.2::gentoo was built with the following:
USE="-doc" ABI_X86="64" PYTHON_TARGETS="python2_7 python3_4 -pypy -pypy3 -python3_3"
Comment 1 Ian Delaney (RETIRED) gentoo-dev 2015-09-12 01:26:09 UTC
well this appears to be the case in setup.py of flake8-2.4.1 but remember portage currently has 5 minor versions of flake8-2.  From the setup.py;

"pep8 >= 1.5.7, != 1.6.0, != 1.6.1, != 1.6.2",
basically says  pep8 >= 1.5.7 is fine and >= 1.6.0 is not. However I have already set  <dev-python/pep8-1.6.0 in flake8-2.4.1.ebuild to account for this.
So:
1. What version of dev-python/flake8 triggered the failed build in Description?
2. It appears you had pep8 1.6.1 or 1.6.2 installed. Did you?

For now I am removing old version 2.4.0. Observe I already set the bordering to flake8-2.4.0-r1.ebuild back in March which suggests the version of flake8 was it or another one vulnerable to this.

commit b581b255ba30cfed42885c2a1cd7ad94017a8144
Author: Ian Delaney <idella4@gentoo.org>
Date:   Sat Sep 12 09:22:32 2015 +0800

    dev-python/flake8: remove -2.4.0
Comment 2 Alex Brandt (RETIRED) gentoo-dev 2015-09-12 01:59:29 UTC
Actually,

"pep8 >= 1.5.7, != 1.6.0, != 1.6.1, != 1.6.2",

Means the same as this DEPEND statement:

>=dev-python/pep8-1.5.7
!~dev-python/pep8-1.6.0
!~dev-python/pep8-1.6.1
!~dev-python/pep8-1.6.2

It does not mean <dev-python/pep8-1.6.0.

Not sure if that changes the outcome (looks like one of the unwanted versions was at fault anyway).  Now with the versions in the tree one might think <dev-python/pep8-1.6.0 is appropriate but it actually doesn't block pep8-1.6.3 when it's released.  Whether it works is up to upstream though.

Just an FYI, hope it helps.
Comment 3 Ian Delaney (RETIRED) gentoo-dev 2015-09-12 03:01:57 UTC
true, but it covers the versions for what is in portage currently. That is correct for what may happen in the future, I just elected not to go there for the scope of this bug.
e.g. !~dev-python/pep8-1.6.0 does not help because it is not in the tree.