Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
4432fda2
Commit
4432fda2
authored
Mar 21, 2009
by
Benjamin Peterson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
stringio doesn't have an encoding
parent
a4a730e8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
2 deletions
+6
-2
Lib/_pyio.py
Lib/_pyio.py
+4
-0
Lib/test/test_memoryio.py
Lib/test/test_memoryio.py
+1
-1
Modules/_stringio.c
Modules/_stringio.c
+1
-1
No files found.
Lib/_pyio.py
View file @
4432fda2
...
...
@@ -1834,3 +1834,7 @@ class StringIO(TextIOWrapper):
# TextIOWrapper tells the encoding in its repr. In StringIO,
# that's a implementation detail.
return
object
.
__repr__
(
self
)
@
property
def
encoding
(
self
):
return
None
Lib/test/test_memoryio.py
View file @
4432fda2
...
...
@@ -451,7 +451,7 @@ class PyStringIOTest(MemoryTestMixin, MemorySeekTestMixin, unittest.TestCase):
# These are just dummy values but we nevertheless check them for fear
# of unexpected breakage.
self
.
assert
Equal
(
memio
.
encoding
,
"utf-8"
)
self
.
assert
True
(
memio
.
encoding
is
None
)
self
.
assertEqual
(
memio
.
errors
,
"strict"
)
self
.
assertEqual
(
memio
.
line_buffering
,
False
)
...
...
Modules/_stringio.c
View file @
4432fda2
...
...
@@ -665,7 +665,7 @@ stringio_encoding(StringIOObject *self, void *context)
{
CHECK_INITIALIZED
(
self
);
CHECK_CLOSED
(
self
);
return
PyUnicode_FromString
(
"utf-8"
)
;
Py_RETURN_NONE
;
}
static
PyObject
*
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment