-
Notifications
You must be signed in to change notification settings - Fork 4
Feat/rollback #610
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
base: main
Are you sure you want to change the base?
Feat/rollback #610
Conversation
| import signal | ||
| import tempfile | ||
| from pathlib import Path | ||
| from contextlib import chdir, contextmanager |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it possible to not use this chidr?
iirc os.chdir can be used as a context as well, and then it means we dont drop an entire python version
| raise ValueError(msg) | ||
|
|
||
| with isolated_filesystem(): | ||
| with rollback.on_exception(Path.cwd()): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is gonna be great,
Only issue i can foresee is that currently, we use sys.exit(1) such that we exit from the cli.
Id like to basically raise exceptions and then handle them in the cli code with a sys.exit
That makes the output from the tool look a lot nicer as then we dont have like the stack trace every time it throws if that makes sense.
|
Please consider pr; I believe this lets us keep 3.10 for just a little while longer (Assuming she passes ci) |
See #609