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

chore: cleanup and harden pytest config #1011

Merged
merged 3 commits into from
Feb 22, 2022

Conversation

henryiii
Copy link
Contributor

@henryiii henryiii commented Feb 6, 2022

Minor cleanup, and make sure pytest is strict.

@mayeut
Copy link
Member

mayeut commented Feb 6, 2022

It seems the warnings (turned in error) comes from

def __exit__(
self,
exc_type: Optional[Type[BaseException]],
exc_val: Optional[BaseException],
exc_tb: Optional[TracebackType],
) -> None:
self.bash_stdin.close()
self.process.terminate()
self.process.wait()
assert isinstance(self.name, str)

adding the following gets rid of the error.

self.bash_stdout.close()

I wonder if terminating differently might help with #966 race conditions. Something like:

self.bash_stdin.write(b"exit 0\n")
self.bash_stdin.flush()
self.process.wait()
self.process.stdin.close()
self.process.stdout.close()

@henryiii
Copy link
Contributor Author

henryiii commented Feb 7, 2022

I've implemented something close to that, thoughts?

cibuildwheel/docker_container.py Outdated Show resolved Hide resolved
Co-authored-by: Joe Rickerby <joerick@mac.com>
@henryiii henryiii merged commit 45a211e into pypa:main Feb 22, 2022
@henryiii henryiii deleted the henryiii/chore/cfgclean branch February 22, 2022 22:27
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.

None yet

3 participants