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

Implement ZipExtFile in the zipfile type stubs #3074

Merged
merged 6 commits into from Aug 10, 2019

Conversation

CraftSpider
Copy link
Contributor

@CraftSpider CraftSpider commented Jun 20, 2019

Adds the ZipExtFile as a stub in zipfile.pyi. Closes #1224

Known issues:

  • read1 errors due to incompatible superclass type, however this is how the implementation is written
  • python2 errors with name defined differently in superclass, however this is the type actually provided by the implementation

Assistance for the proper resolution of these two issues is welcome.

@JelleZijlstra
Copy link
Member

For read1, you'll just have to # type: ignore; that's what we do in a few other places where the real world gives us incompatible overrides.

For name, it looks like it can be both str and unicode in Python 2, but defaults to str. It may be easier to just use name: str.

@CraftSpider
Copy link
Contributor Author

Alright, thank you. I'll update the PR with those changes

@CraftSpider
Copy link
Contributor Author

Any updates on this? I understand if people are busy, but also I want to make sure this doesn't fall completely by the wayside

stdlib/2and3/zipfile.pyi Outdated Show resolved Hide resolved
stdlib/2and3/zipfile.pyi Outdated Show resolved Hide resolved
stdlib/2and3/zipfile.pyi Outdated Show resolved Hide resolved
@JelleZijlstra
Copy link
Member

Looks like I started a review but never submitted it, sorry for that!

@CraftSpider
Copy link
Contributor Author

Thanks for the patience, had stuff that took priority over the weekend. Fixed the noted issues

@CraftSpider
Copy link
Contributor Author

Any updates on the review for this? I'm not sure if there's anything left for me to do

@JelleZijlstra JelleZijlstra merged commit 15b7cda into python:master Aug 10, 2019
@JelleZijlstra
Copy link
Member

Sorry for the delay!

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

Successfully merging this pull request may close these issues.

Missing name ZipExtFile in the stub for the zipfile module
2 participants