On Fri, 29 Apr 2022 at 06:50, Thomas Grainger <tagr...@gmail.com> wrote: > You can use a `__del__` method that warns on collection - like an unawaited > coroutine > > Also if you're in control of importing the dagfile you can record all created > dags and report any that are missing from the globals of the module
Yes and I think this is the best we can do given how frames are being cleared. We can notify the user that a DAG was instantiated and not exposed at the top-level which is almost guaranteed to be a mistake. There's probably no good way currently to do better (for some value of "better"). Thanks _______________________________________________ Python-Dev mailing list -- python-dev@python.org To unsubscribe send an email to python-dev-le...@python.org https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/python-dev@python.org/message/E4IU26RL4I72FMACQLNTIPT5DN5XTE3S/ Code of Conduct: http://python.org/psf/codeofconduct/