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

Fix ImportDB.get_default when CWD is the root directory (PyInf#13677) #362

Open
saharan-deshaw opened this issue Oct 1, 2024 · 3 comments

Comments

@saharan-deshaw
Copy link
Collaborator

saharan-deshaw commented Oct 1, 2024

The enhancements made in commit 7272bdb (Issue #346) introduced a bug where ImportDB.get_default(None) fails when the current working directory is the root directory. Reproducer:

>>> from pyflyby._importdb import ImportDB 
>>> os.chdir('/')
>>> db = ImportDB.get_default(None)
ValueError: No know path are safe

The reason is that in this case, there are no parent directories to check. So the logic incorrectly thinks that there is no safe path.

@sac111gp
Copy link
Collaborator

sac111gp commented Oct 7, 2024

Hi team, any ETA on this?
We'd like to get this fixed soon since we are planning an upgrade of pyflyby in 1 week time.

@saharan-deshaw
Copy link
Collaborator Author

@Carreau, any updates here?

@sac111gp
Copy link
Collaborator

ping.

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

No branches or pull requests

2 participants