Skip to content

Conversation

@8ball030
Copy link
Owner

No description provided.

@8ball030 8ball030 changed the base branch from feat/rollback to main March 14, 2025 00:07
@8ball030 8ball030 closed this Mar 14, 2025
@8ball030 8ball030 reopened this Mar 14, 2025
@8ball030 8ball030 mentioned this pull request Mar 14, 2025
@8ball030 8ball030 changed the base branch from main to feat/rollback March 14, 2025 00:47

# https://www.youtube.com/watch?v=0GRLhpMao3I
# async-signal safe is the strongest concept of reentrancy.
# async-signal safe implies thread safe.
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

surprised the comments passed linters haha

Comment on lines +16 to +24
@contextmanager
def chdir(new_dir):
"""Change the current working directory temporarily."""
old_dir = os.getcwd()
try:
os.chdir(new_dir)
yield
finally:
os.chdir(old_dir)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this has nothing to do with rollback. Now what?

from ... import rollback

with rollback.chdir(...):
    ....

?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

besides this is not the first version of this context manager just to change dirs either. Why would we keep supporting 3.10?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What exactly does the context lib version of chdir that this does not?
It can be used in the manner your suggesting?

I don't really understand why this specific function is so important?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why wouldn't we support 3.10 if all it requires is not using this chdir thing?

Copy link
Collaborator

@Karrenbelt Karrenbelt Mar 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

well there are other limitations, such as StrEnum, IntEnum etc. and who knows what else. 3.10 is from 2021, pretty old by now. End of life support still 1 year 7 month tho

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