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

bpo-33525: Add env type checking when spawn called #6910

Closed
wants to merge 2 commits into from

Conversation

Licht-T
Copy link
Contributor

@Licht-T Licht-T commented May 16, 2018

@@ -847,6 +848,14 @@ def _spawnvef(mode, file, args, env, func):
raise TypeError('argv must be a tuple or a list')
if not args or not args[0]:
raise ValueError('argv first element cannot be empty')

sig = inspect.signature(func)
Copy link
Member

@vstinner vstinner May 17, 2018

Choose a reason for hiding this comment

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

I don't think that it's appropriate to use inspect here. I would prefer to see the check in the caller function instead. Add an helper function if you want to factorize the code.

Copy link
Contributor Author

@Licht-T Licht-T May 17, 2018

Choose a reason for hiding this comment

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

@vstinner So you mean the validation should be placed on function which call this _spawnvef function, right?

Copy link
Member

@vstinner vstinner May 18, 2018

Choose a reason for hiding this comment

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

Move the test into spawnve() and spawnvpe().

@bedevere-bot
Copy link

bedevere-bot commented May 17, 2018

A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated.

Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

@csabella
Copy link
Contributor

csabella commented Jan 12, 2020

@Licht-T, please apply the changes that were requested in the code review. If you're not interested in following up with this, feel free to close the pull request. Thank you!

@csabella csabella closed this Jan 12, 2020
@csabella csabella reopened this Jan 12, 2020
@AlexWaygood
Copy link
Member

AlexWaygood commented Apr 17, 2022

@Licht-T, thanks for the PR! However, I'm closing this PR, for the following reasons:

  • Changes were requested by a core dev four years ago, but have not been made.
  • Multiple checks are failing in CI
  • There's now a merge conflict.

If you're still interested in working on this issue, please feel free to open a new PR :) alternatively ping me and I'll happily reopen the PR

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.

None yet

6 participants