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

Make this library compatible with 3.8+ #1

Merged
merged 7 commits into from
May 4, 2024
Merged

Conversation

InSyncWithFoo
Copy link
Contributor

Since the main use of this library seems to be type checking, I think it's a good thing to make this library also usable in 3.8 and 3.9.

@InSyncWithFoo InSyncWithFoo marked this pull request as ready for review April 29, 2024 14:53
pyproject.toml Show resolved Hide resolved
@Tinche
Copy link
Owner

Tinche commented Apr 30, 2024

The tests are failing because signature doesn't allow eval_str on older Pythons. I guess that needs to be handled, and those versions can't support from __future__ import annotations properly I think.

@InSyncWithFoo
Copy link
Contributor Author

InSyncWithFoo commented Apr 30, 2024

That could potentially be replaced with typing.get_type_hints() (or, to be precise, typing_extensions.get_type_hints()). According to this CPython issue, there are subtle differences, but I think it's good enough. Should I proceed?

@Tinche
Copy link
Owner

Tinche commented Apr 30, 2024

Sure, give it a try!

@InSyncWithFoo
Copy link
Contributor Author

That was actually more complex than I thought. Anyway, tests pass now.

@Tinche
Copy link
Owner

Tinche commented May 4, 2024

Thanks!

@Tinche Tinche merged commit 4af3f77 into Tinche:main May 4, 2024
7 checks passed
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.

None yet

2 participants