Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

UUID Normalization

Aperta
#473 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
30/100
Tipo di issue
Documentazione
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
jupyter, python

Direzione di ricerca

L’issue non indica file o test del repository; inizia tracciando come vengono prodotti msg_id e session_id nel percorso di messaggistica di jupyter console/IPython e analizza il comportamento di jupyter_client/protocol a cui si fa riferimento. Determina se il risultato previsto è la normalizzazione o la documentazione di ID basati su stringhe, quindi documenta tale decisione e aggiungi la copertura pertinente se il progetto individua una posizione per i test.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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?

Lingua principale
Python
Stelle
734
Fork
411
Merge medio
1g 2h
PR unite (30g)
9

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di ipython/ipykernel

Tutte le issue di ipython/ipykernel

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.