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

Dependency freezing #128

Open
jerryleooo opened this issue Jun 4, 2024 · 3 comments
Open

Dependency freezing #128

jerryleooo opened this issue Jun 4, 2024 · 3 comments

Comments

@jerryleooo
Copy link

jerryleooo commented Jun 4, 2024

I encountered such error today:

Traceback (most recent call last):
  File "/Users/jerry/.pyenv/versions/3.9.5/bin/git-deps", line 8, in <module>
    sys.exit(run())
  File "/Users/jerry/.pyenv/versions/3.9.5/lib/python3.9/site-packages/git_deps/cli.py", line 146, in run
    main(sys.argv[1:])
  File "/Users/jerry/.pyenv/versions/3.9.5/lib/python3.9/site-packages/git_deps/cli.py", line 140, in main
    cli(options, args)
  File "/Users/jerry/.pyenv/versions/3.9.5/lib/python3.9/site-packages/git_deps/cli.py", line 123, in cli
    detector.find_dependencies(rev)
  File "/Users/jerry/.pyenv/versions/3.9.5/lib/python3.9/site-packages/git_deps/detector.py", line 103, in find_dependencies
    sha1s = [commit.hex[:8] for commit in self.todo]
  File "/Users/jerry/.pyenv/versions/3.9.5/lib/python3.9/site-packages/git_deps/detector.py", line 103, in <listcomp>
    sha1s = [commit.hex[:8] for commit in self.todo]
AttributeError: '_pygit2.Commit' object has no attribute 'hex'

And after some debug I think it's related to the new release of pygit2, which removed hex method in its newer versions, ref: https://github.com/libgit2/pygit2/blob/master/CHANGELOG.md I resolved this by installing version 1.10.1

I also encountered this issue: #110 ,which was caused my Werkzeug version is too new and I had to install version 2.0.3 to resolve it

I checked the requirements.txt and found it only has a lower version limit, while I think an upper version limit might be necessary.

@aspiers
Copy link
Owner

aspiers commented Jun 4, 2024

Good catch, and thanks a lot for reporting! That said, it seems this should be resolved easily by changing foo.hex to str(foo) and I'd prefer to move forwards rather than spend time keeping things working with old versions. Do you think you might be able to submit a PR for that? Also see #118 which I never finished but shows that this package needs modernizing in more than one way.

@jerryleooo
Copy link
Author

jerryleooo commented Jun 10, 2024

Hi @aspiers , I am sorry but I still prefer freezing the dep versions for better maintainability, so I am not able to submit a PR for such change..

@aspiers
Copy link
Owner

aspiers commented Jun 10, 2024

I'm fine with freezing versions, but freezing on a pygit2 version which is already broken by newer releases would mean that no other upgrade is possible until the hex issue is resolved. I'll try to find time to fix it, but it probably won't be in the next month as I have a lot of other commitments currently.

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