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

pip-compile requirements.in produces a different output than the pre-commit hook. #2034

Closed
PawelPawlikMIM opened this issue Dec 13, 2023 · 11 comments
Labels
bug Something is not working duplicate Duplicate of an existing issue/PR

Comments

@PawelPawlikMIM
Copy link

In version 7.3.0 pip-compile requirements.in produces a different output than the pre-commit hook.
The is no issue after downgrading to 7.2.0.

Environment Versions

  1. OS Type: Ubuntu 20.04.3 LTS
  2. Python version: Python 3.9.5
  3. pip version: pip 23.3
  4. pip-tools version: 7.3.0

Steps to replicate

  1. requirements.in content:
selenium==4.14.0
  1. .pre-commit-config.yaml content:
repos:
  - repo: https://github.com/jazzband/pip-tools
    rev: 7.3.0
    hooks:
      - id: pip-compile
        files: ^requirements\.(in|txt)$
        args: [requirements.in]
  1. commit requirements.in file
  2. run pip-compile requirements.in

Expected result

requirements.txt should remain unchanged when running the 4th step.

Actual result

requirements.txt differs. diff output:

 urllib3[socks]==1.26.16
-    # via selenium
+    # via
+    #   selenium
+    #   urllib3
 wsproto==1.2.0
@AndydeCleyre
Copy link
Contributor

Thanks!

This may be a dup of #2003 and fixed by #2011, which is merged but not yet in a release.

@MartinRoth
Copy link

Hi, thanks for the great work! I am also awaiting the release with #2011 included.

@chrysle chrysle added bug Something is not working duplicate Duplicate of an existing issue/PR labels Jan 18, 2024
@jonesbusy
Copy link

Same issue here

@MartinRoth
Copy link

For me it works again with the newest pip...

@jonesbusy
Copy link

If I rollback to pip 23.2.1 everything is back to normal

At the end I'm not sure what should be fixed where (pip ? pip-tool ?)

I tried to play with --strip-extras, but I always end-up with compatibility issue between precommit, pip-compile and renovate tooling

@MartinRoth
Copy link

If I rollback to pip 23.2.1 everything is back to normal

At the end I'm not sure what should be fixed where (pip ? pip-tool ?)

I tried to play with --strip-extras, but I always end-up with compatibility issue between precommit, pip-compile and renovate tooling

I am using pip==23.3.2 and pip-tools==7.3.0 and it works as well. However, I feel your confusion.

@MartinRoth
Copy link

Since the upgrade to pip==24.0.0 I have this issue again 😒

@AndydeCleyre
Copy link
Contributor

@MartinRoth Do you have the issue with pip-tools >= 7.4.0?

@MartinRoth
Copy link

Hi @AndydeCleyre, currently I am using pip-tools==7.4.0 and pip==24.0 and it seems to work again.

@webknjaz
Copy link
Member

Thanks! Considering this resolved, then.

@jonesbusy
Copy link

I confirm also with latest using pip-tools 7.4.0, pip 24.0 and latest renovate 37.218.0 I don't see anymore any compatiblity issue. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is not working duplicate Duplicate of an existing issue/PR
Projects
None yet
Development

No branches or pull requests

6 participants