Skip to content

Commit a058d1f

Browse files
committed
Use traitlets for keys
1 parent 8d56ecc commit a058d1f

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

ipykernel/kernelapp.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
from traitlets.traitlets import (
3434
Any,
3535
Bool,
36+
Bytes,
3637
Dict,
3738
DottedObjectName,
3839
Instance,
@@ -158,6 +159,11 @@ class IPKernelApp(BaseIPythonApplication, InteractiveShellApp, ConnectionFileMix
158159
# connection info:
159160
connection_dir = Unicode()
160161

162+
# Optional CurveZMQ keys loaded from the connection file (Z85-encoded bytes).
163+
# None when the kernel was not started with CurveZMQ enabled.
164+
curve_publickey: Bytes | None = Bytes(allow_none=True, default_value=None)
165+
curve_secretkey: Bytes | None = Bytes(allow_none=True, default_value=None)
166+
161167
@default("connection_dir")
162168
def _default_connection_dir(self):
163169
return jupyter_runtime_dir()

0 commit comments

Comments
 (0)