Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 677556 - dev-python/pytest-3.10.1: test failures: DistributionNotFound: The 'pytest' distribution was not found and is required by the application
Summary: dev-python/pytest-3.10.1: test failures: DistributionNotFound: The 'pytest' d...
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords: TESTFAILURE
Depends on:
Blocks:
 
Reported: 2019-02-09 16:09 UTC by Thomas Deutschmann (RETIRED)
Modified: 2021-02-24 20:51 UTC (History)
0 users

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


Attachments
build.log (build.log,303.38 KB, text/plain)
2019-02-09 16:09 UTC, Thomas Deutschmann (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Deutschmann (RETIRED) gentoo-dev 2019-02-09 16:09:27 UTC
Created attachment 564350 [details]
build.log

======================================================= FAILURES =======================================================
___________________________________________ test_entry_point_exist[py.test] ____________________________________________

entrypoint = 'py.test'

    @pytest.mark.parametrize("entrypoint", ["py.test", "pytest"])
    def test_entry_point_exist(entrypoint):
>       assert entrypoint in pkg_resources.get_entry_map("pytest")["console_scripts"]

testing/test_entry_points.py:12: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/lib/python2.7/site-packages/pkg_resources/__init__.py:492: in get_entry_map
    return get_distribution(dist).get_entry_map(group)
/usr/lib/python2.7/site-packages/pkg_resources/__init__.py:479: in get_distribution
    dist = get_provider(dist)
/usr/lib/python2.7/site-packages/pkg_resources/__init__.py:355: in get_provider
    return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]
/usr/lib/python2.7/site-packages/pkg_resources/__init__.py:898: in require
    needed = self.resolve(parse_requirements(requirements))
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pkg_resources.WorkingSet object at 0xb6dc026c>, requirements = []
env = <pkg_resources.Environment object at 0xb57d8bcc>, installer = None, replace_conflicting = False, extras = None

    def resolve(self, requirements, env=None, installer=None,
                replace_conflicting=False, extras=None):
        """List all distributions needed to (recursively) meet `requirements`
    
        `requirements` must be a sequence of ``Requirement`` objects.  `env`,
        if supplied, should be an ``Environment`` instance.  If
        not supplied, it defaults to all distributions available within any
        entry or distribution in the working set.  `installer`, if supplied,
        will be invoked with each requirement that cannot be met by an
        already-installed distribution; it should return a ``Distribution`` or
        ``None``.
    
        Unless `replace_conflicting=True`, raises a VersionConflict exception
        if
        any requirements are found on the path that have the correct name but
        the wrong version.  Otherwise, if an `installer` is supplied it will be
        invoked to obtain the correct version of the requirement and activate
        it.
    
        `extras` is a list of the extras to be used with these requirements.
        This is important because extra requirements may look like `my_req;
        extra = "my_extra"`, which would otherwise be interpreted as a purely
        optional requirement.  Instead, we want to be able to assert that these
        requirements are truly required.
        """
    
        # set up the stack
        requirements = list(requirements)[::-1]
        # set of processed requirements
        processed = {}
        # key -> dist
        best = {}
        to_activate = []
    
        req_extras = _ReqExtras()
    
        # Mapping of requirement to set of distributions that required it;
        # useful for reporting info about conflicts.
        required_by = collections.defaultdict(set)
    
        while requirements:
            # process dependencies breadth-first
            req = requirements.pop(0)
            if req in processed:
                # Ignore cyclic or redundant dependencies
                continue
    
            if not req_extras.markers_pass(req, extras):
                continue
    
            dist = best.get(req.key)
            if dist is None:
                # Find the best distribution and add it to the map
                dist = self.by_key.get(req.key)
                if dist is None or (dist not in req and replace_conflicting):
                    ws = self
                    if env is None:
                        if dist is None:
                            env = Environment(self.entries)
                        else:
                            # Use an empty environment and workingset to avoid
                            # any further conflicts with the conflicting
                            # distribution
                            env = Environment([])
                            ws = WorkingSet([])
                    dist = best[req.key] = env.best_match(
                        req, ws, installer,
                        replace_conflicting=replace_conflicting
                    )
                    if dist is None:
                        requirers = required_by.get(req, None)
>                       raise DistributionNotFound(req, requirers)
E                       DistributionNotFound: The 'pytest' distribution was not found and is required by the application

/usr/lib/python2.7/site-packages/pkg_resources/__init__.py:784: DistributionNotFound
____________________________________________ test_entry_point_exist[pytest] ____________________________________________

entrypoint = 'pytest'

    @pytest.mark.parametrize("entrypoint", ["py.test", "pytest"])
    def test_entry_point_exist(entrypoint):
>       assert entrypoint in pkg_resources.get_entry_map("pytest")["console_scripts"]

testing/test_entry_points.py:12: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/lib/python2.7/site-packages/pkg_resources/__init__.py:492: in get_entry_map
    return get_distribution(dist).get_entry_map(group)
/usr/lib/python2.7/site-packages/pkg_resources/__init__.py:479: in get_distribution
    dist = get_provider(dist)
/usr/lib/python2.7/site-packages/pkg_resources/__init__.py:355: in get_provider
    return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]
/usr/lib/python2.7/site-packages/pkg_resources/__init__.py:898: in require
    needed = self.resolve(parse_requirements(requirements))
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pkg_resources.WorkingSet object at 0xb6dc026c>, requirements = []
env = <pkg_resources.Environment object at 0xb57648ec>, installer = None, replace_conflicting = False, extras = None

    def resolve(self, requirements, env=None, installer=None,
                replace_conflicting=False, extras=None):
        """List all distributions needed to (recursively) meet `requirements`
    
        `requirements` must be a sequence of ``Requirement`` objects.  `env`,
        if supplied, should be an ``Environment`` instance.  If
        not supplied, it defaults to all distributions available within any
        entry or distribution in the working set.  `installer`, if supplied,
        will be invoked with each requirement that cannot be met by an
        already-installed distribution; it should return a ``Distribution`` or
        ``None``.
    
        Unless `replace_conflicting=True`, raises a VersionConflict exception
        if
        any requirements are found on the path that have the correct name but
        the wrong version.  Otherwise, if an `installer` is supplied it will be
        invoked to obtain the correct version of the requirement and activate
        it.
    
        `extras` is a list of the extras to be used with these requirements.
        This is important because extra requirements may look like `my_req;
        extra = "my_extra"`, which would otherwise be interpreted as a purely
        optional requirement.  Instead, we want to be able to assert that these
        requirements are truly required.
        """
    
        # set up the stack
        requirements = list(requirements)[::-1]
        # set of processed requirements
        processed = {}
        # key -> dist
        best = {}
        to_activate = []
    
        req_extras = _ReqExtras()
    
        # Mapping of requirement to set of distributions that required it;
        # useful for reporting info about conflicts.
        required_by = collections.defaultdict(set)
    
        while requirements:
            # process dependencies breadth-first
            req = requirements.pop(0)
            if req in processed:
                # Ignore cyclic or redundant dependencies
                continue
    
            if not req_extras.markers_pass(req, extras):
                continue
    
            dist = best.get(req.key)
            if dist is None:
                # Find the best distribution and add it to the map
                dist = self.by_key.get(req.key)
                if dist is None or (dist not in req and replace_conflicting):
                    ws = self
                    if env is None:
                        if dist is None:
                            env = Environment(self.entries)
                        else:
                            # Use an empty environment and workingset to avoid
                            # any further conflicts with the conflicting
                            # distribution
                            env = Environment([])
                            ws = WorkingSet([])
                    dist = best[req.key] = env.best_match(
                        req, ws, installer,
                        replace_conflicting=replace_conflicting
                    )
                    if dist is None:
                        requirers = required_by.get(req, None)
>                       raise DistributionNotFound(req, requirers)
E                       DistributionNotFound: The 'pytest' distribution was not found and is required by the application

/usr/lib/python2.7/site-packages/pkg_resources/__init__.py:784: DistributionNotFound
________________________________________ test_pytest_entry_points_are_identical ________________________________________

    def test_pytest_entry_points_are_identical():
>       entryMap = pkg_resources.get_entry_map("pytest")["console_scripts"]

testing/test_entry_points.py:16: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/lib/python2.7/site-packages/pkg_resources/__init__.py:492: in get_entry_map
    return get_distribution(dist).get_entry_map(group)
/usr/lib/python2.7/site-packages/pkg_resources/__init__.py:479: in get_distribution
    dist = get_provider(dist)
/usr/lib/python2.7/site-packages/pkg_resources/__init__.py:355: in get_provider
    return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]
