Repository navigation
gh-119535: python𝜋 #119536
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
The head ref may contain hidden characters: "python\u03C0"
gh-119535: python𝜋 #119536
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -303,8 +303,11 @@ def setup_python(self, context): | |||||
| copier(context.executable, path) | ||||||
| if not os.path.islink(path): | ||||||
| os.chmod(path, 0o755) | ||||||
| for suffix in ('python', 'python3', | ||||||
| f'python3.{sys.version_info[1]}'): | ||||||
|
|
||||||
| suffixes = ['python', 'python3', f'python3.{sys.version_info[1]}'] | ||||||
| if sys.version_info[:2] == (3, 14): | ||||||
| suffixes.append('pythonπ') | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think using
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hmm, what platform / filesystem are you concerned about, and what would the impact to the user on that platform be? (note in this branch we know A Greek letter isn't really that special. It's fully normalised Unicode (non-normalised Unicode can still be a little surprising). Looks like even FAT has supported this since around the time I was born via LFN. See also https://peps.python.org/pep-0011/#legacy-c-locale part of PEP 11 This is decidedly one of the advantages of being alive in 2024 :-)
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Linux console with no framebuffer? Console fonts without this glyph? I sometimes do math with the Diofant in the framebuffer console (yes, it has unicode support). I works well with greek letters, do some pretty-printing to display formulas. But I doubt it's able to display e.g. chinese texts an non-garbadge. (Perhaps, with other font, which I don't have...)
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. IIUC https://wiki.archlinux.org/title/Linux_console says that the Linux console uses UTF-8, but we may indeed have to worry about whether the console font is missing π. The same page says the kernel built-in font can render the CP437 character set, which does have π (and dates back to the original IBM PC). It's possible I misunderstood something, but even the case where the font is missing the glyph, is the worst thing that can happen that a user will see an unrendered glyph if Edit: note the CP437 stuff probably doesn't apply to U+1d70b which the PR has been updated to use. It might also have worse font support
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Terminals cope with missing glyphs already (usually by rendering an ASCII If the active encoding is sufficiently wrong, they don't even see the raw unicode: So yeah, as far as easter eggs go, this one is as close to genuinely harmless as they get.
AA-Turner marked this conversation as resolved.
Resolved
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. From @ambv , this should use the mathematical symbol variant of 𝜋, rather than the Greek letter variant:
Suggested change
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @hauntsaninja Let's include this, remove the NEWS, and keep the version check. Thanks!
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks, I've made the updates! (Note that U+1d70b isn't NFKC normalised. I know in some cases non-normalised Unicode can cause issues in filesystems, but I think that's usually about NFC/NFD normalisation) |
||||||
| for suffix in suffixes: | ||||||
| path = os.path.join(binpath, suffix) | ||||||
| if not os.path.exists(path): | ||||||
| # Issue 18807: make copies if | ||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| On Python 3.14, :mod:`venv` creates an additional ``pythonπ`` symlink on non-Windows systems | ||
|
hauntsaninja marked this conversation as resolved.
Resolved
|
||
Uh oh!
There was an error while loading. Please reload this page.