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
994c7f76
Kaydet (Commit)
994c7f76
authored
Kas 12, 2014
tarafından
Benjamin Peterson
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Sade Fark
merge 3.4 (#22849)
üst
c216c486
6c14f231
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
1 deletion
+19
-1
test_io.py
Lib/test/test_io.py
+16
-0
NEWS
Misc/NEWS
+2
-0
textio.c
Modules/_io/textio.c
+1
-1
No files found.
Lib/test/test_io.py
Dosyayı görüntüle @
994c7f76
...
...
@@ -2856,6 +2856,22 @@ class TextIOWrapperTest(unittest.TestCase):
self
.
assertEqual
(
t
.
read
(
200
),
bytes_val
.
decode
(
'utf-8'
))
def
test_issue22849
(
self
):
class
F
(
object
):
def
readable
(
self
):
return
True
def
writable
(
self
):
return
True
def
seekable
(
self
):
return
True
for
i
in
range
(
10
):
try
:
self
.
TextIOWrapper
(
F
(),
encoding
=
'utf-8'
)
except
Exception
:
pass
F
.
tell
=
lambda
x
:
0
t
=
self
.
TextIOWrapper
(
F
(),
encoding
=
'utf-8'
)
class
MemviewBytesIO
(
io
.
BytesIO
):
'''A BytesIO object whose read method returns memoryviews
rather than bytes'''
...
...
Misc/NEWS
Dosyayı görüntüle @
994c7f76
...
...
@@ -188,6 +188,8 @@ Library
-
Issue
#
22578
:
Added
attributes
to
the
re
.
error
class
.
-
Issue
#
22849
:
Fix
possible
double
free
in
the
io
.
TextIOWrapper
constructor
.
-
Issue
#
12728
:
Different
Unicode
characters
having
the
same
uppercase
but
different
lowercase
are
now
matched
in
case
-
insensitive
regular
expressions
.
...
...
Modules/_io/textio.c
Dosyayı görüntüle @
994c7f76
...
...
@@ -1061,7 +1061,7 @@ textiowrapper_init(textio *self, PyObject *args, PyObject *kwds)
}
/* Finished sorting out the codec details */
Py_
DECREF
(
codec_info
);
Py_
CLEAR
(
codec_info
);
self
->
buffer
=
buffer
;
Py_INCREF
(
buffer
);
...
...
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