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 摘要。