[New-bugs-announce] [issue46024] Different behaviour with zipfile
flvn.dev
report at bugs.python.org
Thu Dec 9 05:19:15 EST 2021
New submission from flvn.dev <flvn.dev at protonmail.com>:
Given the this directory structure:
```
logs
├── 2020
│ ├── 2020101.zip
| ├── ...
├── 2021
│ ├── 2021101.zip
| ├── ...
```
The following piece of code:
```python
from pathlib import Path
from zipfile import Path as ZipPath
for item in Path("logs").iterdir():
if item.is_dir():
path = next(item.iterdir())
print(ZipPath(path).name)
```
gives different results between Python 3.9.7 (empty strings) and 3.10.0 (the zip files name)
----------
messages: 408104
nosy: flvn.dev
priority: normal
severity: normal
status: open
title: Different behaviour with zipfile
type: behavior
versions: Python 3.10, Python 3.9
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue46024>
_______________________________________
More information about the New-bugs-announce
mailing list