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

bug/Hard upper bound on Python version considered harmful #3823

Open
dhdaines opened this issue Dec 12, 2024 · 1 comment
Open

bug/Hard upper bound on Python version considered harmful #3823

dhdaines opened this issue Dec 12, 2024 · 1 comment
Labels
bug Something isn't working build

Comments

@dhdaines
Copy link

Unstructured's setup.py contains this line:

python_requires=">=3.9.0,<3.13",

which causes no end of problems when people want to use Unstructured as a library, and also want to use other libraries at the same time. It also wastes a lot of bandwidth. This is particularly problematic when using Poetry.

For why you should not do this: https://iscinumpy.dev/post/bound-version-constraints/#pinning-the-python-version-is-special

And, if you use Poetry, as soon as someone caps the Python version, every Poetry project that uses it must also cap, even if you believe it is a detestable practice and confusing to users. It is also wrong unless you fully pin the dependency that forced the cap - if the dependency drops it in a patch release or something else you support, you no longer would need the cap. Even worse, if someone adds a cap or tightens a cap, unless they yank every single older release, a locking solver like Poetry or PDM will backsolve to the last versions without the cap so that the lock file it creates will be “valid” on all the Python versions you are requesting!

@dhdaines dhdaines added the bug Something isn't working label Dec 12, 2024
@dhdaines
Copy link
Author

In general the very hard version requirements in setup.py are quite bad and make it so that you basically can't use Unstructured in conjunction with other packages that might have slightly different requirements. For an application this kind of version pinning is a Good Thing. For a library it is a Bad Thing. Is Unstructured an application or a library?

It also leads to downloading gigabytes and gigabytes of CUDA junk because you have pinned the exact torch version and every torch version also pins its own specific versions of CUDA...

@dhdaines dhdaines changed the title Hard upper bound on Python version considered harmful bug/Hard upper bound on Python version considered harmful Dec 12, 2024
@scanny scanny added the build label Dec 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working build
Projects
None yet
Development

No branches or pull requests

2 participants