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

Missing requirement for pydantic 2 in setup.py #80

Closed
bcxpro opened this issue Aug 31, 2023 · 3 comments
Closed

Missing requirement for pydantic 2 in setup.py #80

bcxpro opened this issue Aug 31, 2023 · 3 comments

Comments

@bcxpro
Copy link

bcxpro commented Aug 31, 2023

Hey there,

I wanted to give you a heads up about an issue I've come across with the recent release of Blockkit 1.6.0.

It seems like Blockkit 1.6.0 doesn't have a version constraint for its dependency on pydantic. Even though it seems to need pydantic 2, the version on PyPI doesn't specify this requirement. So, when I tried to use Blockkit 1.6.0 along with pydantic 1 in my project, pip upgraded to 1.6.0 but kept pydantic 1. Unfortunately, Blockkit 1.6.0 doesn't work properly with pydantic 1.

I noticed that the setup.py file doesn't mention any requirement for pydantic 2. As a result, package managers think it's okay to install Blockkit 1.6.0 alongside pydantic 1, which leads to the compatibility problem I ran into.

Could you consider adding a constraint to the package that requires pydantic 2?

Thanks so much for looking into this.

Cheers,

@imryche
Copy link
Owner

imryche commented Aug 31, 2023

Hey! Thanks for bringing this to my attention.

I've added a version constraint for pydantic, requiring version 2 or higher. Feel free to upgrade to 1.6.1, and you should no longer encounter this compatibility issue.

@imryche imryche closed this as completed Aug 31, 2023
@bcxpro
Copy link
Author

bcxpro commented Sep 1, 2023

Thanks,

My workaround for the issue was this (in poetry):

blockkit = "^1.5.1,!=1.6.0"
pydantic = "^1.9.0"

That is, banning 1.6.0. Now that you published 1.6.1 with the right constraints the dependency resolver installs 1.5.2 instead of 1.6.1 and everything works.

However, if I unban 1.6.0

blockkit = "^1.5.1"
pydantic = "^1.9.0"

Then the dependency resolver installs 1.6.0 because it is the latest version "compatible" with pydantic 1.

So my guess is that you have to "yank" version 1.6.0 in pypi.

Cheers,

@imryche imryche reopened this Sep 2, 2023
@imryche
Copy link
Owner

imryche commented Sep 2, 2023

Hi, I've decided to simply remove version 1.6.0 from PyPI. This should resolve the issue.

@imryche imryche closed this as completed Sep 2, 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

No branches or pull requests

2 participants