Skip to content

Support pythonπ in Python 3.14 venv's #119535

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

Closed
hauntsaninja opened this issue May 25, 2024 · 15 comments
Closed

Support pythonπ in Python 3.14 venv's #119535

hauntsaninja opened this issue May 25, 2024 · 15 comments
Labels
topic-venv Related to the venv module type-feature A feature request or enhancement

Comments

@hauntsaninja
Copy link
Contributor

hauntsaninja commented May 25, 2024

Feature or enhancement

Proposal:

λ env/bin/pythonπ
Python 3.14.0a0 (heads/main-dirty:de19694cfb, May 24 2024, 23:13:56) [Clang 15.0.0 (clang-1500.3.9.4)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> 

Linked PRs

@hauntsaninja hauntsaninja added the type-feature A feature request or enhancement label May 25, 2024
hauntsaninja added a commit to hauntsaninja/cpython that referenced this issue May 25, 2024
@ronaldoussoren
Copy link
Contributor

I guess I'm too boring, but I'm -1 on this. This would a nice-ish easter egg, but we'd have to revert for 3.15 and that opens up backward compatibility issues.

@Eclips4 Eclips4 added the topic-venv Related to the venv module label May 25, 2024
@nineteendo
Copy link
Contributor

nineteendo commented May 25, 2024

+1 It doesn't need to be reverted. We check specifically for 3.14.

@zitterbewegung
Copy link
Contributor

I have seen cute things like this break systems . I believe racket-lang had some birthday code trigger but then it broke the system on that day. Who knows what this would break and it seems too hard to test.

@ronaldoussoren
Copy link
Contributor

+1 It doesn't need to be reverted. We check specifically for 3.14.

Still, someone might start using pythonπ in a shell script with 3.14 and then gets a broken script once upgrading to 3.15 because pythonπ doesn't exist there. That's not a very likely scenario, but still.

And yes, this would have to be reverted in 3.15 because otherwise we'd end up with dead code in the stdlib.

@jbosboom
Copy link

Unlike most easter eggs, this will be directly presented to users because it will appear in tab completion, so you will get questions about it. Users without Unicode fonts in their terminal will be extra confused. I don't think it is worth the support burden.

@sobolevn
Copy link
Member

sobolevn commented May 28, 2024

I agree with @ronaldoussoren. But, I still advocate for using pi easter egg for 3.14 release somewhere else.

@hauntsaninja
Copy link
Contributor Author

hauntsaninja commented Oct 5, 2024

Still, someone might start using pythonπ in a shell script with 3.14 and then gets a broken script once upgrading to 3.15

The same argument would apply to using "python3.14" in a shell script

Not wanting easter eggs is a valid personal difference, they are sometimes contentious (even if the CPython project has a history of a few). I think as far as they go, this one is predictable and harmless. I do concede that in 3.15 it would create two dead lines of code (since it's version gated, fully dead, no deadline to revert) — to me that's a reasonable cost for a little bit of joy.

I've heard some FUD about the use of a Greek character. It's 2024, I'm genuinely curious, does anyone have an example of a platform/filesystem we support that this would cause a real issue on? (π is not that special, it's fully normalised Unicode. I couldn't find problems when looking into it, also note the change is restricted to os.name == "posix"). Note also that PEP 11 has this to say https://peps.python.org/pep-0011/#legacy-c-locale

@skirpichev
Copy link
Member

But, I still advocate for using pi easter egg for 3.14 release somewhere else.

Minor releases 3.14.1, 3.14.15, 3.14.159, ... (or rather 3.14.2, 3.14.16, 3.14.159...)? But SimpsonsTeX already did it!

@sobolevn
Copy link
Member

sobolevn commented Oct 5, 2024

Proof that easter eggs do create maintenance costs and bugs: #124960

@nineteendo
Copy link
Contributor

nineteendo commented Oct 5, 2024

in 3.15 it would create two dead lines of code

Technically we could wait with merging this until a 3.14 branch is created, right? Then there's no need to revert it.

Minor releases 3.14.1, 3.14.15, 3.14.159, ...

How about displaying 3.14.2, 3.14.3, ... as 3.14.15, 3.14.159... in the REPL? Because I'm afraid PY_VERSION_HEX might make things difficult.

easter eggs do create maintenance costs and bugs

The chance at bugs should be lower since it's just for one release (and not as complicated as <>).

@skirpichev
Copy link
Member

displaying ... in the REPL?

Well, with something like ~20 minor releases this will be

>>> "3.14."+f"{gmpy2.const_pi():.22f}"[4:]
'3.14.15926535897932384626'

On another hand, current 1st line of the banner doesn't fit common default of 80 characters width anyway... ;)

I'm afraid PY_VERSION_HEX might make things difficult.

Yeah, and rather impossible. 159 will be the last minor version, that increases monotonically and don't mess with major or minor version.

@AA-Turner
Copy link
Member

AA-Turner commented Oct 5, 2024

we could wait with merging this until a 3.14 branch is created

Whilst this is technically possible, our development process uses a backport workflow apart from exceptional cases. More importantly, 3.14 will be branched at beta 1, where no new features are allowed. So it would need to be merged now.

a reasonable cost for a little bit of joy.

I concur. This is a bit of fun, easily noticable, and a tongue-in-cheek reference to the "pi" release of Python. Remember that the language itself is named after a fairly irreverent programme!

A

@rruuaanng
Copy link
Contributor

Oh damn, turns out this was an easter egg. A while back, I was seriously telling the author that maybe ASCII characters should be used. Looks like I’m just old-fashioned.

hugovk pushed a commit that referenced this issue Oct 6, 2024
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
@hugovk
Copy link
Member

hugovk commented Oct 6, 2024

Merged.

Now, everyone: shhh!

@hugovk hugovk closed this as completed Oct 6, 2024
@foreignmeloman
Copy link
Contributor

I'll be that annoying guy now: 𝜋thon looks and sounds way cooler and I'm going to open a PR 👻

hugovk added a commit to hugovk/cpython that referenced this issue May 15, 2025
hugovk added a commit to hugovk/cpython that referenced this issue May 15, 2025
hauntsaninja pushed a commit that referenced this issue 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic-venv Related to the venv module type-feature A feature request or enhancement
Projects
None yet
Development

No branches or pull requests