[Python-modules-team] Bug#808763: ImportError: Entry point ('console_scripts', 'py.test-3.5') not found

Thomas Goirand zigo at debian.org
Tue Dec 22 14:53:45 UTC 2015


Package: python3-pytest
Version: 2.8.5-1
Severity: grave

Dear maintainer,

When typing: py.test-3.5

I get: $ py.test-3.5
Traceback (most recent call last):
  File "/usr/bin/py.test-3.5", line 9, in <module>
    load_entry_point('pytest==2.8.5', 'console_scripts', 'py.test-3.5')()
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 568,
in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line
2719, in load_entry_point
    raise ImportError("Entry point %r not found" % ((group, name),))
ImportError: Entry point ('console_scripts', 'py.test-3.5') not found

Having a look into /usr/bin/py.test-3.5, I can see:

if __name__ == '__main__':
    sys.exit(
        load_entry_point('pytest==2.8.5', 'console_scripts', 'py.test-3.5')()
    )

Obviously, replacing py.test-3.5 by py.test in the load_entry_point()
fixes the issue.

This bug is very annoying, because it prevents from testing with the
correct version of Python 3, in a loop of this kind:

PYTHON3S:=$(shell py3versions -vr)

override_dh_auto_test:
ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS)))
        @echo "===> Running tests"
        set -e ; set -x ; for i in 2.7 $(PYTHON3S) ; do \
                PYMAJOR=`echo $$i | cut -d'.' -f1` ; \
                echo "===> Testing with python$$i (python$$PYMAJOR)" ; \
                PYTHON=python$$i py.test-$$i ; \
        done
endif

Please fix python3-pytest ASAP.

Thanks for maintaining pytest,
Cheers,

Thomas Goirand (zigo)



More information about the Python-modules-team mailing list