pydanny / dj-notebook

Django + shell_plus + Jupyter notebooks made easy.
https://dj-notebook.readthedocs.io/
GNU General Public License v3.0
128 stars 21 forks source link

not working for python3.9 #165

Open letitfly opened 5 months ago

letitfly commented 5 months ago

Is your feature request related to a problem? Please describe. run into error in python3.9 env/lib/python3.9/site-packages/dj_notebook/config_helper.py:12 6 from dotenv import load_dotenv 9 # taken from dotenv, which declares a similar type (but it doesn't look public...) 10 # review note: the | syntax is new in python 3.10. If older pythons are generally being supported here, this should be 11 # rewritten as Union[str, os.PathLike[str]] ---> 12 StrPath = str | os.PathLike[str] 15 def setdefault_calls(module_path: Path) -> Generator[ast.Call, None, None]: 16 """Yields all calls to os.environ.setdefault within a module."""

TypeError: unsupported operand type(s) for |: 'type' and 'types.GenericAlias'

Describe the solution you'd like will there be support for python 3.9?

pydanny commented 5 months ago

Hey @letitfly, I hadn't planned on supporting Python 3.9. I'm happy to review and merge a PR if you want to submit one.