GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||
GeezerVison is showing github.com — bpo-4833: Add ZipFile.mkdir by dignissimus · Pull Request #32160 · python/cpython Conversation
|
| else: | ||
| zinfo._compresslevel = self.compresslevel | ||
|
|
||
| if zinfo.is_dir(): |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Does this mean that write can no longer be used to create a directory? I suspect that will break existing code.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
This was marked as resolved, but I do not see an answer to my question.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I think write still accepts directory zinfo, now it’s handled on line 1775 by calling mkdir instead of directly inline here.
There should be a test for write + directory; if not, then this PR needs to add one!
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Ah, right -- 1175 does handle that. Thanks!
A fairly quick scan of the tests doesn't reveal one using .write(some_directory/). @dignissimus please confirm such a test already exists, or add one.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Very thorough PR. Question in-line.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
interesting, since it is also possible to imply directories (if there is a file in there) but this would allow an empty directory |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
@dignissimus : ping me in a few days if no one has merged this yet -- I want to give other folks the chance to review. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@dignissimus Actually, I forgot: have you either verified or added a test for creating a directory using the existing |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
@ethanfurman The tests have been added! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.