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

Pin packaging version #2535

Merged
merged 1 commit into from
Oct 29, 2023
Merged

Conversation

SnoopJ
Copy link
Contributor

@SnoopJ SnoopJ commented Oct 29, 2023

@Exirel discovered that we have some problems with type analysis on master if one has a packaging version that is 'too old'.

$ mypy --check-untyped-defs sopel
sopel/lifecycle.py:147: error: Unsupported operand types for >= ("tuple[int, ...]" and "None")  [operator]
sopel/lifecycle.py:147: note: Right operand is of type "tuple[int, ...] | None"

The above was observed with packaging==21.3.

I tried to look in their changelog to see if there was a specific version that fixed the issue we saw, but came up empty-handed. Pinning the lower bound to the latest version is the next best thing to do, and this package has excellent compatibility, so it shouldn't be a problem.

Checklist

  • I have read CONTRIBUTING.md
  • I can and do license this contribution under the EFLv2
  • No issues are reported by make qa (runs make lint and make test)
  • I have tested the functionality of the things this change touches

This version of `packaging` is chosen to resolve `mypy` failures with
older versions. It may be more strict than is necessary, but this
package has excellent compatibility and this pin is unlikely to be
disruptive.
@SnoopJ SnoopJ added the Tweak label Oct 29, 2023
@Exirel Exirel added this to the 8.0.0 milestone Oct 29, 2023
@dgw
Copy link
Member

dgw commented Oct 29, 2023

After some question about dropping back to earliest-good after I found the source of mypy considering the version's release property optional (tuple[...] | None), we elected to just keep this latest-good release constraint. It's fine.

@dgw dgw merged commit ae222ad into sopel-irc:master Oct 29, 2023
11 checks passed
@SnoopJ SnoopJ deleted the bugfix/pin-packaging-version branch November 5, 2023 20:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants