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
9fbec7ad
Kaydet (Commit)
9fbec7ad
authored
Ock 18, 2014
tarafından
Serhiy Storchaka
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #20238: TarFile opened with external fileobj and "w:gz" mode didn't
write complete output on close.
üst
53ad0cd2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
1 deletion
+10
-1
tarfile.py
Lib/tarfile.py
+1
-1
test_tarfile.py
Lib/test/test_tarfile.py
+6
-0
NEWS
Misc/NEWS
+3
-0
No files found.
Lib/tarfile.py
Dosyayı görüntüle @
9fbec7ad
...
...
@@ -1642,7 +1642,7 @@ class TarFile(object):
if
not
extfileobj
and
fileobj
is
not
None
:
fileobj
.
close
()
raise
t
.
_extfileobj
=
extfileobj
t
.
_extfileobj
=
False
return
t
@classmethod
...
...
Lib/test/test_tarfile.py
Dosyayı görüntüle @
9fbec7ad
...
...
@@ -855,6 +855,12 @@ class WriteTestBase(TarTest):
tar
.
addfile
(
tarfile
.
TarInfo
(
"foo"
))
tar
.
close
()
self
.
assertFalse
(
fobj
.
closed
,
"external fileobjs must never closed"
)
# Issue #20238: Incomplete gzip output with mode="w:gz"
data
=
fobj
.
getvalue
()
del
tar
support
.
gc_collect
()
self
.
assertFalse
(
fobj
.
closed
)
self
.
assertEqual
(
data
,
fobj
.
getvalue
())
class
WriteTest
(
WriteTestBase
,
unittest
.
TestCase
):
...
...
Misc/NEWS
Dosyayı görüntüle @
9fbec7ad
...
...
@@ -43,6 +43,9 @@ Core and Builtins
Library
-------
- Issue #20238: TarFile opened with external fileobj and "w:gz" mode didn'
t
write
complete
output
on
close
.
-
Issue
#
20245
:
The
open
functions
in
the
tarfile
module
now
correctly
handle
empty
mode
.
...
...
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