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

@sir-sigurd

@vsajip vsajip changed the title Fix 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

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

Sep 13, 2020
…file.* functions (pythonGH-21763)

`None` doesn't work:

```python
>>> 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>

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

Sep 13, 2020
…file.* functions (pythonGH-21763)

`None` doesn't work:

```python
>>> 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>

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

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

Oct 18, 2020
…file.* functions (pythonGH-21763)

`None` doesn't work:

```python
>>> 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