ipython / ipython

Official repository for IPython itself. Other repos in the IPython organization contain things like the website, documentation builds, etc.
https://ipython.readthedocs.org
BSD 3-Clause "New" or "Revised" License
16.25k stars 4.43k forks source link

`ipython kernel -f` help string is misleading #12535

Open MrMino opened 4 years ago

MrMino commented 4 years ago

The help string for ipython kernel -f states the following:

JSON file in which to store connection info [default: kernel-.json] This file will contain the IP, ports, and authentication key needed to connect clients to this kernel. By default, this file will be created in the security dir of the current profile, but can be specified by absolute path.

However, when passed an already populated connection file, the created kernel seems to instead use the information stored in it, instead of overwriting it.

Not really a big deal functionality-wise. That's the ~sane thing to do and also what Jupyter Notebook kinda assumes. But the help string is incredibly misleading here, especially if someone tries to reference IPython kernel implementation when building his own.


Sysinfo

{'commit_hash': '2486838d9',
 'commit_source': 'installation',
 'default_encoding': 'UTF-8',
 'ipython_path': '/home/mrmino/.pyenv/versions/3.6.10/lib/python3.6/site-packages/IPython',
 'ipython_version': '7.16.1',
 'os_name': 'posix',
 'platform': 'Linux-5.3.0-64-generic-x86_64-with-debian-buster-sid',
 'sys_executable': '/home/mrmino/.pyenv/versions/3.6.10/bin/python',
 'sys_platform': 'linux',
 'sys_version': '3.6.10 (default, Jul 20 2020, 02:00:35) \n'
                '[GCC 9.2.1 20191008]'}

Example connection file

{
  "shell_port": 34611,
  "iopub_port": 44443,
  "stdin_port": 39011,
  "control_port": 60551,
  "hb_port": 45535,
  "ip": "127.0.0.1",
  "key": "192f4192-0c720bd4dbddb11e8bd22aec",
  "transport": "tcp",
  "signature_scheme": "hmac-sha256",
  "kernel_name": ""
}
AmineDaou commented 1 year ago

I confirm it's really misleading