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

fix log.py warning about buffering #953

Merged
merged 2 commits into from
Aug 24, 2024

Conversation

earthgecko
Copy link
Contributor

This is a fix for Python 3.9.6 causes warning about buffering for binary mode #922, setting this to 0 is the default behaviour and results in the default buffer size being used.

The warning was released in Python 3.8.0 and is still present in 3.10.13 (tested, works and logging works fine) and is still present in 3.12.2 (https://github.com/python/cpython/blob/v3.12.2/Lib/_pyio.py#L231)

The version check may be excessive because who would be running < 3.8.0, but you never know.

This is a fix for  Python 3.9.6 causes warning about buffering for binary mode graphite-project#922, setting this to 0 is the default behaviour and results in the default buffer size being used.

The warning was released in Python 3.8.0 and is still present in 3.10.13 (tested, works and logging works fine) and is still present in 3.12.2 (https://github.com/python/cpython/blob/v3.12.2/Lib/_pyio.py#L231)

The version check may be excessive because who would be running < 3.8.0, but you never know.
Try to fix lint failure with NOQA
@codecov-commenter
Copy link

codecov-commenter commented Feb 8, 2024

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 80.00000% with 1 line in your changes missing coverage. Please review.

Project coverage is 50.63%. Comparing base (66ebee1) to head (fdc56f6).
Report is 8 commits behind head on master.

Files Patch % Lines
lib/carbon/log.py 80.00% 0 Missing and 1 partial ⚠️

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

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #953      +/-   ##
==========================================
+ Coverage   50.61%   50.63%   +0.02%     
==========================================
  Files          36       36              
  Lines        3442     3446       +4     
  Branches      534      535       +1     
==========================================
+ Hits         1742     1745       +3     
  Misses       1574     1574              
- Partials      126      127       +1     

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

Copy link
Member

@deniszh deniszh left a comment

Choose a reason for hiding this comment

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

Smh missed that, looks good

@deniszh deniszh merged commit 66aee51 into graphite-project:master Aug 24, 2024
8 of 9 checks passed
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.

3 participants