/usr/lib/python2.7/site-packages/pkg_resources/__init__.py:898: in require
    needed = self.resolve(parse_requirements(requirements))
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pkg_resources.WorkingSet object at 0xb6dc026c>, requirements = []
env = <pkg_resources.Environment object at 0xb576494c>, installer = None, replace_conflicting = False, extras = None

    def resolve(self, requirements, env=None, installer=None,
                replace_conflicting=False, extras=None):
        """List all distributions needed to (recursively) meet `requirements`
    
        `requirements` must be a sequence of ``Requirement`` objects.  `env`,
        if supplied, should be an ``Environment`` instance.  If
        not supplied, it defaults to all distributions available within any
        entry or distribution in the working set.  `installer`, if supplied,
        will be invoked with each requirement that cannot be met by an
        already-installed distribution; it should return a ``Distribution`` or
        ``None``.
    
        Unless `replace_conflicting=True`, raises a VersionConflict exception
        if
        any requirements are found on the path that have the correct name but
        the wrong version.  Otherwise, if an `installer` is supplied it will be
        invoked to obtain the correct version of the requirement and activate
        it.
    
        `extras` is a list of the extras to be used with these requirements.
        This is important because extra requirements may look like `my_req;
        extra = "my_extra"`, which would otherwise be interpreted as a purely
        optional requirement.  Instead, we want to be able to assert that these
        requirements are truly required.
        """
    
        # set up the stack
        requirements = list(requirements)[::-1]
        # set of processed requirements
        processed = {}
        # key -> dist
        best = {}
        to_activate = []
    
        req_extras = _ReqExtras()
    
        # Mapping of requirement to set of distributions that required it;
        # useful for reporting info about conflicts.
        required_by = collections.defaultdict(set)
    
        while requirements:
            # process dependencies breadth-first
            req = requirements.pop(0)
            if req in processed:
                # Ignore cyclic or redundant dependencies
                continue
    
            if not req_extras.markers_pass(req, extras):
                continue
    
            dist = best.get(req.key)
            if dist is None:
                # Find the best distribution and add it to the map
                dist = self.by_key.get(req.key)
                if dist is None or (dist not in req and replace_conflicting):
                    ws = self
                    if env is None:
                        if dist is None:
                            env = Environment(self.entries)
                        else:
                            # Use an empty environment and workingset to avoid
                            # any further conflicts with the conflicting
                            # distribution
                            env = Environment([])
                            ws = WorkingSet([])
                    dist = best[req.key] = env.best_match(
                        req, ws, installer,
                        replace_conflicting=replace_conflicting
                    )
                    if dist is None:
                        requirers = required_by.get(req, None)
>                       raise DistributionNotFound(req, requirers)
E                       DistributionNotFound: The 'pytest' distribution was not found and is required by the application

/usr/lib/python2.7/site-packages/pkg_resources/__init__.py:784: DistributionNotFound
=============================================== short test summary info ================================================
FAIL testing/test_entry_points.py::test_entry_point_exist[py.test]
FAIL testing/test_entry_points.py::test_entry_point_exist[pytest]
FAIL testing/test_entry_points.py::test_pytest_entry_points_are_identical
[...]
=========================== 3 failed, 2184 passed, 63 skipped, 11 xfailed in 251.19 seconds ============================
 * ERROR: dev-python/pytest-3.10.1::gentoo failed (test phase):
 *   tests failed with python2.7
 *
Comment 1 Thomas Deutschmann (RETIRED) gentoo-dev 2019-02-09 16:09:48 UTC
Portage 2.3.51 (python 3.6.5-final-0, default/linux/x86/17.0, gcc-7.3.0, glibc-2.27-r6, 4.14.83-gentoo i686)
=================================================================
System uname: Linux-4.14.83-gentoo-i686-Intel-R-_Core-TM-_i7-3770K_CPU_@_3.50GHz-with-gentoo-2.6
KiB Mem:     3107048 total,    495936 free
KiB Swap:     488276 total,    488276 free
Timestamp of repository gentoo: Sat, 09 Feb 2019 14:44:28 +0000
Head commit of repository gentoo: 9bd0f70fe0f18f8333757ed5b96fd76a1693e677

sh bash 4.4_p23-r1
ld GNU ld (Gentoo 2.30 p5) 2.30.0
app-shells/bash:          4.4_p23-r1::gentoo
dev-lang/perl:            5.26.2::gentoo
dev-lang/python:          2.7.15::gentoo, 3.6.5::gentoo
dev-util/cmake:           3.9.6::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.6-r1::gentoo
sys-apps/openrc:          0.38.3-r1::gentoo
sys-apps/sandbox:         2.13::gentoo
sys-devel/autoconf:       2.13-r1::gentoo, 2.69-r4::gentoo
sys-devel/automake:       1.16.1-r1::gentoo
sys-devel/binutils:       2.30-r4::gentoo
sys-devel/gcc:            7.3.0-r3::gentoo
sys-devel/gcc-config:     2.0::gentoo
sys-devel/libtool:        2.4.6-r3::gentoo
sys-devel/make:           4.2.1-r4::gentoo
sys-kernel/linux-headers: 4.14-r1::gentoo (virtual/os-headers)
sys-libs/glibc:           2.27-r6::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/gentoo.git
    priority: -1000

