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

Do not include unsafe dependencies in the compiled file unless some flag specified #1838

Closed
DrJackilD opened this issue Feb 21, 2024 · 2 comments

Comments

@DrJackilD
Copy link
Contributor

DrJackilD commented Feb 21, 2024

Hey guys, it's me again! 😅 uv includes some packages in the compiled file, which are considered unsafe (for example, PEP 518 specifically asking to not pin setuptools unless you know what you're doing). By default, pip-tools do not pin setuptools, pip and distibute packages (https://github.com/jazzband/pip-tools/blob/9d0a91a382748a68f86d58a9e086b46a9b7c74f7/piptools/utils.py#L11).

You could tweak this behaviour by those options:

--allow-unsafe / --no-allow-unsafe
                                  Pin packages considered unsafe: distribute,
                                  pip, setuptools.

                                  WARNING: Future versions of pip-tools will
                                  enable this behavior by default. Use --no-
                                  allow-unsafe to keep the old behavior. It is
                                  recommended to pass the --allow-unsafe now
                                  to adapt to the upcoming change.
 --unsafe-package TEXT           Specify a package to consider unsafe; may be
                                  used more than once. Replaces default unsafe
                                  packages: distribute, pip, setuptools

Probably would be good to implement something in uv, wdyt?

@hauntsaninja
Copy link
Contributor

hauntsaninja commented Feb 21, 2024

Duplicate of #1353 and #1415

Not sure how PEP 518 is relevant here, that would apply to build environments. If you have a compiled lock file for your build environment I think you'd need --no-build-isolation or similar to get it to actually work.

@DrJackilD
Copy link
Contributor Author

Ah, didn't search before creating an issue, sorry! Closing as duplicate

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