", line 1, in

bpo-33239: Fix default value of 'buffering' parameter in docs of tempfile.* functions by sir-sigurd · Pull Request #21763 · python/cpython (original) (raw)

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 andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation6 Commits1 Checks0 Files changed

Conversation

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters

[ Show hidden characters]({{ revealButtonHref }})

sir-sigurd

None doesn't work:

import tempfile tempfile.TemporaryFile(buffering=None) Traceback (most recent call last): File "", line 1, in File "/home/sergey/tmp/cpython-dev/Lib/tempfile.py", line 607, in TemporaryFile return _io.open(fd, mode, buffering=buffering, TypeError: 'NoneType' object cannot be interpreted as an integer

https://bugs.python.org/issue33239

Automerge-Triggered-By: @vsajip

@sir-sigurd

@tirkarthi

@vsajip vsajip changed the titleFix default value of 'buffering' parameter in docs of tempfile.* functions bpo-33239: Fix default value of 'buffering' parameter in docs of tempfile.* functions

Sep 13, 2020

@vsajip

Travis job seems to be stalled, so I will close and reopen this PR.

vsajip

@miss-islington

Thanks @sir-sigurd for the PR 🌮🎉.. I'm working now to backport this PR to: 3.8.
🐍🍒⛏🤖

@miss-islington

Thanks @sir-sigurd for the PR 🌮🎉.. I'm working now to backport this PR to: 3.9.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request

Sep 13, 2020

@sir-sigurd @miss-islington

…file.* functions (pythonGH-21763)

None doesn't work:

>>> import tempfile
>>> tempfile.TemporaryFile(buffering=None)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/sergey/tmp/cpython-dev/Lib/tempfile.py", line 607, in TemporaryFile
    return _io.open(fd, mode, buffering=buffering,
TypeError: 'NoneType' object cannot be interpreted as an integer

Automerge-Triggered-By: @vsajip (cherry picked from commit b48389d)

Co-authored-by: Sergey Fedoseev fedoseev.sergey@gmail.com

@bedevere-bot

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request

Sep 13, 2020

@sir-sigurd @miss-islington

…file.* functions (pythonGH-21763)

None doesn't work:

>>> import tempfile
>>> tempfile.TemporaryFile(buffering=None)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/sergey/tmp/cpython-dev/Lib/tempfile.py", line 607, in TemporaryFile
    return _io.open(fd, mode, buffering=buffering,
TypeError: 'NoneType' object cannot be interpreted as an integer

Automerge-Triggered-By: @vsajip (cherry picked from commit b48389d)

Co-authored-by: Sergey Fedoseev fedoseev.sergey@gmail.com

@bedevere-bot

vsajip pushed a commit that referenced this pull request

Sep 13, 2020

@miss-islington

vsajip pushed a commit that referenced this pull request

Sep 13, 2020

@miss-islington

xzy3 pushed a commit to xzy3/cpython that referenced this pull request

Oct 18, 2020

@sir-sigurd

…file.* functions (pythonGH-21763)

None doesn't work:

>>> import tempfile
>>> tempfile.TemporaryFile(buffering=None)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/sergey/tmp/cpython-dev/Lib/tempfile.py", line 607, in TemporaryFile
    return _io.open(fd, mode, buffering=buffering,
TypeError: 'NoneType' object cannot be interpreted as an integer

Automerge-Triggered-By: @vsajip