Skip to content

Commit 0ab4592

Browse files
committed
Revert "expose MAXIMUM_BUFFER_SIZE"
This reverts commit 4e0e1e1.
1 parent 4e0e1e1 commit 0ab4592

File tree

2 files changed

+4
-14
lines changed

2 files changed

+4
-14
lines changed

Lib/io.py

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,8 @@
2929
DEFAULT_BUFFER_SIZE
3030
3131
An int containing the default buffer size used by the module's buffered
32-
I/O classes.
33-
34-
MAXIMUM_BUFFER_SIZE
35-
36-
An int containing the maximum buffer size used by the module's buffered
37-
I/O classes.
32+
I/O classes. open() uses the file's blksize (as obtained by os.stat) if
33+
possible.
3834
"""
3935
# New I/O library conforming to PEP 3116.
4036

@@ -50,15 +46,13 @@
5046
"BufferedReader", "BufferedWriter", "BufferedRWPair",
5147
"BufferedRandom", "TextIOBase", "TextIOWrapper",
5248
"UnsupportedOperation", "SEEK_SET", "SEEK_CUR", "SEEK_END",
53-
"DEFAULT_BUFFER_SIZE", "MAXIMUM_BUFFER_SIZE", "text_encoding",
54-
"IncrementalNewlineDecoder"]
49+
"DEFAULT_BUFFER_SIZE", "text_encoding", "IncrementalNewlineDecoder"]
5550

5651

5752
import _io
5853
import abc
5954

60-
from _io import (DEFAULT_BUFFER_SIZE, MAXIMUM_BUFFER_SIZE,
61-
BlockingIOError, UnsupportedOperation,
55+
from _io import (DEFAULT_BUFFER_SIZE, BlockingIOError, UnsupportedOperation,
6256
open, open_code, FileIO, BytesIO, StringIO, BufferedReader,
6357
BufferedWriter, BufferedRWPair, BufferedRandom,
6458
IncrementalNewlineDecoder, text_encoding, TextIOWrapper)

Modules/_io/_iomodule.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -660,10 +660,6 @@ iomodule_exec(PyObject *m)
660660
if (PyModule_AddIntMacro(m, DEFAULT_BUFFER_SIZE) < 0)
661661
return -1;
662662

663-
/* MAXIMUM_BUFFER_SIZE */
664-
if (PyModule_AddIntMacro(m, MAXIMUM_BUFFER_SIZE) < 0)
665-
return -1;
666-
667663
/* UnsupportedOperation inherits from ValueError and OSError */
668664
state->unsupported_operation = PyObject_CallFunction(
669665
(PyObject *)&PyType_Type, "s(OO){}",

0 commit comments

Comments
 (0)