This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Several AttributeError in zipfile seek() methods
Type: behavior Stage: resolved
Components: Library (Lib) Versions: Python 3.8, Python 3.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: Dariush Azimi, Tiger-222, espdev, miss-islington, remi.lapeyre, serhiy.storchaka, vstinner
Priority: normal Keywords: easy, patch

Created on 2018-07-03 18:24 by espdev, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 8527 merged Tiger-222, 2018-07-28 13:34
PR 8556 merged miss-islington, 2018-07-29 18:27
Messages (10)
msg320996 - (view) Author: Evgeny Prilepin (espdev) Date: 2018-07-03 18:24
The misprint in the file lib/zipfile.py in the line 704 leads to AttributeError: '_SharedFile' object has no attribute 'writing'

"self.writing()" should be replaced by "self._writing()". I also think this code shold be covered by tests.
msg320999 - (view) Author: Evgeny Prilepin (espdev) Date: 2018-07-03 19:17
I think the line 1031 also contains the misprint and will raise NameError.

> self._decompressor = zipfile._get_decompressor(self._compress_type)

"zipfile." is not correct code in this place.
msg321038 - (view) Author: Rémi Lapeyre (remi.lapeyre) * Date: 2018-07-04 12:08
Hi Evegeny, I was able to reproduce the issue, if it's all right for you I would like to post a PR to solve the issue and extend the test suite od this module.
msg321042 - (view) Author: Evgeny Prilepin (espdev) Date: 2018-07-04 12:31
Hi Rémi, it would be great if you posted a PR.
msg322540 - (view) Author: Mickaël Schoentgen (Tiger-222) * Date: 2018-07-28 10:52
Little word to say I am working on at EuroPython 2018.
msg322639 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2018-07-29 18:26
New changeset 3f8c6913b82ed9c05e57175bcbfeacde46c598e3 by Serhiy Storchaka (Mickaël Schoentgen) in branch 'master':
bpo-34035: Fix several AttributeError in zipfile seek() methods. (GH-8527)
https://github.com/python/cpython/commit/3f8c6913b82ed9c05e57175bcbfeacde46c598e3
msg322642 - (view) Author: miss-islington (miss-islington) Date: 2018-07-29 19:57
New changeset ad4f64d58c020016bd438de0e863a0d31d0f0dac by Miss Islington (bot) in branch '3.7':
bpo-34035: Fix several AttributeError in zipfile seek() methods. (GH-8527)
https://github.com/python/cpython/commit/ad4f64d58c020016bd438de0e863a0d31d0f0dac
msg322643 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2018-07-29 20:07
Thank you for your report Evgeny and for your PR Mickaël!
msg322785 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2018-07-31 15:24
Note: the seek() method has been added by bpo-22908 (commit 066df4fd454d6ff9be66e80b2a65995b10af174f), and Python 3.6 is not affected.
msg327899 - (view) Author: Dariush Azimi (Dariush Azimi) Date: 2018-10-17 14:10
Had the same issue with python 3.7 and went back to python 3.6. There are no issues with python 3.6.4
History
Date User Action Args
2022-04-11 14:59:02adminsetgithub: 78216
2018-10-17 14:10:33Dariush Azimisetnosy: + Dariush Azimi
messages: + msg327899
2018-07-31 15:24:44vstinnersetnosy: + vstinner
messages: + msg322785
2018-07-29 20:07:37serhiy.storchakasetstatus: open -> closed
versions: - Python 3.6
messages: + msg322643

resolution: fixed
stage: patch review -> resolved
2018-07-29 19:57:23miss-islingtonsetnosy: + miss-islington
messages: + msg322642
2018-07-29 18:27:16miss-islingtonsetpull_requests: + pull_request8072
2018-07-29 18:26:54serhiy.storchakasetmessages: + msg322639
2018-07-28 19:00:45Tiger-222settitle: zipfile: AttributeError in "seek" method of "_SharedFile" class -> Several AttributeError in zipfile seek() methods
2018-07-28 13:34:23Tiger-222setkeywords: + patch
stage: needs patch -> patch review
pull_requests: + pull_request8045
2018-07-28 10:52:37Tiger-222setnosy: + Tiger-222
messages: + msg322540
2018-07-04 12:31:54espdevsetmessages: + msg321042
2018-07-04 12:08:37remi.lapeyresetnosy: + remi.lapeyre
messages: + msg321038
2018-07-03 19:17:49espdevsetmessages: + msg320999
2018-07-03 18:36:20serhiy.storchakasetversions: + Python 3.6, Python 3.8
nosy: + serhiy.storchaka

keywords: + easy
type: crash -> behavior
stage: needs patch
2018-07-03 18:24:34espdevcreate