Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change dependency for macaroonbakery to support protobuf >= 4.21.1 #956

Closed

Conversation

cderici
Copy link
Contributor

@cderici cderici commented Oct 5, 2023

Description

Here's what this is trying to fix:

  • macaroonbakery library hasn't been getting much love since 2020, and currently depends on protobuf>=3.4.0,<4.0
  • mysql-connector-python library latest version depends on protobuf>=4.21.1.
  • pylibjuju depends on macaroonbakery.

Therefore anyone wants to use pylibjuju along with mysql-connector-python in their project can't satisfy protobuf version constraints.

So I made a fork of macaroon bakery that relaxes the protobuf version, and pylibjuju points to that. I also created a pull request to the upstream repo. go-macaroon-bakery/py-macaroon-bakery#90 . If that lands, then this dependency can go back to using pypi. But until then, pylibjuju needs to point to that fork in order to be compatible with mysql-connector-python.

Fixes #914

QA Steps

Dependency can be tested by the QA from #914, such as:

Steps to reproduce:

  1. Install poetry (e.g. pipx install poetry)
  2. poetry new foo
  3. cd foo
  4. poetry add mysql-connector-python^8.1.0
  5. poetry add juju>=2

Pylibjuju should work as normal. macaroonbakery is used in client/connection so it's pretty central. If there's a problem, we'd definitely see it in the tests.

Notes & Discussion

JUJU-4620

@@ -22,7 +22,8 @@
exclude=["*.tests", "*.tests.*", "tests.*", "tests"]),
package_data={'juju': ['py.typed']},
install_requires=[
'macaroonbakery>=1.1,<2.0',
# see https://github.com/juju/python-libjuju/issues/914 for macaroon dependency
'macaroonbakery@git+https://github.com/cderici/py-macaroon-bakery@relax-protobuf-version#egg=macaroonbakery',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to fork that into the juju namespace.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@SimonRichardson I'd steer away from that because in my mind this is mostly a temporary solution, mostly because 1) I don't want us to maintain that, 2) macaroonbakery library hasn't been touched since 2020, so we gotta find another more up-to-date library for that, wdyt?

Copy link

This PR is marked as incomplete because it has been open 30 days with no activity. Please remove incomplete label or comment or this will be closed in 5 days.

@github-actions github-actions bot added the state/incomplete need more information label Nov 18, 2023
@cderici cderici added work-in-progress and removed state/incomplete need more information labels Nov 20, 2023
@cderici
Copy link
Contributor Author

cderici commented Dec 7, 2023

No need for this anymore since upstream changed the protobuf requirements go-macaroon-bakery/py-macaroon-bakery#90

@cderici cderici closed this Dec 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incompatible with mysql-connector-python 8.1.0
3 participants