From f2b67ea6dff5c25a3448bc280b38fbcd306207d2 Mon Sep 17 00:00:00 2001 From: Felipe Reyes Date: Thu, 14 Dec 2023 11:02:25 -0300 Subject: [PATCH] Pin dependencies for py36 compatibility macaroonbakery in version 1.3.4 started depending on protobuf>3.20 which it's not compatible with python 3.6, so this change pins macaroonbakery to 1.3.2 which was the last release compatible with older versions of protobuf. For more details see: - https://github.com/go-macaroon-bakery/py-macaroon-bakery/pull/92 - https://github.com/protocolbuffers/protobuf/issues/10076 It's worth to mention that there is no protobuf-4.0, it goes from 3.20 to 4.21 - https://pypi.org/project/protobuf/#history (cherry picked from commit a8e4de518f32503e788547e78ff2f609c0275dc3) (cherry picked from commit 300c5bbefb1228e20d53226951662074bbb729d4) --- requirements.txt | 15 +++++++++++++++ setup.py | 14 ++++++++++++++ 2 files changed, 29 insertions(+) diff --git a/requirements.txt b/requirements.txt index cfa9f59c1..bdf4f0308 100644 --- a/requirements.txt +++ b/requirements.txt @@ -41,3 +41,18 @@ python-libmaas # Documentation requirements sphinx sphinxcontrib-asyncio +# The following pinning is to keep zaza compatible with python 3.6 +# +# protobuf dropped support for python-3.6 in v3.20.0[0], although it wasn't +# until 4.21.0 that it became truly incompatible. The pinning used is `<4.21.0` +# +# [0] https://github.com/protocolbuffers/protobuf/commit/301d315dc4674d1bc799446644e88eff0af1ac86 +# [1] https://github.com/protocolbuffers/protobuf/issues/10076 +protobuf<4.21.0 + +# macaroonbakery in v1.3.4 added a constraint of protobuf>=3.20.0[0] which makes it incompatible with python 3.6 +# while v1.3.3 was released in a broken state[1] +# +# [0] https://github.com/go-macaroon-bakery/py-macaroon-bakery/commit/7f1fe6a2adb2f80db12bccfb81f629d66d106e03 +# [1] https://github.com/go-macaroon-bakery/py-macaroon-bakery/pull/92 +macaroonbakery < 1.3.3 diff --git a/setup.py b/setup.py index a1383c19a..6f1f0ded4 100644 --- a/setup.py +++ b/setup.py @@ -40,6 +40,20 @@ 'PyYAML', 'tenacity', 'python-libmaas', + # protobuf dropped support for python-3.6 in v3.20.0[0], although it wasn't + # until 4.21.0 that it became truly incompatible. The pinning used is + # `<4.21.0` + # + # [0] https://github.com/protocolbuffers/protobuf/commit/301d315dc4674d1bc799446644e88eff0af1ac86 # noqa + # [1] https://github.com/protocolbuffers/protobuf/issues/10076 + 'protobuf < 4.21.0', + # macaroonbakery in v1.3.4 added a constraint of protobuf>=3.20.0[0] which + # makes it incompatible with python 3.6 while v1.3.3 was released in a + # broken state[1] + # + # [0] https://github.com/go-macaroon-bakery/py-macaroon-bakery/commit/7f1fe6a2adb2f80db12bccfb81f629d66d106e03 # noqa + # [1] https://github.com/go-macaroon-bakery/py-macaroon-bakery/pull/92 + 'macaroonbakery < 1.3.3', ] tests_require = [