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

gh-101821: Cover ast.main function #101822

Merged
merged 1 commit into from
Mar 11, 2023
Merged

Conversation

sobolevn
Copy link
Member

@sobolevn sobolevn commented Feb 11, 2023

Couple of comments on the implementation:

  • script_helper.run_python_until_end has @support.requires_subprocess() guard, so it is should be safe for envs where subprocess is not available
  • os_helper.temp_dir is also widely used for temp files, it even catches OSError and warns about it

So, this new cases should not add any test falkiness or new failures 🙂

@sobolevn
Copy link
Member Author

Oh, \n is platform specific. Fixing!

Lib/test/test_ast.py Outdated Show resolved Hide resolved
@sobolevn
Copy link
Member Author

@hauntsaninja can you please take a look? :)

Copy link
Contributor

@hauntsaninja hauntsaninja left a comment

Choose a reason for hiding this comment

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

Looks good! Weird that the default indentation is 3

@hauntsaninja hauntsaninja added needs backport to 3.10 only security fixes needs backport to 3.11 only security fixes labels Mar 11, 2023
@hauntsaninja hauntsaninja merged commit bb396ee into python:main Mar 11, 2023
@miss-islington
Copy link
Contributor

Thanks @sobolevn for the PR, and @hauntsaninja for merging it 🌮🎉.. I'm working now to backport this PR to: 3.10, 3.11.
🐍🍒⛏🤖

@miss-islington
Copy link
Contributor

Sorry, @sobolevn and @hauntsaninja, I could not cleanly backport this to 3.11 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker bb396eece44036a71427e7766fbb8e0247373102 3.11

@miss-islington
Copy link
Contributor

Sorry @sobolevn and @hauntsaninja, I had trouble checking out the 3.10 backport branch.
Please retry by removing and re-adding the "needs backport to 3.10" label.
Alternatively, you can backport using cherry_picker on the command line.
cherry_picker bb396eece44036a71427e7766fbb8e0247373102 3.10

@hauntsaninja hauntsaninja removed needs backport to 3.10 only security fixes needs backport to 3.11 only security fixes labels Mar 11, 2023
@hauntsaninja
Copy link
Contributor

Thanks! Fine not to backport since there are already merge conflicts

iritkatriel pushed a commit to iritkatriel/cpython that referenced this pull request Mar 12, 2023
warsaw pushed a commit to warsaw/cpython that referenced this pull request Apr 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip news tests Tests in the Lib/test dir
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants