pypa / pypa/setuptools

setuptools upgrade breaks funcsigs test runner

Open
#493 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug major
Dominant language
Python
Stars
2.9k
Forks
1.4k
Avg merge
1d 1h
Merged PRs (30d)
1

Description

Originally reported by: FRidh (Bitbucket: FRidh, GitHub: FRidh)


I'm testing on Nix to update from setuptools 19.4 to the latest 20.0.
This seems to break funcsigs test runner (with CPython 2.7 and PyPy, not CPython 3.x).

I don't know whether this is a setuptools or funcsigs issue, but since it broke due to a setuptools upgrade I'm posting it here.

Wheels version is 0.29.0 and pip 8.0.2

Traceback (most recent call last):
  File "/nix/store/d945ibfx9x185xf04b890y4f9g3cbb63-python-2.7.11/lib/python2.7/runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/nix/store/d945ibfx9x185xf04b890y4f9g3cbb63-python-2.7.11/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "build/bdist.linux-x86_64/egg/setuptools/launch.py", line 35, in <module>
  File "build/bdist.linux-x86_64/egg/setuptools/launch.py", line 31, in run
  File "setup.py", line 54, in <module>
    test_suite = "tests" if sys.version_info[0] > 2 else 'unittest2.collector'
  File "/nix/store/d945ibfx9x185xf04b890y4f9g3cbb63-python-2.7.11/lib/python2.7/distutils/core.py", line 151, in setup
    dist.run_commands()
  File "/nix/store/d945ibfx9x185xf04b890y4f9g3cbb63-python-2.7.11/lib/python2.7/distutils/dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "/nix/store/d945ibfx9x185xf04b890y4f9g3cbb63-python-2.7.11/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "build/bdist.linux-x86_64/egg/setuptools/command/test.py", line 159, in run
  File "build/bdist.linux-x86_64/egg/setuptools/command/test.py", line 140, in with_project_on_sys_path
  File "build/bdist.linux-x86_64/egg/setuptools/command/test.py", line 180, in run_tests
  File "/nix/store/d945ibfx9x185xf04b890y4f9g3cbb63-python-2.7.11/lib/python2.7/unittest/main.py", line 94, in __init__
    self.parseArgs(argv)
  File "/nix/store/d945ibfx9x185xf04b890y4f9g3cbb63-python-2.7.11/lib/python2.7/unittest/main.py", line 149, in parseArgs
    self.createTests()
  File "/nix/store/d945ibfx9x185xf04b890y4f9g3cbb63-python-2.7.11/lib/python2.7/unittest/main.py", line 158, in createTests
    self.module)
  File "/nix/store/d945ibfx9x185xf04b890y4f9g3cbb63-python-2.7.11/lib/python2.7/unittest/loader.py", line 130, in loadTestsFromNames
    suites = [self.loadTestsFromName(name, module) for name in names]
  File "/nix/store/d945ibfx9x185xf04b890y4f9g3cbb63-python-2.7.11/lib/python2.7/unittest/loader.py", line 115, in loadTestsFromName
    test = obj()
  File "/nix/store/vchwq7njpf8aim7y30yyyxrp4l2h0j52-python2.7-unittest2-1.1.0/lib/python2.7/site-packages/unittest2/collector.py", line 9, in collector
    return defaultTestLoader.discover(setupDir)
  File "/nix/store/vchwq7njpf8aim7y30yyyxrp4l2h0j52-python2.7-unittest2-1.1.0/lib/python2.7/site-packages/unittest2/loader.py", line 364, in discover
    raise ImportError('Start directory is not importable: %r' % start_dir)
ImportError: Start directory is not importable: '/nix/store/3ykhlhc5mg0q28hwn9csbqlpz4xwfjrv-python2.7-setuptools-20.0/lib/python2.7/site-packages/setuptools-20.0-py2.7.egg/setuptools'

Possibly related are (vobject)

Traceback (most recent call last):
  File "/nix/store/d945ibfx9x185xf04b890y4f9g3cbb63-python-2.7.11/lib/python2.7/runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/nix/store/d945ibfx9x185xf04b890y4f9g3cbb63-python-2.7.11/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "build/bdist.linux-x86_64/egg/setuptools/launch.py", line 35, in <module>
  File "build/bdist.linux-x86_64/egg/setuptools/launch.py", line 31, in run
  File "setup.py", line 121, in <module>
    'testing': TESTS_REQUIRE + ['nose', 'coverage'],
  File "/nix/store/d945ibfx9x185xf04b890y4f9g3cbb63-python-2.7.11/lib/python2.7/distutils/core.py", line 151, in setup
    dist.run_commands()
  File "/nix/store/d945ibfx9x185xf04b890y4f9g3cbb63-python-2.7.11/lib/python2.7/distutils/dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "/nix/store/d945ibfx9x185xf04b890y4f9g3cbb63-python-2.7.11/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "build/bdist.linux-x86_64/egg/setuptools/command/test.py", line 159, in run
  File "build/bdist.linux-x86_64/egg/setuptools/command/test.py", line 140, in with_project_on_sys_path
  File "build/bdist.linux-x86_64/egg/setuptools/command/test.py", line 180, in run_tests
  File "/nix/store/d945ibfx9x185xf04b890y4f9g3cbb63-python-2.7.11/lib/python2.7/unittest/main.py", line 94, in __init__
    self.parseArgs(argv)
  File "/nix/store/d945ibfx9x185xf04b890y4f9g3cbb63-python-2.7.11/lib/python2.7/unittest/main.py", line 149, in parseArgs
    self.createTests()
  File "/nix/store/d945ibfx9x185xf04b890y4f9g3cbb63-python-2.7.11/lib/python2.7/unittest/main.py", line 158, in createTests
    self.module)
  File "/nix/store/d945ibfx9x185xf04b890y4f9g3cbb63-python-2.7.11/lib/python2.7/unittest/loader.py", line 130, in loadTestsFromNames
    suites = [self.loadTestsFromName(name, module) for name in names]
  File "/nix/store/d945ibfx9x185xf04b890y4f9g3cbb63-python-2.7.11/lib/python2.7/unittest/loader.py", line 100, in loadTestsFromName
    parent, obj = obj, getattr(obj, part)
AttributeError: 'module' object has no attribute 'alltests'

and (zope.schema, all Python versions)

Traceback (most recent call last):
  File "/nix/store/d945ibfx9x185xf04b890y4f9g3cbb63-python-2.7.11/lib/python2.7/runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/nix/store/d945ibfx9x185xf04b890y4f9g3cbb63-python-2.7.11/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "build/bdist.linux-x86_64/egg/setuptools/launch.py", line 35, in <module>
  File "build/bdist.linux-x86_64/egg/setuptools/launch.py", line 31, in run
  File "setup.py", line 74, in <module>
    setup(**options)
  File "/nix/store/d945ibfx9x185xf04b890y4f9g3cbb63-python-2.7.11/lib/python2.7/distutils/core.py", line 151, in setup
    dist.run_commands()
  File "/nix/store/d945ibfx9x185xf04b890y4f9g3cbb63-python-2.7.11/lib/python2.7/distutils/dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "/nix/store/d945ibfx9x185xf04b890y4f9g3cbb63-python-2.7.11/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "build/bdist.linux-x86_64/egg/setuptools/command/test.py", line 159, in run
  File "build/bdist.linux-x86_64/egg/setuptools/command/test.py", line 140, in with_project_on_sys_path
  File "build/bdist.linux-x86_64/egg/setuptools/command/test.py", line 180, in run_tests
  File "/nix/store/d945ibfx9x185xf04b890y4f9g3cbb63-python-2.7.11/lib/python2.7/unittest/main.py", line 94, in __init__
    self.parseArgs(argv)
  File "/nix/store/d945ibfx9x185xf04b890y4f9g3cbb63-python-2.7.11/lib/python2.7/unittest/main.py", line 149, in parseArgs
    self.createTests()
  File "/nix/store/d945ibfx9x185xf04b890y4f9g3cbb63-python-2.7.11/lib/python2.7/unittest/main.py", line 158, in createTests
    self.module)
  File "/nix/store/d945ibfx9x185xf04b890y4f9g3cbb63-python-2.7.11/lib/python2.7/unittest/loader.py", line 130, in loadTestsFromNames
    suites = [self.loadTestsFromName(name, module) for name in names]
  File "/nix/store/d945ibfx9x185xf04b890y4f9g3cbb63-python-2.7.11/lib/python2.7/unittest/loader.py", line 100, in loadTestsFromName
    parent, obj = obj, getattr(obj, part)
AttributeError: 'module' object has no attribute 'alltests'

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the failure with setuptools 20.0 using funcsigs on CPython 2.7 or PyPy, starting at setup.py's test_suite setting and setuptools/command/test.py. Compare the unittest2 collector errors and the CPython 3.x behavior; done means the affected test runner discovers and executes its tests again.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
build-system, testing
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.