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

Relax protobuf version #90

Merged

Conversation

cderici
Copy link

@cderici cderici commented Oct 5, 2023

We recently bumped into a clash in our project juju/python-libjuju#914 between macaroonbakery and mysql-connector-python regarding the protobuf version. (see #76 (comment))

The main point of this PR is to drop the protobuf version ceiling which includes the dependency range that the mysql-connector-python is compatible with.

For this rev I needed to update a bunch of other stuff, including but not limited to moving things to python3.

I'm not entirely sure if the changes proposed in this PR is sufficient, appropriate or suitable for the goals of py-macaroon-bakery (I was able to confirm only a subset of the tests here passing). However, it does seem to work with python-libjuju (need to run more tests on that).

Last release of this project was in 2020, so I'm not sure if this project is still being maintained. So I'll be pointing our dependency to my local fork for the time being, unless you guys want to move this forward.

cderici added a commit to cderici/python-libjuju that referenced this pull request Oct 5, 2023
requirements.txt Outdated
@@ -5,5 +5,5 @@ requests>=2.18.4,<3.0
PyNaCl>=1.1.2,<2.0
pymacaroons>=0.12.0,<1.0
six>=1.11.0,<2.0
protobuf>=3.4.0,<4.0
protobuf>=4.21.1,<=4.21.12
Copy link
Contributor

Choose a reason for hiding this comment

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

What aboutprotobuf>=3.4.0,<5.0 instead? If another dependency (e.g. python-mysql-connector) needs something more specific but within range, the pip resolver will take care of that.

We intend to use python-libmaas with Openstack Watcher but we're having issues with the upper constraints as it tries to use 4.24.3:

https://github.com/openstack/requirements/blob/e54dc19f590bd0ea74fd2d7ada3d0d1b3321260b/upper-constraints.txt#L377
https://review.opendev.org/c/openstack/watcher/+/898790

The conflict is caused by:
    macaroonbakery 1.3.1 depends on protobuf<4.0 and >=3.0.0
    The user requested (constraint) protobuf===4.24.3

Copy link
Author

Choose a reason for hiding this comment

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

I see your conflict, yeah I think it's a good suggestion, it might work for everyone 👍

Copy link
Author

Choose a reason for hiding this comment

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

Yeah I'm not sure why I gave this an upper bound anyways, you're right pip should take care of the specific boundaries, thanks for the suggestion @petrutlucian94!

@fabricematrat fabricematrat merged commit f8f25c1 into go-macaroon-bakery:master Dec 6, 2023
@petrutlucian94
Copy link
Contributor

@fabricematrat thanks a lot for merging this patch! Could you please push a new release to pypi?

@petrutlucian94
Copy link
Contributor

petrutlucian94 commented Dec 7, 2023

@fabricematrat @cderici FYI, the PyPI package still uses the old requirement:

The conflict is caused by:
    macaroonbakery 1.3.2 depends on protobuf<4.0 and >=3.0.0

I think it's because the setup.py requirement needs to be updated as well:

'protobuf>=3.0.0,<4.0',

Here's another PR: #92

@cderici
Copy link
Author

cderici commented Dec 7, 2023

@petrutlucian94 Thanks so much for catching this, I was wondering what was going on, this explains it. Also thanks for opening the new PR, it's unfortunate that we'll need another patch release on pypi for that to get in.

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.

3 participants