ipython / ipython/ipykernel

Change in python behaviour

Abierto
#522 0 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
Python
Estrellas
734
Forks
412
Merge medio
1 d 5 h
PR fusionados (30 d)
8

Descripción

Since python 3.7, the sys.path behaviour changed:
https://docs.python.org/3/whatsnew/3.7.html#changes-in-python-behavior

> When using the -m switch, the initial working directory is now added to sys.path, rather than an empty string (which dynamically denoted the current working directory at the time of each import). Any programs that are checking for the empty string, or otherwise relying on the previous behaviour, will need to be updated accordingly (e.g. by also checking for os.getcwd() or os.path.dirname(__main__.__file__), depending on why the code was checking for the empty string in the first place).

I don't know if ipykernel should be updated (see https://github.com/ipython/ipykernel/blob/9181966528c79d9f67e565e85d12439ec95a43bf/ipykernel_launcher.py#L12)

For reference: https://github.com/spyder-ide/spyder-kernels/pull/222

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.