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 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 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 as completed Mar 29, 2016
jaraco added a commit that referenced this issue Feb 4, 2023
jaraco added a commit that referenced this issue Feb 4, 2023
fixes a bug where a Basic auth digest header can get encoded with newlines inside
jaraco added a commit that referenced this issue Feb 4, 2023
--HG--
extra : rebase_source : d89b8c105bd561122c6ae8d9b302db6f0eb6060c
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

0 participants