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

Python 2.4 compatibility #21

Closed
bb-migration opened this Issue Jun 17, 2013 · 1 comment

Comments

Projects
None yet
1 participant
@bb-migration

bb-migration commented Jun 17, 2013

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


setuptools/tests/test_easy_install.py module should not use the try/except/finally construct and should instead use a try/except block wrapped inside a separate try/finally block.

Without this we get ugly warnings/errors when installing setuptools on Python 3.2. This has been noticed when using the ez_setup.py bootstrap script called from another installation package, with setuptools version 0.7.2.

Current code:

        try:
            reset_setup_stop_context(
                lambda: run_setup(test_setup_py, ['install'])
            )
        except SandboxViolation:
            self.fail('Installation caused SandboxViolation')
        finally:
            sys.stdout = old_stdout
            sys.stderr = old_stderr

Corrected code (untested):

        try:
            try:
                reset_setup_stop_context(
                    lambda: run_setup(test_setup_py, ['install'])
                )
            except SandboxViolation:
                self.fail('Installation caused SandboxViolation')
        finally:
            sys.stdout = old_stdout
            sys.stderr = old_stderr

@bb-migration

This comment has been minimized.

bb-migration commented Jun 19, 2013

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


Restore Python 2.4 compatibility in test_easy_install. Fixes #21

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment