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

pytype: resurrect (deprecated) PyType::is_instance #2031

merged 1 commit into from Nov 29, 2021


Copy link

This change is a follow-up to #1985 to restore PyType::is_instance in a deprecated state.

I realised that if we just straight-up remove this method without a deprecation cycle, users will likely experience runtime failures because type.is_instance(obj) will continue to compile but select PyAny::is_instance instead thanks to PyType dereferencing to PyAny.

Hence this PR resurrects PyType::is_instance in a deprecated state so that users have some time to migrate away.

@davidhewitt davidhewitt merged commit 7455518 into PyO3:main Nov 29, 2021
@davidhewitt davidhewitt deleted the resurrect-type-is-instance branch November 29, 2021 07:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

Successfully merging this pull request may close these issues.

None yet

1 participant