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

Print IPv6 url as hostname or enclosed in brackets #652

Merged
merged 1 commit into from
Jan 4, 2022

Conversation

op3
Copy link
Contributor

@op3 op3 commented Jan 4, 2022

This pull request addresses the display of IPv6 URLs:

  • Just like 0.0.0.0, :: is replaced with the hostname.

  • Literal IPv6 addresses are enclosed in square brackets, e.g. ::1 is turned into [::1], to separate the address from the port number.

* Display hostname instead of ::

* Enclose literal IPv6 addresses in square brackets, e.g. [::1], to
  separate from port number
@welcome
Copy link

welcome bot commented Jan 4, 2022

Thanks for submitting your first pull request! You are awesome! 🤗

If you haven't done so already, check out Jupyter's Code of Conduct. Also, please make sure you followed the pull request template, as this will help us review your contribution more quickly.
welcome
You can meet the other Jovyans by joining our Discourse forum. There is also a intro thread there where you can stop by and say Hi! 👋

Welcome to the Jupyter community! 🎉

Copy link
Collaborator

@blink1073 blink1073 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@blink1073 blink1073 added this to the 1.14 milestone Jan 4, 2022
@blink1073 blink1073 merged commit db46446 into jupyter-server:main Jan 4, 2022
@welcome
Copy link

welcome bot commented Jan 4, 2022

Congrats on your first merged pull request in this project! 🎉
congrats
Thank you for contributing, we are very proud of you! ❤️

ip = "%s" % socket.gethostname()
else:
ip = self.ip
ip = "[{}]".format(self.ip) if ":" in self.ip else self.ip
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
ip = "[{}]".format(self.ip) if ":" in self.ip else self.ip
ip = f"[{self.ip}]" if ":" in self.ip else self.ip

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

too late 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants