I was inspired by D6751, but I noticed that since the @experimental decorator treats its arguments as functions, the decorator & classes that rely on the ConfigurableClass mixin were incompatible. I added a custom decorator for classes. I didn't utilize subclassing since we want the class' signature (all of the metadata to be associated with it) to be the same with or without the decorator - I think with subclassing we'd need a lot more boilerplate (i.e. to overwrite attributes like __name__, etc.)
Details
Details
Diff Detail
Diff Detail
- Repository
- R1 dagster
- Branch
- experimental_tag (branched from master)
- Lint
Lint Passed - Unit
No Test Coverage
Event Timeline
python_modules/dagster/dagster/utils/backcompat.py | ||
---|---|---|
186 | generally prefer not to use old/new in var names. how about old => dunder_init and new => warn_and_init? | |
192 | feel a little leery of doing this assignment, but I can't identify any glaring gotchas... @alangenfeld / @max any thoughts? |
python_modules/dagster/dagster/utils/backcompat.py | ||
---|---|---|
192 | Yeah definitely felt this was a bit weird but couldn't get subclassing to work without also overriding important metadata about the class (e.g. __name__, etc.) |