Python 3.11 support
Before raising this MR, consider whether the following are required, and complete if so:
-
Unit tests -
Metrics -
Documentation update(s)
If not required, please explain in brief why not.
Description
This request aims to update Buildgrid so that it can be run using Python 3.11.
As we make use of grpcio-tools
, its support for Python 3.11 is only enabled in version >=1.49.0
, which in turn requires a more up to date version of protobuf
. Then this latest version of protobuf
requires that the _protos
be compiled by a version of protoc
with a version >=3.19.6
.
We also needed wrapt
to be updated to obtain support for Python 3.11, which required an unpinning of pylint
.
Changes proposed in this merge request:
- Unpin 'protobuf' to unpin 'grpcio-tools' to version that supports Python 3.11
- Unpin 'pylint' to obtain version of 'wrapt' that supports Python 3.11
- Recompile _protos with protocol buffer compiler (protoc) version 3.21.6
- Fix
mypy
, linting and unit test errors/warnings raised by unpinning libraries and recompilation of_protos
Validation
As we currently don't test Python 3.11 in our CI, it was tested locally with the following tox environment, having ensured Python 3.11 was installed:
[testenv:rabbitmq-venv]
basepython=python3.11
deps =
grpcio-tools
grpc-stubs
mypy-protobuf
-rrequirements/requirements.rabbitmq.in
-rrequirements/requirements.tests.in
-rrequirements/requirements.in
commands = {posargs}
whitelist_externals = *
Then the unit tests were run using the following command:
tox --recreate -e rabbitmq-venv -- pytest
Issues addressed
n/a