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
9f1c1dcd
Kaydet (Commit)
9f1c1dcd
authored
Kas 20, 2010
tarafından
Georg Brandl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
#10465: fix broken delegation in __getattr__ of _PaddedFile.
üst
4ccc137a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
1 deletion
+9
-1
gzip.py
Lib/gzip.py
+1
-1
test_gzip.py
Lib/test/test_gzip.py
+6
-0
NEWS
Misc/NEWS
+2
-0
No files found.
Lib/gzip.py
Dosyayı görüntüle @
9f1c1dcd
...
@@ -98,7 +98,7 @@ class _PaddedFile:
...
@@ -98,7 +98,7 @@ class _PaddedFile:
return
self
.
file
.
seek
(
offset
,
whence
)
return
self
.
file
.
seek
(
offset
,
whence
)
def
__getattr__
(
self
,
name
):
def
__getattr__
(
self
,
name
):
return
getattr
(
name
,
self
.
fil
e
)
return
getattr
(
self
.
file
,
nam
e
)
class
GzipFile
(
io
.
BufferedIOBase
):
class
GzipFile
(
io
.
BufferedIOBase
):
...
...
Lib/test/test_gzip.py
Dosyayı görüntüle @
9f1c1dcd
...
@@ -197,6 +197,12 @@ class TestGzip(unittest.TestCase):
...
@@ -197,6 +197,12 @@ class TestGzip(unittest.TestCase):
self
.
assertTrue
(
hasattr
(
f
,
"name"
))
self
.
assertTrue
(
hasattr
(
f
,
"name"
))
self
.
assertEqual
(
f
.
name
,
self
.
filename
)
self
.
assertEqual
(
f
.
name
,
self
.
filename
)
def
test_paddedfile_getattr
(
self
):
self
.
test_write
()
with
gzip
.
GzipFile
(
self
.
filename
,
'rb'
)
as
f
:
self
.
assertTrue
(
hasattr
(
f
.
fileobj
,
"name"
))
self
.
assertEqual
(
f
.
fileobj
.
name
,
self
.
filename
)
def
test_mtime
(
self
):
def
test_mtime
(
self
):
mtime
=
123456789
mtime
=
123456789
with
gzip
.
GzipFile
(
self
.
filename
,
'w'
,
mtime
=
mtime
)
as
fWrite
:
with
gzip
.
GzipFile
(
self
.
filename
,
'w'
,
mtime
=
mtime
)
as
fWrite
:
...
...
Misc/NEWS
Dosyayı görüntüle @
9f1c1dcd
...
@@ -117,6 +117,8 @@ Core and Builtins
...
@@ -117,6 +117,8 @@ Core and Builtins
Library
Library
-------
-------
- Issue #10465: fix broken delegating of attributes by gzip._PaddedFile.
- Issue #10356: hash(Decimal("sNaN")) now raises ValueError instead of
- Issue #10356: hash(Decimal("sNaN")) now raises ValueError instead of
TypeError.
TypeError.
...
...
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