Page MenuHomeElementl

Use compat layer for typing introspection
ClosedPublic

Authored by max on May 25 2021, 5:28 PM.

Details

Summary

Use a backport of the python 3.8 typing.get_args and typing.get_origin APIs to clarify our type introspection. Adds tests to clarify current behavior.

Test Plan

Unit

Diff Detail

Repository
R1 dagster
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Harbormaster returned this revision to the author for changes because remote builds failed.May 25 2021, 5:49 PM
Harbormaster failed remote builds in B31151: Diff 38317!
Harbormaster returned this revision to the author for changes because remote builds failed.May 25 2021, 7:44 PM
Harbormaster failed remote builds in B31167: Diff 38339!
Harbormaster returned this revision to the author for changes because remote builds failed.May 25 2021, 10:32 PM
Harbormaster failed remote builds in B31202: Diff 38387!
max requested review of this revision.May 25 2021, 11:26 PM
alangenfeld added inline comments.
python_modules/dagster/dagster/seven/typing.py
2

nit: its a little odd to me to route this through seven if seven is not doing the compat work

This revision is now accepted and ready to land.May 26 2021, 4:29 PM
python_modules/dagster/dagster/seven/typing.py
2

i just want it in one place in case we want to change things -- the compat library is good but there are still nits and there are likely to be more in future

This revision was automatically updated to reflect the committed changes.