Switch to Poetry & use Github Actions #2049
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I believe this project is pretty much inactive (#1719) and I'm not sure who owns it (best guess @kragniz / @stephenfin).
This PR brings some of the tooling up to date.
I initially wanted to fork and update the proto/grpc versions (#2045), but the support for Python 2.7, 3.5, 3.6, etc. make it hard to do so. On top of this, some of the testing with pifpaf/subprocess seems a bit flakey. Therefore, I simply pinned all the versions to what was currently in
requirements/test.txt
and got as many green tests as I could; Python 3.7-3.9 with latest etcd 3.0.X, 3.1.X, 3.2.X, 3.3.X, 3.4.X, 3.5.X.I likely plan to fork and drop support for Python/etcd/grpc/protobuf versions to accommodate my own app, although I would prefer not to. It's probably inappropriate to have a public library target one specific Python version/etcd version...
This uses Poetry, which is based on PEP 621 – Storing project metadata in pyproject.toml. It also uses Github Actions instead of Travis CI to perform the builds. Tox is dropped simply in favor of utilizing a Makefile and using Github Action matrix testing. If you need to utilize different versions of Python, I'd recommend pyenv or asdf.
With the current setup, testing <3.7 isn't supported by Github Actions & 3.10/3.11 are avoided because the grpc versions don't have wheels.
Override etcd version
Regenerate protobuf
Run etcd in a container
Some of the tests seem to fail intermittently, but I wanted to avoid test alterations for tooling only.