We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
GitHub fields:
assignee = None closed_at = None created_at = <Date 2021-12-09.10:19:15.526> labels = ['type-bug', '3.9', '3.10'] title = 'Different behaviour with zipfile' updated_at = <Date 2021-12-20.19:56:17.771> user = 'https://bugs.python.org/flvndev'
bugs.python.org fields:
activity = <Date 2021-12-20.19:56:17.771> actor = 'eric.smith' assignee = 'none' closed = False closed_date = None closer = None components = [] creation = <Date 2021-12-09.10:19:15.526> creator = 'flvn.dev' dependencies = [] files = [] hgrepos = [] issue_num = 46024 keywords = [] message_count = 5.0 messages = ['408104', '408138', '408338', '408956', '408971'] nosy_count = 3.0 nosy_names = ['jaraco', 'eric.smith', 'flvn.dev'] pr_nums = [] priority = 'normal' resolution = None stage = None status = 'open' superseder = None type = 'behavior' url = 'https://bugs.python.org/issue46024' versions = ['Python 3.9', 'Python 3.10']
The text was updated successfully, but these errors were encountered:
Given the this directory structure:
logs ├── 2020 │ ├── 2020101.zip | ├── ... ├── 2021 │ ├── 2021101.zip | ├── ...
The following piece of code:
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)
Sorry, something went wrong.
What does "path" (the input to ZipPath) look like?
Please change your print statement to: print(repr(path), ZipPath(path).name)
Then send us the output from each version of python.
Actually, printing out: print(repr(path), repr(ZipPath(path))) would be more useful.
If I don't hear back in a few days, I'm going to close this issue.
The output of:
print(repr(path), repr(ZipPath(path)))
gives this in both versions:
PosixPath('logs/2020/2020101.zip') Path('logs/2020/2020101.zip', '') PosixPath('logs/2021/2021101.zip') Path('logs/2021/2021101.zip', '')
It looks like this was changed in https://bugs.python.org/issue42043
@jaraco might have some insights.
No branches or pull requests
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: