graphite-project / carbon

Carbon is one of the components of Graphite, and is responsible for receiving metrics over the network and writing them down to disk using a storage backend.
http://graphite.readthedocs.org/
Apache License 2.0
1.51k stars 490 forks source link

fix log.py warning about buffering #953

Closed earthgecko closed 3 months ago

earthgecko commented 9 months ago

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.

codecov-commenter commented 9 months ago

:warning: 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 :warning:

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

Additional details and impacted files ```diff @@ 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 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.