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

Fix python 3.8 runtime type error #9502

Merged
merged 1 commit into from Apr 10, 2020

Conversation

gshuflin
Copy link
Contributor

@gshuflin gshuflin commented Apr 9, 2020

Problem

In the create method of core/test.py there is a call to issubclass with a value that can in principle be a typing.Union. In Python 3.6 this works fine; however Python 3.8 changed the type of typing.Union in such a way as cause the issubclass call to throw an exception at runtime.

Solution

Add a check to ensure that the value being checked by issubclass is an instance of type to avoid this error.

[ci skip-rust-tests]
[ci skip-jvm-tests]
Copy link
Contributor

@Eric-Arellano Eric-Arellano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@gshuflin gshuflin merged commit 3e4ce99 into pantsbuild:master Apr 10, 2020
@gshuflin gshuflin deleted the fix_type_check_in_test branch April 10, 2020 01:03
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