Skip to content

check_testing_tool: use vermin to detect version#508

Open
mzuenni wants to merge 9 commits intomainfrom
vermin
Open

check_testing_tool: use vermin to detect version#508
mzuenni wants to merge 9 commits intomainfrom
vermin

Conversation

@mzuenni
Copy link
Collaborator

@mzuenni mzuenni commented Feb 11, 2026

No description provided.

Copy link
Collaborator

@mpsijm mpsijm left a comment

Choose a reason for hiding this comment

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

Nice that there's a package for this 😄 Some quick comments:

pyproject.toml Outdated
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why not ~1.8.0?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

~1.8.0 means 1.8.* right? I think this dependency should work with any 1.* version. In generell our dependencies might be overly restrictive?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Oh woops, I thought that ~=1.8.0 would mean the same as ~=1.8, but apparently not 😂 My intention was ~=1.8 🙂 https://packaging.python.org/en/latest/specifications/version-specifiers/#compatible-release

We can also go with something more explicit, like ==1.* or >=1.8,<2 (or equivalently >=1.8,==1.*).

our dependencies might be overly restrictive?

Agreed, see also #474 (comment). Feel free to relax the remaining dependencies in a similar way 🙂

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

is there some easy way to actually check if another version is compatible? Does mypy check this properly when i change the version or does it rely on what version is already installed?

Copy link
Collaborator

@mpsijm mpsijm Feb 15, 2026

Choose a reason for hiding this comment

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

I assume that MyPy will simply use whatever is installed. If we install a new minor version and it breaks compatibility, then:

  • For packages with their own typings, we may get type errors (as intended, because we should fix the incompatibility)
  • For packages with an external types-package, we'll get the same if the types-package is in sync with the regular package
  • For Vermin, we should keep our own stubs in sync with the package. So maybe we should use an exact version for Vermin anyway?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

can we setup the CI to install the minimal and maximal matching versions and test both separately?

For Vermin, we should keep our own stubs in sync with the package. So maybe we should use an exact version for Vermin anyway?

Yea that sounds reasonable

Copy link
Collaborator

Choose a reason for hiding this comment

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

can we setup the CI to install the minimal and maximal matching versions and test both separately?

My guess is that we could run one job with a regular pip install (which will probably(?) install the most recent, compatible version), and in a separate job, run a pip install after replacing all =~ with == in the version range indicators?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

not sure if that works... but also sounds like stuff for the future?

@mzuenni mzuenni force-pushed the vermin branch 2 times, most recently from bab8097 to f15d2ba Compare February 12, 2026 12:24
@mzuenni mzuenni requested a review from mpsijm February 12, 2026 17:32
@mzuenni
Copy link
Collaborator Author

mzuenni commented Feb 12, 2026

I am not sure where these stubs should actually live?

@mzuenni mzuenni marked this pull request as ready for review February 12, 2026 17:37
@mpsijm
Copy link
Collaborator

mpsijm commented Feb 12, 2026

I am not sure where these stubs should actually live?

I guess we can make a bapctools/stubs/ folder under and point MyPy to it?

@mzuenni
Copy link
Collaborator Author

mzuenni commented Feb 15, 2026

ready to merge?

@mpsijm mpsijm changed the title use vermin to detect version check_testing_tool: use vermin to detect version Feb 15, 2026
Copy link
Collaborator

@mpsijm mpsijm left a comment

Choose a reason for hiding this comment

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

I pinned the version (see #508 (comment)), and I finally took the time to actually try it out 😛 From that, I have one question, but other than that, this PR is looking good to me 😄

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.

2 participants

Comments