python/cpython
View on GitHub ↗ ★ 77,791 Python
The Python programming language
548 mentions on Hacker News by 400 people: 44 stories, 504 comments · first 2014-12-30 · latest 2026-10-27
20082026
-
…app uses the itms-services URL scheme to install an app. Seems like pretty clear direction to me: https://github.com/python/cpython/issues/120522
comment by threeseed · 2024-06-27 · in Python grapples with Apple App Store rejections -
▲ 2
Proposal to add a "yeet" keyword to Pythonstory by gregsadetsky · 2024-06-23 · 3 comments
-
Python has a trick allowing mutable concat when reference count is 1 https://github.com/python/cpython/blob/08d09cf5ba041c9c5c386...
comment by __s · 2024-06-16 · in Joining Strings in Python: A "Huh" Moment -
…for random. https://docs.python.org/3/library/random.html#random.shuffle Modules/_randommodule.c: https://github.com/python/cpython/blob/main/Modules/_randomm... , Library/random.py: https://github.com/python/cpython/blob/main/Lib/random.py…
comment by westurner · 2024-06-10 · in Zero Tolerance for Bias -
▲ 71
Withdraw most of my ownership in favor of Markstory by madmax108 · 2024-05-27 · 18 comments
-
…automatically by the site module. Heres is the code with the function site.main that is doing it: https://github.com/python/cpython/blob/8af84b503d0b62a3db0d8... and more specifically here https://github.com/python/cpython/blob/8af84b503d0b…
comment by mariocesar · 2024-05-09 · in The new REPL in Python 3.13 -
…are outside the PyObject, last I checked) That's wrong. That was never the case. Recent CPython: https://github.com/python/cpython/blob/6d419db10c84cacbb3862... CPython 2.0: https://github.com/python/cpython/blob/2a9b0a93091b9ef7350a9...…
comment by albertzeyer · 2024-05-08 · in A library to assist writing memory-unsafe code in "pure" Python -
The “load_verify_locations” also causes a segfault sometimes: https://github.com/python/cpython/issues/114653
comment by orf · 2024-04-26 · in Patching requests for fun and (concurrent) profit -
…"hard guarantee". I was not sure what you meant, so I answered both, as you may have noticed. [1] https://github.com/python/cpython/blob/796b3fb28057948ea5b98...
comment by rbehrends · 2024-04-25 · in Borrow Checking, RC, GC, and the Eleven () Other Memory Safety Approaches -
…code"... you're going to be in for a bad time and your future collaborators will not be happy. [1]: https://github.com/python/cpython/blob/3.12/Lib/statistics.p... [2]: https://github.com/python/cpython/blob/3.12/Lib/collections/...
comment by martinky24 · 2024-04-19 · in Ask HN: High quality Python scripts or small libraries to learn from -
…They link a list of some proposed improvements already underway, with quantitative estimates, at https://github.com/python/cpython/issues/115802 The TL;DR is: > Stop using the "large" code model. (...) Benchmarking runs suggest that this…
comment by Qem · 2024-04-18 · in PEP 744 – JIT Compilation -
…[0] vendored into the Python project's repo on 2022-04-18 [1], so that should be fine, right? [0] https://github.com/python/cpython/blob/main/PCbuild/get_exte... [1] https://github.com/python/cpython-source-deps/tree/xz
comment by ptx · 2024-03-30 · in Backdoor in upstream xz/liblzma leading to SSH server compromise -
…covering his track e.g. found a cpython issue where he got reprimanded for serially opening issues: https://github.com/python/cpython/issues/115195#issuecomment... But clicking around he seems to mostly be interacting with interest around…
comment by masklinn · 2024-03-29 · in Backdoor in upstream xz/liblzma leading to SSH server compromise -
…to skip calls to self.save_global() in pickle._Pickler.save() if condition(pickle_protocol) here https://github.com/python/cpython/blob/main/Lib/pickle.py#L5... and #L585 , and also in the save_type() dispatch table at #L1123 .
comment by westurner · 2024-03-15 · in Insecurity and Python Pickles -
…as well (it does seem to miss earliest advisories like PSF-2005-001 and PSF-2006-001 though). [1] https://github.com/python/cpython/issues/48739 [2] https://github.com/psf/advisory-database/
comment by lifthrasiir · 2024-03-13 · in C++ Safety, in Context -
…it be to create a pickle protocol that does not exec or eval code? python/cpython//Lib/pickle.py: https://github.com/python/cpython/blob/main/Lib/pickle.py python/cpython//Lib/pickletools.py: https://github.com/python/cpython/blob/main/Lib/…
comment by westurner · 2024-03-12 · in Insecurity and Python Pickles -
▲ 470
gh-116167: Allow disabling the GILstory by freediver · 2024-03-11 · 247 comments
-
How do you mean? CPython uses karatsuba's for large numbers which should be asymptotically fast https://github.com/python/cpython/blob/d864b0094f9875c5613cb...
comment by csjh · 2024-03-08 · in Eloquent JavaScript 4th edition (2024) -
…their own compiler for a full software stack. [1] https://github.com/spack/spack/issues/38724 and https://github.com/python/cpython/issues/106424 [2] https://github.com/spack/spack/issues/37172#issuecomment-181...
comment by stabbles · 2024-03-07 · in FreeBSD has a(nother) new C compiler: Intel oneAPI DPC++/C++ -
…e.g to see the state of the cpython main branch on January 1 we can ask for `main@{2024-01-01}`: https://github.com/python/cpython/tree/main@{2024-01-01} This does not walk the commit history, but instead the server-side reflog, so it’s…
comment by semiquaver · 2024-02-23 · in Hidden GitHub commits and how to reveal them -
…Python [0]. C++ may not work, but most other languages (especially VM-based) can and many do. [0] https://github.com/python/cpython/blob/3.12/Lib/tkinter/__in...
comment by lolinder · 2024-02-14 · in PySimpleGUI 4 will be sunsetted in Q2 2024 -
…(which I'm sure would raise objections over the volume of code – https://github.com/python/cpython/blob/main/Lib/collections/... – but a lot of it is providing syntactic sugar).
comment by adw · 2024-02-13 · in K Isn't Lisp (2004) -
…It was quite annoying to find the source of this problem and to find workarounds for it. https://github.com/python/cpython/issues/113939 Another side node: Bloomberg has a couple of nice open source projects. E.g. I just realized, PyStack…
comment by albertzeyer · 2024-02-10 · in Memray – A Memory Profiler for Python -
▲ 2
Substantial Performance Regression in Python 3.12story by mvelbaum · 2024-01-30 · 0 comments
-
▲ 2
The CPython experimental JIT is mergedstory by pjmlp · 2024-01-30 · 0 comments
-
for those who missed it, the PR description is a poem https://github.com/python/cpython/pull/113465
comment by sigma5 · 2024-01-11 · in Python 3.13 Gets a JIT -
The PR message with a riff off the Night Before Christmas is gold. https://github.com/python/cpython/pull/113465
comment by thetinymite · 2024-01-09 · in Python 3.13 Gets a JIT -
…they heard it exclaim, as it traced out of sight, "Happy JIT-mas to all, and to all a good night!" https://github.com/python/cpython/pull/113465
comment by divbzero · 2024-01-09 · in Python 3.13 Gets a JIT -
▲ 2
Python: Faster opcode dispatch on GCC (2008)story by tosh · 2024-01-09 · 0 comments
-
…optimization tiers, etc. It seems the JIT is how at least part of that effort will materialize: https://github.com/python/cpython/issues/113710 > We're getting a JIT. Now it's time to optimize the traces to pass them to the JIT.
comment by lumpa · 2024-01-09 · in Python 3.13 Gets a JIT -
…about implementing "AIA chaising" to handle server misconfigurations as described in this article: https://github.com/python/cpython/issues/62817 . The article mentions this approach in the last paragraph. There is at least one 3rd party…
comment by aflukasz · 2024-01-08 · in The browser's biggest TLS mistake -
…and that's been the case for years. The set implementation points out some of the differences, at https://github.com/python/cpython/blob/main/Objects/setobjec... : Unlike the dictionary implementation, the lookkey function can return NULL…
comment by eesmith · 2024-01-03 · in 50 Algorithms Every Programmer Should Know (Second Edition) -
…that object then it raises an exception that triggers a REPL to cleanly quit. The code is here: https://github.com/python/cpython/blob/3.12/Lib/_sitebuiltin...
comment by andrewaylett · 2023-12-28 · in You can't do that because I hate you -
If you read nothing else, the commit message adding JIT support is worth your time: https://github.com/python/cpython/pull/113465
comment by ath0 · 2023-12-27 · in What's up Python? Epic CPython commit, Django 5 and 2FA for PyPI -
…compact and have one more spare bit to prevent an overflow. That sounds way more restrictive. [1] https://github.com/python/cpython/blob/36adc79041f4d2764e1da... [2] https://github.com/python/cpython/blob/36adc79041f4d2764e1da... An…
comment by lifthrasiir · 2023-12-26 · in A copy-and-patch JIT compiler for CPython -
It's all explained, including a 50 minutes talk, in the linked issue: https://github.com/python/cpython/issues/113464
comment by tecleandor · 2023-12-26 · in A copy-and-patch JIT compiler for CPython -
▲ 270
A copy-and-patch JIT compiler for CPythonstory by polyrand · 2023-12-26 · 68 comments
-
…at the moment it still ignores cgroups, it's just a wrapper around sched_getaffinity(). https://github.com/python/cpython/blob/6a69b80d1b1f3987fcec3...
comment by itamarst · 2023-12-19 · in How many CPU cores can you use in parallel? -
…appears to have switched to SipHash 1-3 for strings, from 2-4, following the lead of Rust and Ruby. https://github.com/python/cpython/issues/73596 However, Python does not use it for integers; >>> hash(10) 10 >>> hash(100) 100 >>>…
comment by eesmith · 2023-12-11 · in How many lines of C it takes to execute a + b in Python -
…an unmodified Python 3.4 binary". Since then they switched from siphash24 to the faster siphash13. https://github.com/python/cpython/pull/28752
comment by eesmith · 2023-12-11 · in How many lines of C it takes to execute a + b in Python -
CPython is evaluating the options in this guide: https://github.com/python/cpython/issues/112301#issue-200494...
comment by SethMLarson · 2023-11-30 · in Compiler Options Hardening Guide for C and C++ -
You can look at the history of PyObject yourself: https://github.com/python/cpython/commits/main/Include/objec... . None of these changes were done because of weird CPU errata that meant that making the header bigger was a performance win.…
comment by saagarjha · 2023-11-30 · in Rust std fs slower than Python? No, it's hardware -
…Windows and macOS builds. [1] https://sources.debian.org/src/sqlite3/3.16.2-5%2Bdeb9u1/deb... [2] https://github.com/python/cpython/pull/31655
comment by lifthrasiir · 2023-11-28 · in Antirez' tiny JSON selector library -
…is the complexity? I've never seen this make debugging harder, it's just an additional type. [1] https://github.com/python/cpython/blob/d9fc15222e96942e30ea8...
comment by dazzlefruit · 2023-11-23 · in Writing and linting Python at scale -
…OCaml: https://v2.ocaml.org/manual/lex.html#sss:keywords Python: https://github.com/python/cpython/blob/3.12/Lib/keyword.py Java (I think these are the current ones): https://docs.oracle.com/javase/tutorial/java/nutsandbolt
comment by ReleaseCandidat · 2023-11-20 · in Roc – A fast, friendly, functional language -
…(quoted because we're all aware of the challenges these conversions pose each and every time). [0] https://github.com/python/cpython/issues/81669
comment by qwertox · 2023-11-19 · in datetime.utcnow() is now deprecated -
oops I misread it.. seems it was rejected because it was not standard enough... https://github.com/python/cpython/issues/83479#issuecomment-...
comment by theamk · 2023-11-13 · in Reasons to Prefer Blake3 over Sha256 -
…In practice, what that means is if there is a bug report, like https://github.com/python/cpython/issues/71964 from 2016, then the fix may languish for years as no one in the core team is able to resolve it. You can see se
comment by eesmith · 2023-11-01 · in My User Experience Porting Off Setup.py -
…details follow: That string is output by cpython to contain the contents of the __DATE__ C macro ( https://github.com/python/cpython/blob/fa35b9e89b2e207fc8bae... which calls to https://github.com/python/cpython/blob/fa35b9e89b2e207fc8bae..…
comment by Smaug123 · 2023-10-29 · in NixOS Reproducible Builds: minimal ISO successfully independently rebuilt -
…at least the last decade and a half, as long as I've been paying attention. It's even written in C: https://github.com/python/cpython/blob/d9246c7b734b8958da034... .
comment by nonameiguess · 2023-10-18 · in What's New in Python 3.12