Skip to content

👷 Limit max pygit2 version due to breaking changes#759

Merged
cjolowicz merged 9 commits intocjolowicz:mainfrom
bruno-fs:pygit2-upper-limit
May 30, 2024
Merged

👷 Limit max pygit2 version due to breaking changes#759
cjolowicz merged 9 commits intocjolowicz:mainfrom
bruno-fs:pygit2-upper-limit

Conversation

@bruno-fs
Copy link
Copy Markdown
Contributor

Limit pygit2 max version to <1.15 due to breaking changes pygit2-changelog it introduces.

At least one of the deprecations affects this codebase: Remove deprecated oid.hex, use str(oid) (see #758).

Fix #758

PS: I tried to mimick the emojis you use on commit messages, but I'm not sure if I got it it 😅 .

bruno-fs added 2 commits May 23, 2024 18:27
🔧 [pygit2] Limit pygit2 max version to <1.15 due to breaking changes [pygit2-changelog].

[pygit2-changelog]: https://github.com/libgit2/pygit2/blob/master/CHANGELOG.md#1150-2024-05-18
For some reason (internal change on pipx?), 'constraint' parameter
now requires a full path.
@bruno-fs
Copy link
Copy Markdown
Contributor Author

@cjolowicz, when running pipx locally I was finding the same issue that's happening on CI right now.
Changing to an absolute path solved it locally, so I added a commit including this change.

@bruno-fs
Copy link
Copy Markdown
Contributor Author

Well, at least the error changed. I guess new errors mean progress, right? 😅

From the new error the issue is that I used a more up to date version of poetry, which created an incompatible lock file.
Is it ok if I upgrade the dependencies on the constraints file, @cjolowicz ?

@bruno-fs bruno-fs force-pushed the pygit2-upper-limit branch from b64e33f to 1a80814 Compare May 29, 2024 00:24
@bruno-fs bruno-fs force-pushed the pygit2-upper-limit branch from 1a80814 to 67b74ab Compare May 29, 2024 00:25
@bruno-fs
Copy link
Copy Markdown
Contributor Author

OK, CI is now finally passing for almost all checks. Only safety is failing now. 5 dependencies would require action, but I'm not sure how you prefer to tackle these kind of issue.

@cjolowicz
Copy link
Copy Markdown
Owner

Thank you for working on this! I'm fine with upgrading any dependencies that cause errors in Safety or other CI jobs.

bruno-fs added 4 commits May 29, 2024 17:39
Drop support for python 3.7, which is EOL. This was required to allow
upgrading some dependencies which were affected by CVEs.

Also bump supported python versions up to the latest, which at time of
writing is python 3.12.
Update pycodestyle to include a [fix][pycodestyle fix]
for false positives E231 being triggered in python 3.12.

In order to do so, dependency resolution required bumping
minimum python version to 3.8.1 (dependency hell, is that you?).

[pycodestyle fix]: PyCQA/pycodestyle#1148
B017 (assert-raises-exception) enforces treats assertRaises(Exception)
and pytest.raises(Exception) like pure evil.
@bruno-fs bruno-fs force-pushed the pygit2-upper-limit branch from 5e8d821 to 76775c3 Compare May 29, 2024 20:39
bruno-fs added 2 commits May 29, 2024 17:58
This commit introduces a change that is required for typeguard to get past at least "collection" phase of pytest. However, ~20 failures still need to be fixed in order to be fully complaint with latest typeguard.

Instead, let's just limit max typeguard version until a proper fix is implemented.
@bruno-fs bruno-fs force-pushed the pygit2-upper-limit branch from 76775c3 to 91c9e72 Compare May 29, 2024 20:58
@bruno-fs
Copy link
Copy Markdown
Contributor Author

Wow, what started as a "hey, a single line of code can fix this here" became a visit to dependency hell haha.
It was worth it.

Summary of changes:

  • had to drop support to python 3.7 (which is EOL, so I think its fine) in order to bump the affected libraries
  • since I was playing with python versions, also updated the support matrix with up to 3.12
  • had to adjust the code to play nice with updated linter versions, with exception to type guard. That one I just downgraded back to the version that was in use before because there were more than 20 failures.

All checks passed on my fork (bruno-fs#1)

@cjolowicz cjolowicz merged commit 7292f00 into cjolowicz:main May 30, 2024
@bruno-fs bruno-fs deleted the pygit2-upper-limit branch May 30, 2024 21:40
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

Successfully merging this pull request may close these issues.

Incompatibility with pygit2 1.15.0

2 participants