Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 34k
Closed
Labels
3.10only security fixesonly security fixes3.11only security fixesonly security fixes3.12only security fixesonly security fixestopic-pathlibtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Bug report
This code works on Python 3.10 and Python 3.11.0a5 but raises a TypeError in Python 3.11.0b4:
frompathlibimportPathfromshutilimportmake_archivepath=Path.cwd().resolve() make_archive(path, 'zip', path.parent, path.name)Here's the output I see in Python 3.11.0b4:
>>> from pathlib import Path >>> from shutil import make_archive >>> path = Path.cwd().resolve() >>> make_archive(path, 'zip', path.parent, path.name) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/trey/.pyenv/versions/3.11.0b4/lib/python3.11/shutil.py", line 1130, in make_archive filename = func(base_name, base_dir, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/trey/.pyenv/versions/3.11.0b4/lib/python3.11/shutil.py", line 977, in _make_zipfile zip_filename = base_name + ".zip" ~~~~~~~~~~^~~~~~~~ TypeError: unsupported operand type(s) for +: 'PosixPath' and 'str'Your environment
- CPython versions tested on: Python 3.11.0b4
- Operating system and architecture: 64-bit Ubuntu Linux 20.04
Metadata
Metadata
Assignees
Labels
3.10only security fixesonly security fixes3.11only security fixesonly security fixes3.12only security fixesonly security fixestopic-pathlibtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error