-
Notifications
You must be signed in to change notification settings - Fork 10
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
Add comment why not to use ~=
clause in deps definition
#154
Conversation
8dd93bd
to
e64573c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We were using the compatible clause earlier, but we had to switch to the ordered clause because the compatible clause was too strict, and people couldn't install the SDK with some other libraries because their requirement specifiers were incompatible (even though the actual libraries were compatible). I think specifically it was about people not being able to use some newer version of httpx
or pyee
, I'm not sure now.
Anyway, I know we're risking that some of our dependencies will release some major breaking change and the SDK will break because of that, but I would say the risk is relatively small, and the annoyance to users would be bigger if we used the compatible clause. Good writeup about the tradeoffs is here.
I wish Python allowed you to install transitive dependencies in separate versions, same as Node does with node_modules
, that would solve this issue.
~=
clause in deps definition
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool 👍 I would probably use the ordered clause in the client as well (and for the scrapy extra here too).
Currently, we use the inclusive ordered comparison clause in our dependency requirements (except the apify packages).
I suggest playing safely by using a more strict compatible release clause as we use it for the dev dependencies or dependencies in the Apify Client.
I install the dependencies using
make install-dev
, then usepip freeze
and copy the package versions it installed - the current versions we use.