-
-
Notifications
You must be signed in to change notification settings - Fork 33.2k
Closed as not planned
Closed as not planned
Copy link
Labels
extension-modulesC modules in the Modules dirC modules in the Modules dirstdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytopic-IOtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Bug report
Bug description:
list where I found error message inconsistencies:
io.open()
_io
impl raise:TypeError: open() missing required argument 'file' (pos 1)
_pyio
impl raise:TypeError: open() missing 1 required positional argument: 'file'
io.open("file.txt", mode="")
_io
impl raise:ValueError: Must have exactly one of create/read/write/append mode and at most one plus
_pyio
impl raise:ValueError: must have exactly one of read/write/append mode
io.open("file.txt", mode=None)
_io
impl raise:TypeError: open() argument 'mode' must be str, not None
_pyio
impl raise:TypeError: invalid mode: None
io.open('file.txt', buffering="")
_io
impl raise:TypeError: 'str' object cannot be interpreted as an integer
_pyio
impl raise:TypeError: invalid buffering: ''
io.open('file.txt', encoding=0)
_io
impl raise:TypeError: open() argument 'encoding' must be str or None, not int
_pyio
impl raise:TypeError: invalid encoding: 0
io.open('file.txt', errors=0)
_io
impl raise:TypeError: open() argument 'errors' must be str or None, not int
_pyio
impl raise:TypeError: invalid errors: 0
io.open('file.txt', newline=0)
_io
impl raise:TypeError: open() argument 'newline' must be str or None, not int
_pyio
impl raise:TypeError: illegal newline type: <class 'int'>
I'm ready to take on
CPython versions tested on:
CPython main branch
Operating systems tested on:
No response
Metadata
Metadata
Assignees
Labels
extension-modulesC modules in the Modules dirC modules in the Modules dirstdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytopic-IOtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error