-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
port to python 3 #48
Comments
API plan: the normal API surface will accept both bytes and text on both py2+py3. The return values will be version-native strings (so bytes on py2 and text on py3). Since Tahoe is basically the primary customer of Foolscap, I'm gonna define the "normal" API surface as whatever Tahoe uses, which is a subset of
I'm removing some features that aren't yet supported in py3: The long term plan is to have everything return text, so some APIs which Foolscap provides but which tahoe does not use might change to return text/unicode in all places. |
Actually, I'm not going to bother supporting py2. I want the new py3 version to interoperate with the old py2 version (which means paying careful attention to the values you pass into Maintaining interoperability means e.g. method names must continue to be sent as bytestrings, since that's what py2 expects. We could conceivably add a negotiation phase where both sides realize they are running py3 and can switch to sending unicode methodnames, but I doubt it's going to be worth it. |
To clarify, I believe the current Tahoe plan is not to have a "flag day" but to support python2 and python3, deprecate Foolscap and move to an HTTP-based API ... but there will certainly be an overlap there where Tahoe supports both Foolscap and HTTP and a time when python2 and python3 overlap. That said, it could be that our Python2 dependencies list a specific Foolscap version (for example)...? (This might be fragile). |
This is definitely the plan now. If this conflicts with the plan for Foolscap we really need to get together and sort this out. |
@exarkun - How does this change the plan for our Python3 port ? Seeing this thread now. |
I don't know. Since @warner has taken the task of porting Foolscap to Python 3 we really need to discuss with him. |
Hey, sorry to be out of the loop: swamped with work. Short answer: don't wait on me, do whatever is best for Tahoe. In April I thought I was going to have time to work on Foolscap, but that went away. If y'all decide to port foolscap as part of the tahoe+py3 effort, awesome, I'll help with what little time I can contribute (and feel free to agressively delete features to make the process easier). If you don't, cool, I might make an attempt myself later in the year to support the non-tahoe projects that could use it, but I can't predict when or if that might happen. Feel free to mine my branch for patches or ideas, but it isn't in great shape and may or may not be useful as a starting point. |
This (finally! yay!) adds support for python3, specifically py3.5+ . Support for py2.7 is retained, for now, however cross-version compatibility is likely to have problems. refs #48
Ok, that big PR lands the initial support: all tests now pass under py3 (py3.5, 3.6, 3.7, 3.8, and they still pass under py2.7 which should make tahoe testing easier). And tahoe's tests pass when using the new foolscap. Next steps:
|
basic smoke test between py2-old, py2-new, py3-new appears to work flogtool tail between those combinations works, default arguments (like |
Logging: when #67 lands, the compatibility situation will be:
I've not yet tested the web-display. |
web-display works, after landing be5178d |
but otherwise the tools work as expected |
AFAIK, Foolscap works on Python3 (at least enough for Tahoe-LAFS, which is the main consumer). Please re-open if that's not true! |
Python 2's End-Of-Life date is Jan 1, 2020. Tahoe-LAFS currently depends upon Foolscap, as does git-foolscap and flancer and a handful of personal tools. Tahoe's nominal plan is to switch to a new HTTP-based transport layer and remove Foolscap entirely, but that will introduce backwards-compatibility problems (basically each grid will have a flag day where they must update everybody to the new py3-without-foolscap version of Tahoe at the same time).
I'm not making any scheduling promises, but I'm working on porting Foolscap to python3: watch the
py3
branch to follow along. I'm aiming to make it work under both py2 and py3, like I did with magic-wormhole.The text was updated successfully, but these errors were encountered: