[issue46051] Make @atexit.register work for functions with arguments

2021-12-20 Thread quapka
quapka added the comment: Hi @terry.reedy, are you talking about this https://mail.python.org/mailman3/lists/python-ideas.python.org/ mailing list? Thanks for the tip. However, I don't understand why this isn't just buggy/unexpected behavior, because the 3) example seems to work without any

[issue46051] Make @atexit.register work for functions with arguments

2021-12-12 Thread quapka
quapka added the comment: I'm adding the tests I've written for this issue. First, the tests that do pass already: https://github.com/quapka/cpython/commit/913055932be4be1c61ac8383615045f8bceee4e8 Secondly, the ones that I'd expect to pass as well, but fail atm: https://github.com/quapka

[issue46051] Make @atexit.register work for functions with arguments

2021-12-11 Thread quapka
New submission from quapka : Hi folks! Let me first present an example that motivated this issue. Imagine a script that builds Docker images and later starts them as Docker containers. To avoid having to stop the containers "manually" (in code and potentially forgot) I ha