[issue25997] Tarfile.add with bytes path is failing

2016-01-03 Thread Patrik Dufresne
Patrik Dufresne added the comment: It's a bit tricky, but with help of surrogateescape I get the expected result. I'm closing this bug. Thanks -- status: open -> closed ___ Python tracker

[issue25997] Tarfile.add with bytes path is failing

2016-01-02 Thread Martin Panter
Martin Panter added the comment: It looks like surrogate-escaped bytes should be supported thanks to Issue 8390, although this is not so useful if you use the “pax” format (which always uses UTF-8 internally). To generate a surrogate-escaped string, you can “decode” it with the following erro

[issue25997] Tarfile.add with bytes path is failing

2016-01-02 Thread Patrik Dufresne
Patrik Dufresne added the comment: > Is the tarfile module designed to support bytes for file names in general? > The documentation doesn’t seem to mention bytes anywhere relevant. This seems > more like a new feature rather than a bug to me. I'm using bytes in Unix to represent a path. From `

[issue25997] Tarfile.add with bytes path is failing

2016-01-02 Thread Martin Panter
Martin Panter added the comment: Is the tarfile module designed to support bytes for file names in general? The documentation doesn’t seem to mention bytes anywhere relevant. This seems more like a new feature rather than a bug to me. -- nosy: +martin.panter title: Tarfile.add with byt