apple / foundationdb

FoundationDB - the open source, distributed, transactional key-value store
https://apple.github.io/foundationdb/
Apache License 2.0
14.19k stars 1.29k forks source link

Remove Python 2.7 support and six.py #11418

Open sepeth opened 1 month ago

sepeth commented 1 month ago

Hello,

This is my first contribution to FoundationDB. I thought I could start from something simple ^-^

This change removes Python 2.7 support and six.py (resolves #11328 and #11329). Most of it is straightforward, such as six.text_type -> str, six.integer_types -> int. OTOH, decisions I made:

I first tested with the class scheduling examples in the tutorial and validated that fdb.__path__ was pointing to the fdb that I modified and installed.

Then, I tested via run_tester_loop.sh & bindingtester.py. This took a bit of time and required some fiddling with sources. But eventually, I got it running, and all python tests have passed. A few issues I had to overcome:

Code-Reviewer Section

The general pull request guidelines can be found here.

Please check each of the following things and check all boxes before accepting a PR.

For Release-Branches

If this PR is made against a release-branch, please also check the following:

foundationdb-ci commented 1 month ago

Result of foundationdb-pr-clang-ide on Linux CentOS 7

foundationdb-ci commented 1 month ago

Result of foundationdb-pr-macos-m1 on macOS Ventura 13.x

foundationdb-ci commented 1 month ago

Result of foundationdb-pr-clang on Linux CentOS 7

foundationdb-ci commented 1 month ago

Result of foundationdb-pr-macos on macOS Ventura 13.x

foundationdb-ci commented 1 month ago

Result of foundationdb-pr on Linux CentOS 7

foundationdb-ci commented 1 month ago

Result of foundationdb-pr-cluster-tests on Linux CentOS 7

xis19 commented 1 month ago

Let's check for the binding correctness in the CI after you changed the code. We have plenty of tests to make sure we do not break things, but still, not enough.

foundationdb-ci commented 1 month ago

Result of foundationdb-pr-clang-ide on Linux CentOS 7

foundationdb-ci commented 1 month ago

Result of foundationdb-pr-clang on Linux CentOS 7

foundationdb-ci commented 1 month ago

Result of foundationdb-pr on Linux CentOS 7

sepeth commented 1 month ago

Hi there, please let me know if there's anything wrong. I see some tests are failing but couldn't be sure if they are related - I see they fail in some other PRs as well.

jzhou77 commented 1 month ago

Hi there, please let me know if there's anything wrong. I see some tests are failing but couldn't be sure if they are related - I see they fail in some other PRs as well.

python3 -m joshua.joshua list --stopped failure doesn't seem to be related to the Python changes in this PR (maybe merge with HEAD can resolve some of the failures fixed recently).

I saw some changes for bindingtester, so @xis19 can you make sure bindingtester can still pass joshua test?