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

feat: support python 3.13 #539

Merged
merged 3 commits into from
Oct 17, 2024
Merged

Conversation

branchvincent
Copy link
Contributor

To help us get this pull request reviewed and merged quickly, please be sure to include the following items:

  • Tests (if applicable)
  • Documentation (if applicable)
  • Changelog entry
  • A full explanation here in the PR description of the work done

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • Tests
  • Other

Backward Compatibility

Is this change backward compatible with the most recently released version? Does it introduce changes which might change the user experience in any way? Does it alter the API in any way?

  • Yes (backward compatible)
  • No (breaking changes)

Issue Linking

What's new?

Just adding support for python 3.13. Poetry was locked to an older version of pygit2 that can't be built on 3.13 so I had to add a newer version (which no longer supports python 3.8). Also ran poetry update

@rbailey-godaddy
Copy link
Contributor

Cool! However, there's a lot of breakage in the CI testing... I think it's related to libgit2/pygit2#1317 -- neither our runners nor my workstation are prepared to deal with compiling-from-source in the absence of 3.13-compatible wheels. Hopefully this problem will solve itself in the near future.

@branchvincent
Copy link
Contributor Author

ah pygit2==1.16.0 did publish 3.13 wheels but poetry selected an older version because it also dropped python 3.9 support. I just pushed an update to prefer ^1.16.0 for python>=3.10

Copy link
Contributor

@rbailey-godaddy rbailey-godaddy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stupid linters. :-(

tox.ini Show resolved Hide resolved
Copy link
Contributor

@rbailey-godaddy rbailey-godaddy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I'll buy this. (At first I thought I'd accidentally committed some of my testing from yesterday because you'd made many of the exact same changes I considered!)

I see there's a types-pygit2 library that we could install to address many of the attr-defined errors, but it feels like a cure that's worse than the disease -- it doesn't fix all of those errors, and it introduces a number type compatibility errors for known-working code. The resulting vibe I get is "not fully baked".

I think this PR reaches the goal of adding 3.13 support with the smallest amount of perturbation to the codebase. Thanks!

@branchvincent
Copy link
Contributor Author

Happy to help!

Meant to comment earlier but the type: ignore comments were needed because pygit2 now ships type hints but they aren't 100% accurate yet: libgit2/pygit2#1322

Also pylint complaining about typing.Pattern missing was a false positive, that was fixed with 3.13 support in 3.3.0 but similar to pygit2 that version also dropped 3.9 support

@rbailey-godaddy rbailey-godaddy merged commit 8092d1e into godaddy:main Oct 17, 2024
27 checks passed
@branchvincent branchvincent deleted the py313 branch October 17, 2024 18:15
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.

4 participants