Skip to content

Replication of original PR #595: Become robust to things being removed from typing #3

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

Open
wants to merge 1 commit into
base: replicated-pr-595-before
Choose a base branch
from

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