This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: TarFile.add does not support pathlib.Path as a value to first argument.
Type: Stage: resolved
Components: Library (Lib) Versions: Python 3.9, Python 3.8, Python 3.7, Python 3.6
Status: closed Resolution: works for me
Dependencies: Superseder:
Assigned To: Nosy List: Akuli, ethan.furman, lars.gustaebel, rahul-kumi, socketpair
Priority: normal Keywords:

Created on 2020-05-18 08:01 by socketpair, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Messages (1)
msg374645 - (view) Author: Akuli (Akuli) Date: 2020-07-31 16:48
TarFile.add seems to support pathlib.Path objects (and other PathLike string paths) starting at Python 3.6, for both name and arcname. The paths go to `os.path` functions that return strings.

Recently typeshed was updated to support passing pathlib.Paths in TarFile.add:
Date User Action Args
2022-04-11 14:59:31adminsetgithub: 84843
2022-03-20 09:28:10iritkatrielsetstatus: open -> closed
resolution: works for me
stage: resolved
2020-07-31 16:48:15Akulisetnosy: + Akuli
messages: + msg374645
2020-05-18 16:39:58rahul-kumisetnosy: + rahul-kumi
2020-05-18 16:25:14xtreaksetnosy: + lars.gustaebel, ethan.furman
2020-05-18 08:01:55socketpaircreate