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

[JACK-Client] All METADATA_ constants are available on Linux #13639

Merged
merged 5 commits into from
Apr 1, 2025

Conversation

srittau
Copy link
Collaborator

@srittau srittau commented Mar 17, 2025

No description provided.

@srittau
Copy link
Collaborator Author

srittau commented Mar 17, 2025

Background: When I'm running stubtest locally on my Linux system, it complains that these constants are missing. And they can be imported.

@srittau srittau marked this pull request as ready for review March 17, 2025 15:31

This comment has been minimized.

@@ -0,0 +1,2 @@
# The available constants differ based on the local environment.
jack\.METADATA_.*
Copy link
Collaborator

Choose a reason for hiding this comment

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

If your local install now sees all the METADATA_ * constants. Wouldn't this now fail for you locally with an "unused allowlist entry" error?

I guess the idea is that it's fine to fail for you, as long as it passes on the CI.

Still I'm really curious about why it's different. My local environment aggrees with the CI
My setup:
image
image
image

Copy link
Collaborator Author

@srittau srittau Mar 28, 2025

Choose a reason for hiding this comment

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

Wouldn't this now fail for you locally with an "unused allowlist entry" error?

AFAIK there are some heuristics that prevent that message for (some) regexps.

Edit: Here is a quote from https://mypy.readthedocs.io/en/latest/_sources/stubtest.rst.txt:

Note if an allowlist entry is a regex that matches the empty string,
stubtest will never consider it unused.

Edit 2: Of course that's not the case here, but there might be other variables that are not available instead? I'll test this some more in the next few days.

Copy link
Collaborator Author

@srittau srittau Mar 29, 2025

Choose a reason for hiding this comment

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

I'm using Ubuntu 24.10, which has a slightly newer libjack-dev version (1:0.126.0-2build3). I assume that's the reason the constants are now present. But testing it again, I now get

note: unused allowlist entry jack\.METADATA_.*

I'll fix the allowlist.

Copy link
Contributor

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

@srittau srittau merged commit bfd0321 into python:main Apr 1, 2025
43 checks passed
@srittau srittau deleted the jack-client-const branch April 1, 2025 00:23
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