deshaw / pyflyby

A set of productivity tools for Python
https://deshaw.github.io/pyflyby/
Other
347 stars 52 forks source link

unsafe filenames (PyInf#12921) #346

Closed dshivashankar1994 closed 1 month ago

dshivashankar1994 commented 2 months ago

The issue fixed with https://github.com/deshaw/pyflyby/pull/244 is not complete.

If # is present in the cwd path multiple times or at 2nd level, the issue still exists.

:~/foo#bar/bar#baz:> py
In [1]: np
[PYFLYBY] UnsafeFilenameError: .../foo#bar
[PYFLYBY] Set the env var PYFLYBY_LOG_LEVEL=DEBUG to debug.
[PYFLYBY] Disabling pyflyby auto importer.
---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
Cell In[1], line 1
----> 1 np

NameError: name 'np' is not defined
Carreau commented 1 month ago

Oh, the Filename and Unsafe Filename handling is really weird and complicated. I'll do some refactor and try to simplify that to have proper handling but that looks like really old core 10ish years, that does not really explain why it does some of the things it does.

Carreau commented 1 month ago

Closed by #352