Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
50254c57
Kaydet (Commit)
50254c57
authored
Agu 29, 2013
tarafından
Serhiy Storchaka
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #18743: Fix references to non-existant "StringIO" module
in docstrings and comments.
üst
15e65907
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
15 additions
and
21 deletions
+15
-21
asynchat.py
Lib/asynchat.py
+3
-6
gzip.py
Lib/gzip.py
+1
-1
tempfile.py
Lib/tempfile.py
+1
-1
pickletester.py
Lib/test/pickletester.py
+2
-2
test_httplib.py
Lib/test/test_httplib.py
+4
-4
test_logging.py
Lib/test/test_logging.py
+1
-6
NEWS
Misc/NEWS
+2
-0
libpython.py
Tools/gdb/libpython.py
+1
-1
No files found.
Lib/asynchat.py
Dosyayı görüntüle @
50254c57
...
@@ -69,12 +69,9 @@ class async_chat (asyncore.dispatcher):
...
@@ -69,12 +69,9 @@ class async_chat (asyncore.dispatcher):
# for string terminator matching
# for string terminator matching
self
.
ac_in_buffer
=
b
''
self
.
ac_in_buffer
=
b
''
# we use a list here rather than cStringIO for a few reasons...
# we use a list here rather than io.BytesIO for a few reasons...
# del lst[:] is faster than sio.truncate(0)
# del lst[:] is faster than bio.truncate(0)
# lst = [] is faster than sio.truncate(0)
# lst = [] is faster than bio.truncate(0)
# cStringIO will be gaining unicode support in py3k, which
# will negatively affect the performance of bytes compared to
# a ''.join() equivalent
self
.
incoming
=
[]
self
.
incoming
=
[]
# we toss the use of the "simple producer" and replace it with
# we toss the use of the "simple producer" and replace it with
...
...
Lib/gzip.py
Dosyayı görüntüle @
50254c57
...
@@ -144,7 +144,7 @@ class GzipFile(io.BufferedIOBase):
...
@@ -144,7 +144,7 @@ class GzipFile(io.BufferedIOBase):
non-trivial value.
non-trivial value.
The new class instance is based on fileobj, which can be a regular
The new class instance is based on fileobj, which can be a regular
file, a
String
IO object, or any other object which simulates a file.
file, a
n io.Bytes
IO object, or any other object which simulates a file.
It defaults to None, in which case filename is opened to provide
It defaults to None, in which case filename is opened to provide
a file object.
a file object.
...
...
Lib/tempfile.py
Dosyayı görüntüle @
50254c57
...
@@ -521,7 +521,7 @@ class SpooledTemporaryFile:
...
@@ -521,7 +521,7 @@ class SpooledTemporaryFile:
# The method caching trick from NamedTemporaryFile
# The method caching trick from NamedTemporaryFile
# won't work here, because _file may change from a
# won't work here, because _file may change from a
#
_
StringIO instance to a real file. So we list
#
BytesIO/
StringIO instance to a real file. So we list
# all the methods directly.
# all the methods directly.
# Context management protocol
# Context management protocol
...
...
Lib/test/pickletester.py
Dosyayı görüntüle @
50254c57
...
@@ -1547,14 +1547,14 @@ class AbstractPicklerUnpicklerObjectTests(unittest.TestCase):
...
@@ -1547,14 +1547,14 @@ class AbstractPicklerUnpicklerObjectTests(unittest.TestCase):
pickler
.
dump
(
data
)
pickler
.
dump
(
data
)
first_pickled
=
f
.
getvalue
()
first_pickled
=
f
.
getvalue
()
# Reset
String
IO object.
# Reset
Bytes
IO object.
f
.
seek
(
0
)
f
.
seek
(
0
)
f
.
truncate
()
f
.
truncate
()
pickler
.
dump
(
data
)
pickler
.
dump
(
data
)
second_pickled
=
f
.
getvalue
()
second_pickled
=
f
.
getvalue
()
# Reset the Pickler and
String
IO objects.
# Reset the Pickler and
Bytes
IO objects.
pickler
.
clear_memo
()
pickler
.
clear_memo
()
f
.
seek
(
0
)
f
.
seek
(
0
)
f
.
truncate
()
f
.
truncate
()
...
...
Lib/test/test_httplib.py
Dosyayı görüntüle @
50254c57
...
@@ -51,8 +51,8 @@ class EPipeSocket(FakeSocket):
...
@@ -51,8 +51,8 @@ class EPipeSocket(FakeSocket):
def
close
(
self
):
def
close
(
self
):
pass
pass
class
NoEOF
String
IO
(
io
.
BytesIO
):
class
NoEOF
Bytes
IO
(
io
.
BytesIO
):
"""Like
String
IO, but raises AssertionError on EOF.
"""Like
Bytes
IO, but raises AssertionError on EOF.
This is used below to test that http.client doesn't try to read
This is used below to test that http.client doesn't try to read
more from the underlying file than it should.
more from the underlying file than it should.
...
@@ -324,7 +324,7 @@ class BasicTest(TestCase):
...
@@ -324,7 +324,7 @@ class BasicTest(TestCase):
'HTTP/1.1 200 OK
\r\n
'
'HTTP/1.1 200 OK
\r\n
'
'Content-Length: 14432
\r\n
'
'Content-Length: 14432
\r\n
'
'
\r\n
'
,
'
\r\n
'
,
NoEOF
String
IO
)
NoEOF
Bytes
IO
)
resp
=
client
.
HTTPResponse
(
sock
,
method
=
"HEAD"
)
resp
=
client
.
HTTPResponse
(
sock
,
method
=
"HEAD"
)
resp
.
begin
()
resp
.
begin
()
if
resp
.
read
():
if
resp
.
read
():
...
@@ -337,7 +337,7 @@ class BasicTest(TestCase):
...
@@ -337,7 +337,7 @@ class BasicTest(TestCase):
'HTTP/1.1 200 OK
\r\n
'
'HTTP/1.1 200 OK
\r\n
'
'Content-Length: 14432
\r\n
'
'Content-Length: 14432
\r\n
'
'
\r\n
'
,
'
\r\n
'
,
NoEOF
String
IO
)
NoEOF
Bytes
IO
)
resp
=
client
.
HTTPResponse
(
sock
,
method
=
"HEAD"
)
resp
=
client
.
HTTPResponse
(
sock
,
method
=
"HEAD"
)
resp
.
begin
()
resp
.
begin
()
b
=
bytearray
(
5
)
b
=
bytearray
(
5
)
...
...
Lib/test/test_logging.py
Dosyayı görüntüle @
50254c57
...
@@ -156,12 +156,7 @@ class BaseTest(unittest.TestCase):
...
@@ -156,12 +156,7 @@ class BaseTest(unittest.TestCase):
the expected_values list of tuples."""
the expected_values list of tuples."""
stream
=
stream
or
self
.
stream
stream
=
stream
or
self
.
stream
pat
=
re
.
compile
(
self
.
expected_log_pat
)
pat
=
re
.
compile
(
self
.
expected_log_pat
)
try
:
actual_lines
=
stream
.
getvalue
()
.
splitlines
()
stream
.
reset
()
actual_lines
=
stream
.
readlines
()
except
AttributeError
:
# StringIO.StringIO lacks a reset() method.
actual_lines
=
stream
.
getvalue
()
.
splitlines
()
self
.
assertEqual
(
len
(
actual_lines
),
len
(
expected_values
))
self
.
assertEqual
(
len
(
actual_lines
),
len
(
expected_values
))
for
actual
,
expected
in
zip
(
actual_lines
,
expected_values
):
for
actual
,
expected
in
zip
(
actual_lines
,
expected_values
):
match
=
pat
.
search
(
actual
)
match
=
pat
.
search
(
actual
)
...
...
Misc/NEWS
Dosyayı görüntüle @
50254c57
...
@@ -360,6 +360,8 @@ Tests
...
@@ -360,6 +360,8 @@ Tests
Documentation
Documentation
-------------
-------------
-
Issue
#
18743
:
Fix
references
to
non
-
existant
"StringIO"
module
.
-
Issue
#
18783
:
Removed
existing
mentions
of
Python
long
type
in
docstrings
,
-
Issue
#
18783
:
Removed
existing
mentions
of
Python
long
type
in
docstrings
,
error
messages
and
comments
.
error
messages
and
comments
.
...
...
Tools/gdb/libpython.py
Dosyayı görüntüle @
50254c57
...
@@ -121,7 +121,7 @@ class StringTruncated(RuntimeError):
...
@@ -121,7 +121,7 @@ class StringTruncated(RuntimeError):
pass
pass
class
TruncatedStringIO
(
object
):
class
TruncatedStringIO
(
object
):
'''Similar to
c
StringIO, but can truncate the output by raising a
'''Similar to
io.
StringIO, but can truncate the output by raising a
StringTruncated exception'''
StringTruncated exception'''
def
__init__
(
self
,
maxlen
=
None
):
def
__init__
(
self
,
maxlen
=
None
):
self
.
_val
=
''
self
.
_val
=
''
...
...
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