Skip to content

Conversation

@yashwanthatla
Copy link
Owner

@yashwanthatla yashwanthatla commented Jun 21, 2025

PR Summary

Improve typing aliases import mechanism for better Python version compatibility

Overview

This PR changes how typing aliases are imported from the typing module to use dynamic imports with hasattr() checks, improving compatibility with future Python versions. It also adds tests to verify all typing names remain accessible.

Change Types

Type Description
Enhancement Improved import mechanism for typing aliases
Test Added test to verify typing name accessibility

Affected Modules

Module / File Change Description
typing_extensions.py Changed to dynamic imports with hasattr() checks
test_typing_extensions.py Added test for typing name accessibility

Notes for Reviewers

  • The change to dynamic imports should maintain backward compatibility while improving future compatibility
  • Verify the new test correctly validates all typing names are accessible

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