Skip to content
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

Drop dependency on testpath. #1723

Merged
merged 3 commits into from Apr 2, 2022
Merged

Drop dependency on testpath. #1723

merged 3 commits into from Apr 2, 2022

Conversation

anntzer
Copy link
Contributor

@anntzer anntzer commented Mar 7, 2022

Instead, backport the tiny chdir contextmanager from CPython to replace TemporaryWorkingDirectory.

Followup to #1596

@anntzer anntzer force-pushed the utd branch 2 times, most recently from 24444bf to 2b43046 Compare March 7, 2022 12:58
Instead, backport the tiny chdir contextmanager from CPython.
@blink1073
Copy link
Member

I think it would be cleaner to add the TemporaryWorkingDirectory class directly to a local util rather than use a more complicated context manager.

@anntzer
Copy link
Contributor Author

anntzer commented Mar 9, 2022

I don't have a super strong opinion there, but I think that if this had been written with the python 3.11 API already available, one would have written with TemporaryDirectory() as td, contextlib.chdir(td): ... quite naturally, rather than introducing another contextmanager. So here I'm basically just writing thing as if that API was already available.

@blink1073
Copy link
Member

Fair enough, no strong objection. Thanks!

@blink1073 blink1073 merged commit a957175 into jupyter:main Apr 2, 2022
@anntzer anntzer deleted the utd branch April 3, 2022 18:00
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.

None yet

2 participants