Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test failures with python3.3 #131

Closed
ghost opened this issue Jan 5, 2014 · 5 comments
Closed

Test failures with python3.3 #131

ghost opened this issue Jan 5, 2014 · 5 comments

Comments

@ghost
Copy link

ghost commented Jan 5, 2014

Originally reported by: iElectric (Bitbucket: iElectric, GitHub: Unknown)


#!python

======================================================================
ERROR: test_setup_requires (setuptools.tests.test_easy_install.TestUserInstallTest)
Regression test for Distribute issue #318
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/tmp/nix-build-python3.3m-setuptools-2.0.2.drv-0/setuptools-2.0.2/setuptools/dist.py", line 287, in fetch_build_egg
    cmd = self._egg_fetcher
AttributeError: 'Distribution' object has no attribute '_egg_fetcher'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/tmp/nix-build-python3.3m-setuptools-2.0.2.drv-0/setuptools-2.0.2/setuptools/tests/test_easy_install.py", line 268, in test_setup_requires
    run_setup(test_setup_py, ['install'])
  File "/tmp/nix-build-python3.3m-setuptools-2.0.2.drv-0/setuptools-2.0.2/setuptools/sandbox.py", line 50, in run_setup
    lambda: execfile(
  File "/tmp/nix-build-python3.3m-setuptools-2.0.2.drv-0/setuptools-2.0.2/setuptools/sandbox.py", line 100, in run
    return func()
  File "/tmp/nix-build-python3.3m-setuptools-2.0.2.drv-0/setuptools-2.0.2/setuptools/sandbox.py", line 52, in <lambda>
    {'__file__':setup_script, '__name__':'__main__'}
  File "/tmp/nix-build-python3.3m-setuptools-2.0.2.drv-0/setuptools-2.0.2/setuptools/compat.py", line 78, in execfile
    exec(compile(source, fn, 'exec'), globs, locs)
  File "setup.py", line 2, in <module>
    """Distutils setup file, used to install or test 'setuptools'"""
  File "/nix/store/9yg4a0k52g1k2xy3iyim9s30nfs8zbcn-distutils.cfg-python3.3.3/lib/python3.3/site-packages/distutils/core.py", line 109, in setup
    _setup_distribution = dist = klass(attrs)
  File "/tmp/nix-build-python3.3m-setuptools-2.0.2.drv-0/setuptools-2.0.2/setuptools/dist.py", line 239, in __init__
    self.fetch_build_eggs(attrs.pop('setup_requires'))
  File "/tmp/nix-build-python3.3m-setuptools-2.0.2.drv-0/setuptools-2.0.2/setuptools/dist.py", line 263, in fetch_build_eggs
    parse_requirements(requires), installer=self.fetch_build_egg
  File "/tmp/nix-build-python3.3m-setuptools-2.0.2.drv-0/setuptools-2.0.2/pkg_resources.py", line 563, in resolve
    dist = best[req.key] = env.best_match(req, self, installer)
  File "/tmp/nix-build-python3.3m-setuptools-2.0.2.drv-0/setuptools-2.0.2/pkg_resources.py", line 801, in best_match
    return self.obtain(req, installer) # try and download/install
  File "/tmp/nix-build-python3.3m-setuptools-2.0.2.drv-0/setuptools-2.0.2/pkg_resources.py", line 813, in obtain
    return installer(requirement)
  File "/tmp/nix-build-python3.3m-setuptools-2.0.2.drv-0/setuptools-2.0.2/setuptools/dist.py", line 298, in fetch_build_egg
    for key in opts.keys():
RuntimeError: dictionary changed size during iteration

----------------------------------------------------------------------
Ran 124 tests in 3.453s

FAILED (errors=2, skipped=8)

@ghost
Copy link
Author

ghost commented Jan 5, 2014

Original comment by jaraco (Bitbucket: jaraco, GitHub: jaraco):


According to travis, the tests are all passing. Any idea why your experience differs from travis?

@ghost
Copy link
Author

ghost commented Jan 5, 2014

Original comment by jaraco (Bitbucket: jaraco, GitHub: jaraco):


Fix Python 3 failure when constructing an egg_fetcher. Fixes #131.

@bignose-debian
Copy link

bignose-debian commented Mar 12, 2017

This occurs when using a distutils.dist.Distribution subclass, with Setuptools commands such as install.

Evidently something has recently changed such that Setuptools makes assumptions about the Distribution instance which will fail with Distutils's own classes.

This is a regression from Setuptools's expected behaviour: to enhance Distutils, without breaking compatibility with that library.

@bignose-debian
Copy link

This is a regression from Setuptools's expected behaviour

What is the prognosis for this regression? In my opinion this bug is not closed but the change, but I am not able to change the status of this issue.

@jaraco
Copy link
Member

jaraco commented Oct 28, 2017

Hi @bignose-debian. There are conditions where the monkeypatching of distutils fails to have the desired behavior. If you think there is a use-case that should be supported but is failing, please open a new ticket describing the error message and the conditions required to make it happen.

Your description above only describes a very generic scenario which happens all the time and is part of the Setuptools test suite, so we know that behavior isn't failing. Try to track down what it is about your environment that differs from the test suite or what other users are using without issues.

jaraco added a commit that referenced this issue Apr 10, 2022
Fix EXT_SUFFIX for windows py<3.8
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants