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
3f8c6913
Kaydet (Commit)
3f8c6913
authored
Tem 29, 2018
tarafından
Mickaël Schoentgen
Kaydeden (comit)
Serhiy Storchaka
Tem 29, 2018
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
bpo-34035: Fix several AttributeError in zipfile seek() methods. (GH-8527)
üst
d2e902e4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
4 deletions
+9
-4
test_zipfile.py
Lib/test/test_zipfile.py
+4
-0
zipfile.py
Lib/zipfile.py
+3
-4
ACKS
Misc/ACKS
+1
-0
2018-07-28-15-00-31.bpo-34035.75nW0H.rst
...S.d/next/Library/2018-07-28-15-00-31.bpo-34035.75nW0H.rst
+1
-0
No files found.
Lib/test/test_zipfile.py
Dosyayı görüntüle @
3f8c6913
...
...
@@ -1646,6 +1646,8 @@ class OtherTests(unittest.TestCase):
self
.
assertEqual
(
fp
.
read
(
5
),
txt
[
bloc
:
bloc
+
5
])
fp
.
seek
(
0
,
os
.
SEEK_END
)
self
.
assertEqual
(
fp
.
tell
(),
len
(
txt
))
fp
.
seek
(
0
,
os
.
SEEK_SET
)
self
.
assertEqual
(
fp
.
tell
(),
0
)
# Check seek on memory file
data
=
io
.
BytesIO
()
with
zipfile
.
ZipFile
(
data
,
mode
=
"w"
)
as
zipf
:
...
...
@@ -1661,6 +1663,8 @@ class OtherTests(unittest.TestCase):
self
.
assertEqual
(
fp
.
read
(
5
),
txt
[
bloc
:
bloc
+
5
])
fp
.
seek
(
0
,
os
.
SEEK_END
)
self
.
assertEqual
(
fp
.
tell
(),
len
(
txt
))
fp
.
seek
(
0
,
os
.
SEEK_SET
)
self
.
assertEqual
(
fp
.
tell
(),
0
)
def
tearDown
(
self
):
unlink
(
TESTFN
)
...
...
Lib/zipfile.py
Dosyayı görüntüle @
3f8c6913
...
...
@@ -701,11 +701,11 @@ class _SharedFile:
def
seek
(
self
,
offset
,
whence
=
0
):
with
self
.
_lock
:
if
self
.
writing
():
if
self
.
_
writing
():
raise
ValueError
(
"Can't reposition in the ZIP file while "
"there is an open writing handle on it. "
"Close the writing handle before trying to read."
)
self
.
_file
.
seek
(
self
.
_pos
)
self
.
_file
.
seek
(
offset
,
whence
)
self
.
_pos
=
self
.
_file
.
tell
()
return
self
.
_pos
...
...
@@ -1021,14 +1021,13 @@ class ZipExtFile(io.BufferedIOBase):
read_offset
=
0
elif
read_offset
<
0
:
# Position is before the current position. Reset the ZipExtFile
self
.
_fileobj
.
seek
(
self
.
_orig_compress_start
)
self
.
_running_crc
=
self
.
_orig_start_crc
self
.
_compress_left
=
self
.
_orig_compress_size
self
.
_left
=
self
.
_orig_file_size
self
.
_readbuffer
=
b
''
self
.
_offset
=
0
self
.
_decompressor
=
zipfile
.
_get_decompressor
(
self
.
_compress_type
)
self
.
_decompressor
=
_get_decompressor
(
self
.
_compress_type
)
self
.
_eof
=
False
read_offset
=
new_pos
...
...
Misc/ACKS
Dosyayı görüntüle @
3f8c6913
...
...
@@ -1435,6 +1435,7 @@ Michael Schneider
Peter Schneider-Kamp
Arvin Schnell
Nofar Schnider
Mickaël Schoentgen
Ed Schouten
Scott Schram
Robin Schreiber
...
...
Misc/NEWS.d/next/Library/2018-07-28-15-00-31.bpo-34035.75nW0H.rst
0 → 100644
Dosyayı görüntüle @
3f8c6913
Fix several AttributeError in zipfile seek() methods. Patch by Mickaël Schoentgen.
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