So I came to check out FDB and I was surprised to see that the documentation (known limitations, tutorials, performance, etc.) seem unchanged from 10+ years ago despite the changes/advances in the FDB itself. In particular, I was interested in the Redwood storage engine, but it seems there is essentially no documentation on it. (e.g. Does it allow long read-only transactions?)
Is there any talk of trying to update the docs? I think it could really help the community.
2 Likes
spimentel
(Stephen Pimentel)
October 31, 2024, 8:29pm
2
To give one small example of how out-of-date the docs are, the Python API docs state that the binding supports Python 2.7 - 3.7, which would be insane if true. Luckily, it doesn’t seem to be true, as the pyproject.toml files states “>=3.8”.
1 Like
jzhou
(Jingyu Zhou)
November 3, 2024, 6:12pm
3
You are right, Python 2.7 has been removed with this PR
apple:main
← sepeth:remove-python-2.7-support
opened 02:40PM - 22 May 24 UTC
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:
* Kept `int2byte` as it is nicer to read than `struct.Struct(">B").pack`, and it was used many times.
* As for the tester name, I decided to keep the name "python", but the executable it points to is still "python3". Every other language on the list was without its version, so it made sense this way.
* Deleted most mentions of Python 2.7 as it has been dead for a long time.
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:
* `bindingtester.py` is prepending a path to `sys.path`, which didn't allow me to run `run_tester_loop.sh` from the source dir.
* `bindingtester` weren't copied/built into the build tree (due to a check in [`bindingtester/CMakeLists.txt`](https://github.com/apple/foundationdb/blob/main/bindings/CMakeLists.txt#L18)). I am not sure about the implications of enabling this, but it would be nice if `bindingtester` is easier to run in case changes made to bindings. I didn't want to make assumptions and changes about this, and wanted to keep this solely for removing Python 2.7 support, but I am happy to look into this in another PR (and happy to hear your suggestions).
# Code-Reviewer Section
The general pull request guidelines can be found [here](https://github.com/apple/foundationdb/wiki/FoundationDB-Commit-Process).
Please check each of the following things and check *all* boxes before accepting a PR.
- [ ] The PR has a description, explaining both the problem and the solution.
- [ ] The description mentions which forms of testing were done and the testing seems reasonable.
- [ ] Every function/class/actor that was touched is reasonably well documented.
## For Release-Branches
If this PR is made against a release-branch, please also check the following:
- [ ] This change/bugfix is a cherry-pick from the next younger branch (younger `release-branch` or `main` if this is the youngest branch)
- [ ] There is a good reason why this PR needs to go into a release branch and this reason is documented (either in the description above or in a linked GitHub issue)
The upcoming release notes will reflect the Python API changes.
For Redwood, maybe @SteavedHams can add the documentation?