Add typing_extensions as a main dependency#196
Merged
Conversation
Contributor
Collaborator
If that happens, it's because one of dependencies conditionally depends on it. We can't rely on that. The other reason it gets installed is for mypy and pyright. |
bkeryan
approved these changes
Sep 10, 2025
Co-authored-by: Brad Keryan <brad.keryan@ni.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this Pull Request accomplish?
This adds an explicit dependency on typing_extensions.
Why should this Pull Request be merged?
When I tried to use the latest version of nitypes in the nidaqmx repo, I got this error when running tests with Python 3.11+:
I think the upgrade to poetry 2.1 changed how the typing_extensions dependency works. For older versions of Python, it's still implicitly provided, but for the newer versions, it isn't. But since _analog.py is trying to import the typing_extensions module, I think it makes sense for nitypes to explicitly list it as a dependency so that is guaranteed to be available.
What testing has been done?
I'm hoping this change would fix the issue in nidaqmx without nidaqmx having to explicitly depend on typing_extensions, but I don't know how to test that before submitting this PR.
(Note: I went ahead and added the typing_extensions dependency to nidaqmx, so this PR isn't actually needed for that, although it might be a good idea regardless?)