classification
Title: TarFile.add does not support pathlib.Path as a value to first argument.
Type: Stage:
Components: Library (Lib) Versions: Python 3.9, Python 3.8, Python 3.7, Python 3.6
process
Status: open Resolution:
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 2020-07-31 16:48 by Akuli.

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: https://github.com/python/typeshed/pull/4369
History
Date User Action Args
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