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

Python 2.4 compatibility #21

Closed
ghost opened this issue Jun 17, 2013 · 1 comment
Closed

Python 2.4 compatibility #21

ghost opened this issue Jun 17, 2013 · 1 comment

Comments

@ghost
Copy link

@ghost ghost 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

@ghost
Copy link
Author

@ghost ghost commented Jun 19, 2013

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


Restore Python 2.4 compatibility in test_easy_install. Fixes #21

@ghost ghost closed this Mar 29, 2016
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
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
0 participants