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

[3.9] bpo-46542: test_lib2to3 uses support.infinite_recursion() (GH-31035) #31037

Merged
merged 1 commit into from
Jan 31, 2022

Conversation

miss-islington
Copy link
Contributor

@miss-islington miss-islington commented Jan 31, 2022

  • bpo-46542: test_lib2to3 uses support.infinite_recursion()

Fix a Python crash in test_lib2to3 when using Python built in debug
mode: limit the recursion limit.

The test_all_project_files() test of test_lib2to3 now uses the
test.support.infinite_recursion() context manager when processing the
infinite_recursion.py file to prevent a crash when Python is built in
debug mode.

The two test_all_project_files() tests now use subTest() and log the
refactored/parsed filename (if test_lib2to3 is run in verbose mode).

  • Update Lib/lib2to3/tests/data/infinite_recursion.py

Co-authored-by: Jelle Zijlstra jelle.zijlstra@gmail.com

Co-authored-by: Łukasz Langa lukasz@langa.pl
Co-authored-by: Jelle Zijlstra jelle.zijlstra@gmail.com
(cherry picked from commit ee0ac32)

Co-authored-by: Victor Stinner vstinner@python.org

…1035)

* bpo-46542: test_lib2to3 uses support.infinite_recursion()

Fix a Python crash in test_lib2to3 when using Python built in debug
mode: limit the recursion limit.

The test_all_project_files() test of test_lib2to3 now uses the
test.support.infinite_recursion() context manager when processing the
infinite_recursion.py file to prevent a crash when Python is built in
debug mode.

The two test_all_project_files() tests now use subTest() and log the
refactored/parsed filename (if test_lib2to3 is run in verbose mode).

* Update Lib/lib2to3/tests/data/infinite_recursion.py

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
(cherry picked from commit ee0ac32)

Co-authored-by: Victor Stinner <vstinner@python.org>
@miss-islington
Copy link
Contributor Author

@vstinner and @ambv: Status check is done, and it's a success ✅ .

@miss-islington
Copy link
Contributor Author

@vstinner and @ambv: Status check is done, and it's a success ✅ .

2 similar comments
@miss-islington
Copy link
Contributor Author

@vstinner and @ambv: Status check is done, and it's a success ✅ .

@miss-islington
Copy link
Contributor Author

@vstinner and @ambv: Status check is done, and it's a success ✅ .

Copy link
Member

@vstinner vstinner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@miss-islington miss-islington merged commit 3046386 into python:3.9 Jan 31, 2022
@miss-islington miss-islington deleted the backport-ee0ac32-3.9 branch January 31, 2022 20:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants