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

don't leak a file descriptor to os.devnull by default #13162

Merged
merged 2 commits into from
Nov 17, 2023
Merged

don't leak a file descriptor to os.devnull by default #13162

merged 2 commits into from
Nov 17, 2023

Conversation

asottile
Copy link
Contributor

since this is passed along to subprocess directly we can use the subprocess constants still

Thanks for contributing to Selenium!
A PR well described will help maintainers to quickly review and merge it

Before submitting your PR, please check our contributing guidelines.
Avoid large PRs, help reviewers by making them as simple and short as possible.

Description

avoid one open call without a close -- this doesn't fix the other one in the file but I am less concerned with that one since I am only using the default behaviour

I also adjusted is to == for the subprocess constants -- they are not guaranteed to be singletons so they should be compared with equality

Motivation and Context

regression in #12103

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • I have read the contributing document.
  • My change requires a change to the documentation. N/A
  • I have updated the documentation accordingly. N/A
  • I have added tests to cover my changes. N/A
  • All new and existing tests passed.

since this is passed along to subprocess directly we can use the subprocess constants still

regression in #12103
@CLAassistant
Copy link

CLAassistant commented Nov 16, 2023

CLA assistant check
All committers have signed the CLA.

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (354c718) 57.52% compared to head (32b0a60) 57.52%.
Report is 2 commits behind head on trunk.

❗ Current head 32b0a60 differs from pull request most recent head df054db. Consider uploading reports for the commit df054db to get more accurate results

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff           @@
##            trunk   #13162   +/-   ##
=======================================
  Coverage   57.52%   57.52%           
=======================================
  Files          86       86           
  Lines        5299     5299           
  Branches      221      221           
=======================================
  Hits         3048     3048           
  Misses       2030     2030           
  Partials      221      221           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@titusfortner titusfortner merged commit eb0a321 into SeleniumHQ:trunk Nov 17, 2023
13 checks passed
@titusfortner
Copy link
Member

Thank you!

@asottile asottile deleted the patch-1 branch November 17, 2023 14:58
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