Port the rest of allmydata.immutable to Python 3 #922
No reviewers
Labels
No Label
Benchmarking and Performance
HTTP Storage Protocol
Nevow Removal
Python 3 Porting
not-for-merge
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: tahoe-lafs/tahoe-lafs#922
Loading…
Reference in New Issue
No description provided.
Delete Branch "3551.more-immutable-python-3"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixes https://tahoe-lafs.org/trac/tahoe-lafs/ticket/3551
Codecov Report
100% <ø> (ø)
89% <100%> (+<1%)
100% <100%> (ø)
95% <0%> (-<1%)
95% <0%> (+2%)
Continue to review full report at Codecov.
Thanks. Looks good to me. One semi-inline comment to think about. Merge when you're satisfied.
@ -1,0 +9,4 @@
from future.utils import PY2
if PY2:
from future.builtins import filter, map, zip, ascii, chr, hex, input, next, oct, open, pow, round, super, bytes, dict, list, object, range, str, max, min # noqa: F401
There's a
__str__
below that calls ato_string()
method and interpolates the result. I think theto_string
is fromallmydata/uri.py
and the module docstring there says it returns bytes.Maybe that's all fine? It just means there'll be some extra b'...' stuff in the result. And I don't even know what these objects are or why you'd see them, so I guess that's fine.
There's a similar thing for a prefix computed for log.PrefixingLogMixin but I guess the same reasoning applies.
@ -1,0 +9,4 @@
from future.utils import PY2
if PY2:
from future.builtins import filter, map, zip, ascii, chr, hex, input, next, oct, open, pow, round, super, bytes, dict, list, object, range, str, max, min # noqa: F401
I didn't notice this one, but made the explicit decision in a later PR that yeah, if it's just debug logs or whatever, switching to bytes or
repr()
instead of custom-massaged string formatting of byte sequences etc. is fine. A human can interpret what's going on reasonably.