FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-119535: python饾湅 by hauntsaninja 路 Pull Request #119536 路 python/cpython 路 GitHub

/ cpython Public

gh-119535: python饾湅 - #119536

Merged
hugovk merged 5 commits into
python:mainfrom
hauntsaninja:python蟺
Oct 6, 2024

Hidden character warning

The head ref may contain hidden characters: "python\u03c0"
Merged

gh-119535: python饾湅#119536
hugovk merged 5 commits into
python:mainfrom
hauntsaninja:python蟺

Conversation

hauntsaninja commented May 25, 2024
edited by bedevere-app Bot
Loading

Copy link
Copy Markdown
Contributor

hauntsaninja requested a review from hugovk May 25, 2024 06:20
Comment thread Lib/venv/__init__.py Outdated

suffixes = ['python', 'python3', f'python3.{sys.version_info[1]}']
if sys.version_info[:2] == (3, 14):
suffixes.append('python蟺')

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I think using python-pi or python_pi would be better. I think using special characters may cause garbled characters on some platform.

hauntsaninja Oct 5, 2024
edited
Loading

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

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 os.name == "posix")

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 :-)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

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...)

hauntsaninja Oct 5, 2024
edited
Loading

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

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 ls-ing? That doesn't seem that bad, and sounds in line with the vibes of what PEP 11 describes as "won't fix". (And of course, if users report problems during prerelease we can revert)

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Terminals cope with missing glyphs already (usually by rendering an ASCII ?, or a dedicated replacement character).

If the active encoding is sufficiently wrong, they don't even see the raw unicode:

$ ls -d _[bd]*
_build馃惛  _deploy馃惛
$ LANG=C ls -d _[bd]*
'_build'$'\360\237\220\270'  '_deploy'$'\360\237\220\270'

So yeah, as far as easter eggs go, this one is as close to genuinely harmless as they get.

Comment thread Lib/venv/__init__.py Outdated
Comment thread Lib/venv/__init__.py

AlexWaygood left a comment
edited
Loading

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

LGTM. Easter eggs are fun, and I can't see any serious harm in doing this, because I seriously doubt anybody will use it for any serious use :-)

I don't have a strong opinion on https://github.com/python/cpython/pull/119536/files#r1788711396.

Sad that the Windows users won't get the Easter egg! (But I don't think that should block merging this 馃槅)

AA-Turner left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Alex took all I wanted to say!

A

Comment thread Lib/venv/__init__.py Outdated

suffixes = ['python', 'python3', f'python3.{sys.version_info[1]}']
if sys.version_info[:2] == (3, 14):
suffixes.append('python蟺')

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

From @ambv , this should use the mathematical symbol variant of 饾湅, rather than the Greek letter variant:

Suggested change
suffixes.append('python蟺')
suffixes.append('python饾湅')

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

@hauntsaninja Let's include this, remove the NEWS, and keep the version check. Thanks!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

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)

Copy link
Copy Markdown
Contributor

Can you update the title of the PR?

AlexWaygood changed the title gh-119535: python蟺 gh-119535: python饾湅 Oct 6, 2024

hugovk left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Now, everyone: shhh!

hugovk merged commit 3fc673e into python:main Oct 6, 2024
hugovk added a commit to hugovk/cpython that referenced this pull request May 15, 2025
hauntsaninja pushed a commit that referenced this pull request May 15, 2025
* Revert "gh-119535: Support 饾湅thon in Python 3.14 venvs (#125035)"

This reverts commit fcef3fc.

* Revert "gh-119535: python饾湅 (#119536)"

This reverts commit 3fc673e.
Pranjal095 pushed a commit to Pranjal095/cpython that referenced this pull request Jul 12, 2025
* Revert "pythongh-119535: Support 饾湅thon in Python 3.14 venvs (python#125035)"

This reverts commit fcef3fc.

* Revert "pythongh-119535: python饾湅 (python#119536)"

This reverts commit 3fc673e.
taegyunkim pushed a commit to taegyunkim/cpython that referenced this pull request Aug 4, 2025
* Revert "pythongh-119535: Support 饾湅thon in Python 3.14 venvs (python#125035)"

This reverts commit fcef3fc.

* Revert "pythongh-119535: python饾湅 (python#119536)"

This reverts commit 3fc673e.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

9 participants


Back | FazBrowse Home | New Git URL