[tahoe-lafs-trac-stream] [Tahoe-LAFS] #1437: Replace os.path (etc.) with twisted.python.filepath
Tahoe-LAFS
trac at tahoe-lafs.org
Sat Dec 20 04:17:12 UTC 2014
#1437: Replace os.path (etc.) with twisted.python.filepath
-------------------------------+-----------------------------
Reporter: arch_o_median | Owner: zancas
Type: defect | Status: new
Priority: minor | Milestone: undecided
Component: code | Version: 1.8.2
Resolution: | Keywords: unicode cleanup
Launchpad Bug: |
-------------------------------+-----------------------------
Comment (by daira):
I tried to post this at https://twistedmatrix.com/trac/ticket/5203 but
couldn't get past
the spam filter:
----
It doesn't particularly surprise me that this issue has gone for three
years without
comments, because the Description is quite rambling and doesn't focus on
what Zooko wants
done. (In fact I'm not clear on what Zooko is asking for either.)
What I would like in order to be able to use `FilePath` in Tahoe-LAFS is
either:
* for `FilePath(unicode_path)` to be specified to work, and to return
Unicode strings
from methods/attributes that currently return path components;
* or alternatively, a `UnicodeFilePath` class that works that way.
Currently I think the status is that `FilePath(unicode_path)` mostly works
by coincidence
of the stdlib file APIs accepting Unicode paths, but that doesn't fill me
with confidence.
Note that representing paths as byte strings can't possibly work correctly
in general on
Windows. It is not sufficient to only be able to represent paths that have
characters in
the "ANSI" encoding.
The behaviour around undecodable paths is a secondary issue that we could
work around; I
wouldn't care if we needed wrapper functions to get the behaviour we
wanted there.
--
Ticket URL: <https://tahoe-lafs.org/trac/tahoe-lafs/ticket/1437#comment:8>
Tahoe-LAFS <https://Tahoe-LAFS.org>
secure decentralized storage
More information about the tahoe-lafs-trac-stream
mailing list