BridgeDB is written in Python 2.7, which will no longer be maintained past 2020. We should port BridgeDB to Python 3. This may involve quite some work given BridgeDB's large code base and the libraries it depends on.
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Child items ...
Show closed items
Linked items 0
Link issues together to show that they're related.
Learn more.
Here's a summary of what I've accomplished so far:
I ran the tool futurize over BridgeDB's code, which can do simple code transformations from Python 2 to Python 3.
The switch to Python 3 resulted in several API incompatibilities in our dependencies. These are annoying to deal with but not a big issue.
The biggest issue is that strings and bytes can no longer be mixed in Python 3. We have hundreds of failed unit tests because of this, and fixing these isn't always as simple as turning a string into a bytes type. Sometimes, it requires thinking if a given function should return a string or a bytes type, and making sure that these choices are consistent throughout the code.
So far, I've spent 12 hours on this ticket and haven't made much progress, but progress shouldn't be linear: once I've addressed issues in BridgeDB's "critical path", significantly more unit tests should pass. I managed to get the unit tests from:
Tests now pass with python 3.5 but has not been exercised in a runtime context. Its tests provide good coverage so should be close.
If tor would ever care to hire a BridgeDB maintainer to replace Isis let me know. The codebase relies excessively on catch-alls to mask underlying instability so there's quite a bit of room for stabilization.
Tests now pass with python 3.5 but has not been exercised in a runtime context. Its tests provide good coverage so should be close.
Thanks a lot, Damian! I am now building on your great patch set, to make it work in a runtime context.
If tor would ever care to hire a BridgeDB maintainer to replace Isis let me know. The codebase relies excessively on catch-alls to mask underlying instability so there's quite a bit of room for stabilization.
Our new anti-censorship team is responsible for BridgeDB and I'm its new maintainer. We will hopefully be able to do some general maintenance as part of our Sponsor 30 grant. Let me know if you have any specific suggestions on what kind of BridgeDB improvements you would like to see.
Of particular importance is commit fcdc813 because it makes several changes to BridgeDB's HTTPS server code. To be honest, I'm having a hard time wrapping my head around the way strings and bytes are now used in BridgeDB and I was wondering if you can think of ways to simplify my patches.
Hi Philipp. I skimmed over your branch (commit range fbc93cd..1c0281d) and it looks good to me. As you mentioned the vast majority is bytes/unicode normalization, and those look fine to me.
Hi Philipp. I skimmed over your branch (commit range fbc93cd..1c0281d) and it looks good to me. As you mentioned the vast majority is bytes/unicode normalization, and those look fine to me.
Regarding next steps: I will run BridgeDB locally, to see if I encounter any more runtime issues. Once this is looking good, I'll test-deploy it on polyanthum, to see what runtime issues remain.
Trac: Owner: N/Ato phw Status: needs_review to assigned
Earlier today, I deployed my fix/30946 branch for BridgeDB and my fix/30946 branch for bridgedb-admin on polyanthum. I found a handful more string-related issues in moat's server code, which are now fixed. I was subsequently able to get bridges over HTTPS, moat, and email. Let's keep the branch running and see if any other issues emerge.
No more issues have surfaced after several days of running this branch, so it's time to wrap things up! I merged this patch set in commit c3a820d and f801cc1, released BridgeDB version 0.9.4, and deployed it on polyanthum.