Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

UUID Normalization

未关闭
#473 3 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
30/100
Issue 类型
文档
描述清晰度
需要澄清
活跃度
停滞
技术栈
jupyter, python

调研方向

该 issue 未指定仓库文件或测试;首先跟踪 msg_id 和 session_id 在 jupyter console/IPython 消息传递路径中的生成方式,并审查所引用的 jupyter_client/protocol 行为。确定预期结果是对基于字符串的 ID 进行规范化还是文档化,然后记录这一决定;如果项目确定了测试位置,则添加相关覆盖率。

由索引模型根据 Issue 内容生成。

描述

Today I was looking into sticking messages into a database when I noticed that our msg_id and session_id for jupyter console and ipython don't match the canonical format (e.g. 3a9993f9-ba0c-4a75-bb58-62af0ac3d2d4):

$ jupyter console --kernel python3
Jupyter console 6.0.0

Python 3.7.6 (default, Dec 30 2019, 19:38:26)
Type 'copyright', 'credits' or 'license' for more information
IPython 7.6.1 -- An enhanced Interactive Python. Type '?' for help.



In [1]: ip = get_ipython()

In [2]: ip.parent_header
Out[2]:
{'header': {'msg_id': '46806cf5-b41b930ae1b3f209d20bcc8c',
  'msg_type': 'execute_request',
  'username': 'kylek',
  'session': '97790200-f0614d420db48cbb8394735e',
  'date': datetime.datetime(2020, 1, 6, 19, 50, 45, 482522, tzinfo=tzutc()),
  'version': '5.3'},
 'msg_id': '46806cf5-b41b930ae1b3f209d20bcc8c',
 'msg_type': 'execute_request',
 'parent_header': {},
 'metadata': {},
 'content': {'code': 'ip.parent_header',
  'silent': False,
  'store_history': True,
  'user_expressions': {},
  'allow_stdin': True,
  'stop_on_error': True},
 'buffers': []}

In [3]: %connect_info
{
  "shell_port": 53739,
  "iopub_port": 53740,
  "stdin_port": 53741,
  "control_port": 53742,
  "hb_port": 53743,
  "ip": "127.0.0.1",
  "key": "c49fffbb-dfb77272de2bdb4133453432",
  "transport": "tcp",
  "signature_scheme": "hmac-sha256",
  "kernel_name": ""
}

Paste the above JSON into a file, and connect with:
    $> jupyter <app> --existing <file>
or, if you are local, you can connect with just:
    $> jupyter <app> --existing kernel-11139.json
or even just:
    $> jupyter <app> --existing
if this is the most recent Jupyter kernel you have started.

Is this intended?

Perhaps the following is a jupyter_client / protocol question though -- should we document that these are string based IDs and are sensitive to - placement, not to be relied on as UUIDs?

主要语言
Python
星标
734
派生
411
平均合并
1 天 2 小时
30 天内合并 PR
9

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

ipython/ipykernel 的其他 Issue

查看 ipython/ipykernel 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。