ABI="x86"
ABI_X86="32"
ACCEPT_KEYWORDS="x86"
ACCEPT_LICENSE="* -@EULA"
ACCEPT_PROPERTIES="*"
ACCEPT_RESTRICT="*"
ARCH="x86"
BROOT=""
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=pentium4m -mtune=pentium4m -Wno-error=jump-misses-init -Wno-error=sign-compare"
CHOST="i686-pc-linux-gnu"
CHOST_x86="i686-pc-linux-gnu"
COLLISION_IGNORE="/lib/modules/*"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt"
CPU_FLAGS_X86="mmx mmxext sse sse2"
CXXFLAGS="-O2 -pipe -march=pentium4m -mtune=pentium4m -Wno-error=jump-misses-init -Wno-error=sign-compare"
DEFAULT_ABI="x86"
EDITOR="/usr/bin/mcedit"
ELIBC="glibc"
ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
EPREFIX=""
EROOT="/"
ESYSROOT="/"
FCFLAGS="-O2 -march=i686 -pipe"
FEATURES="assume-digests binpkg-logs cgroup config-protect-if-modified distlocks downgrade-backup ebuild-locks fixlafiles merge-sync multilib-strict news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -march=i686 -pipe"
GCC_SPECS=""
GRUB_PLATFORMS="efi-32 pc"
GSETTINGS_BACKEND="dconf"
HOME="/root"
INFOPATH="/usr/share/gcc-data/i686-pc-linux-gnu/7.3.0/info:/usr/share/binutils-data/i686-pc-linux-gnu/2.30/info:/usr/share/info:/usr/share/info/emacs-26"
INPUT_DEVICES="libinput keyboard mouse"
IUSE_IMPLICIT="abi_x86_32 prefix prefix-chain prefix-guest"
KERNEL="linux"
L10N="en en-US de de-DE"
LANG="en_US.UTF-8"
LC_ALL="en_US.UTF-8"
LC_MESSAGES="C"
LC_PAPER="de_DE.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LIBDIR_x86="lib"
LINGUAS="en de"
LOGNAME="root"
MAIL="/var/mail/root"
MAKEOPTS="--jobs 5 --load-average 7.95"
MULTILIB_ABIS="x86"
NETBEANS_MODULES="apisupport cnd groovy gsf harness ide identity j2ee java mobility nb php profiler soa visualweb webcommon websvccommon xml"
NOCOLOR="true"
OFFICE_IMPLEMENTATION="libreoffice"
OPENCL_PROFILE="ocl-icd"
OPENGL_PROFILE="xorg-x11"
PAGER="/usr/bin/less"
PATH="/usr/lib/llvm/6/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin"
PHP_TARGETS="php5-6 php7-1 php7-2 php7-3"
POSTGRES_TARGETS="postgres9_5 postgres10"
PWD="/root"
PYTHONDONTWRITEBYTECODE="1"
PYTHON_SINGLE_TARGET="python3_6"
PYTHON_TARGETS="python2_7 python3_6"
QT_GRAPHICSSYSTEM="raster"
ROOT="/"
ROOTPATH="/usr/lib/llvm/6/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin"
RUBY_TARGETS="ruby24"
SHELL="/bin/bash"
SHLVL="2"
SSH_TTY="/dev/pts/0"
SYSROOT="/"
TERM="tmux-256color"
TMUX="/tmp//tmux-0/default,4109,0"
TMUX_PANE="%3"
TWISTED_DISABLE_WRITING_OF_PLUGIN_CACHE="1"
USER="root"
USERLAND="GNU"
VIDEO_CARDS="vmware"
XDG_CONFIG_DIRS="/etc/xdg"
XDG_DATA_DIRS="/usr/local/share:/usr/share"
Comment 2 Mike Gilbert gentoo-dev 2019-02-28 17:00:50 UTC
Does it work if you install pytest without FEATURES=test first?
Comment 3 Thomas Deutschmann (RETIRED) gentoo-dev 2019-03-01 00:02:00 UTC
(In reply to Mike Gilbert from comment #2)
> Does it work if you install pytest without FEATURES=test first?

Yes, installing without FEATURES=test first and re-run with FEATURES=test works:

> 2187 passed, 63 skipped, 11 xfailed in 215.79 seconds
Comment 4 Mike Gilbert gentoo-dev 2019-03-01 15:30:43 UTC
(In reply to Thomas Deutschmann from comment #3)
> Yes, installing without FEATURES=test first and re-run with FEATURES=test
> works:
> 
> > 2187 passed, 63 skipped, 11 xfailed in 215.79 seconds

Ok, so it's either a bug in the tests, or a problem with the way we are invoking the test suite.

Either way, let's not block stabilization over this.
Comment 5 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2021-02-24 20:51:04 UTC
Closing bugs for old versions no longer in ::gentoo.  Please reopen if it still happens.