Skip to content

Conversation

@Karrenbelt
Copy link
Collaborator

@Karrenbelt Karrenbelt commented Mar 13, 2025

See #609

import signal
import tempfile
from pathlib import Path
from contextlib import chdir, contextmanager
Copy link
Owner

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()):
Copy link
Owner

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.

@8ball030
Copy link
Owner

8ball030 commented Mar 14, 2025

Please consider pr;

#612

I believe this lets us keep 3.10 for just a little while longer (Assuming she passes ci)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants