Skip to content

Conversation

@LorenzMende
Copy link
Contributor

@LorenzMende LorenzMende commented Jun 30, 2018

result of function interpreter_requires_environment depends on os.environ - this was not covered by the tests, leading to fail in some environments

3 tests modified, 1 added

https://bugs.python.org/issue32942

result of function interpreter_requires_environment depends on os.environ - this was not covered by the tests, leading to fail in some environments
@the-knights-who-say-ni
Copy link

Hello, and thanks for your contribution!

I'm a bot set up to make sure that the project can legally accept your contribution by verifying you have signed the PSF contributor agreement (CLA).

Unfortunately our records indicate you have not signed the CLA. For legal reasons we need you to sign this before we can look at your contribution. Please follow the steps outlined in the CPython devguide to rectify this issue.

When your account is ready, please add a comment in this pull request
and a Python core developer will remove the CLA not signed label
to make the bot check again.

Thanks again for your contribution, we look forward to reviewing it!

Copy link
Member

@terryjreedy terryjreedy left a comment

Choose a reason for hiding this comment

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

I approve of patch changes text_script_helper result from failure to success ;-). I leave review of detail and merge decision to Victor -- after CLA is signed.

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.

Don't forget to sign the CLA. Otherwise, we cannot merge your PR.

# Reset the private cached state.
script_helper.__dict__['__cached_interp_requires_environment'] = None

@mock.patch('os.environ', {})
Copy link
Member

Choose a reason for hiding this comment

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

I would prefer to only modify add/remove variables needed by the function, instead of using a strange empty environment.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Know what you mean, I'm on it.

@vstinner
Copy link
Member

vstinner commented Jul 2, 2018

@LorenzMende: Can you please sign the CLA? See #8034 (comment) for details.

@LorenzMende
Copy link
Contributor Author

@vstinner: Missed one step in the CLA procedure... should be fine now.

@miss-islington
Copy link
Contributor

Thanks @LorenzMende for the PR, and @vstinner for merging it 🌮🎉.. I'm working now to backport this PR to: 3.6.
🐍🍒⛏🤖

@miss-islington
Copy link
Contributor

Thanks @LorenzMende for the PR, and @vstinner for merging it 🌮🎉.. I'm working now to backport this PR to: 3.7.
🐍🍒⛏🤖

@bedevere-bot
Copy link

GH-8087 is a backport of this pull request to the 3.7 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jul 4, 2018
Result of function interpreter_requires_environment() depends on os.environ.
This was not covered by the tests, leading to fail when PYTHONHOME was set.
(cherry picked from commit a390cb6)

Co-authored-by: Lorenz Mende <[email protected]>
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jul 4, 2018
Result of function interpreter_requires_environment() depends on os.environ.
This was not covered by the tests, leading to fail when PYTHONHOME was set.
(cherry picked from commit a390cb6)

Co-authored-by: Lorenz Mende <[email protected]>
@bedevere-bot
Copy link

GH-8088 is a backport of this pull request to the 3.6 branch.

miss-islington added a commit that referenced this pull request Jul 4, 2018
Result of function interpreter_requires_environment() depends on os.environ.
This was not covered by the tests, leading to fail when PYTHONHOME was set.
(cherry picked from commit a390cb6)

Co-authored-by: Lorenz Mende <[email protected]>
miss-islington added a commit that referenced this pull request Jul 4, 2018
Result of function interpreter_requires_environment() depends on os.environ.
This was not covered by the tests, leading to fail when PYTHONHOME was set.
(cherry picked from commit a390cb6)

Co-authored-by: Lorenz Mende <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants