Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RFC: kernelapp: rename ports variable to avoid override #731

Merged
merged 1 commit into from
Jul 16, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions ipykernel/kernelapp.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ class IPKernelApp(BaseIPythonApplication, InteractiveShellApp,
iopub_thread = Any()
control_thread = Any()

ports = Dict()
_ports = Dict()

subcommands = {
'install': (
Expand Down Expand Up @@ -390,7 +390,7 @@ def log_connection_info(self):
for line in lines:
print(line, file=sys.__stdout__)

self.ports = dict(shell=self.shell_port, iopub=self.iopub_port,
self._ports = dict(shell=self.shell_port, iopub=self.iopub_port,
stdin=self.stdin_port, hb=self.hb_port,
control=self.control_port)

Expand Down Expand Up @@ -500,7 +500,7 @@ def init_kernel(self):
user_ns=self.user_ns,
)
kernel.record_ports({
name + '_port': port for name, port in self.ports.items()
name + '_port': port for name, port in self._ports.items()
})
self.kernel = kernel

Expand Down