Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python 3.5 support #9

Closed
aigarius opened this issue Sep 14, 2015 · 2 comments
Closed

Python 3.5 support #9

aigarius opened this issue Sep 14, 2015 · 2 comments

Comments

@aigarius
Copy link

Hi, a new bug came in to Ubuntu recently - https://bugs.launchpad.net/ubuntu/+source/python-zipstream/+bug/1480548

It seems to me that Python 3.5 slightly changed the expected symantics on file-liek objects. It looks to me that simply removing the seek() function from the zipstream.PointerIO calss could do the trick. I have not investigated if there are any other problems yet as I don't have Python 3.5 yet.

@allanlei
Copy link
Owner

Yes, it seems with 3.5 ZipFile does a check to see if the fp provided is seekable by calling fp.seek() and catches AttributeError and OSError. Since there is a non-implemented PointerIO.seek(), then the AttributeError never raises and instead raises argument error about whence.

@allanlei
Copy link
Owner

There were 2 solutions I could see

  • Implement seek(offset, [whence])
  • Remove seek()

Chose to go with removal since PointerIO doesn't hold data so seek() doesn't seem to fit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants