gunicorn 19.9.0 on Python3.8 raises RuntimeWarning: line buffering (buffering=1) isn't supported in binary mode...

Created on 15 Aug 2019  Â·  4Comments  Â·  Source: benoitc/gunicorn

RuntimeWarning: line buffering (buffering=1) isn't supported in binary mode, the default buffer size will be used
  return io.open(fd, *args, **kwargs)

See https://bugs.python.org/issue32236

Issue is caused by:

gunicorn/workers/workertmp.py", line 33, in __init__
    self._tmp = os.fdopen(fd, 'w+b', 1)
( )

Most helpful comment

still i wonder what changed. anyway I pushed the patch, it will be part of
the 20.0 release today

On Wed 30 Oct 2019 at 09:14, Randall Leeds notifications@github.com wrote:

Python is not buffering here and never was. The argument of buffering=1
was silently ignored.

The change to emit this warning is new in 3.8:
https://bugs.python.org/issue32236

2146 https://github.com/benoitc/gunicorn/pull/2146 is ready with the

fix and approved.

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/benoitc/gunicorn/issues/2091?email_source=notifications&email_token=AAADRIQLXIUIVDUCA6POYKTQRE667A5CNFSM4IL5TQSKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOECTIP3Q#issuecomment-547784686,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAADRIWNBHJOVI7RSRR3NJTQRE667ANCNFSM4IL5TQSA
.

>

Sent from my Mobile

All 4 comments

I think we could pass 0 because we never write to this file. We only ever call os.fchmod and os.fstat on it.

Would you like to make a PR for this?

the question also is why suddenly python decided to buffer there also. does anyone knows when the change have been done?

Python is not buffering here and never was. The argument of buffering=1 was silently ignored.

The change to emit this warning is new in 3.8: https://bugs.python.org/issue32236

2146 is ready with the fix and approved.

still i wonder what changed. anyway I pushed the patch, it will be part of
the 20.0 release today

On Wed 30 Oct 2019 at 09:14, Randall Leeds notifications@github.com wrote:

Python is not buffering here and never was. The argument of buffering=1
was silently ignored.

The change to emit this warning is new in 3.8:
https://bugs.python.org/issue32236

2146 https://github.com/benoitc/gunicorn/pull/2146 is ready with the

fix and approved.

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/benoitc/gunicorn/issues/2091?email_source=notifications&email_token=AAADRIQLXIUIVDUCA6POYKTQRE667A5CNFSM4IL5TQSKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOECTIP3Q#issuecomment-547784686,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAADRIWNBHJOVI7RSRR3NJTQRE667ANCNFSM4IL5TQSA
.

>

Sent from my Mobile

Was this page helpful?
0 / 5 - 0 ratings