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
-
Yes, I found a loop performance regression [0] in 3.12 and 3.13. [0]: https://github.com/python/cpython/issues/123540
comment by sgarland · 2025-03-10 · in Performance of the Python 3.14 tail-call interpreter -
If you are curious about how Python's string interning works: https://github.com/python/cpython/blob/main/InternalDocs/str...
comment by jessekv · 2025-03-03 · in The power of interning: making a time series database smaller -
…by default. "why venv install old pip?" re: `python -m ensurepip && python -m pip install -U pip` https://github.com/python/cpython/issues/74813
comment by westurner · 2025-03-02 · in PEP 486 – Make the Python Launcher aware of virtual environments (2015) -
▲ 23
Gh-128563: A new tail-calling interpreter for Python 3.14story by rurban · 2025-02-08 · 3 comments
-
…only understood NULLs correctly when using QUOTE_NOTNULL, which was added to Python just last year: https://github.com/python/cpython/issues/113732 I've also heard of a fun database where the user "Geoffrey" was truncated to "G". I wonder…
comment by threeducks · 2025-02-03 · in Hello, I'm Mr. Null. My Name Makes Me Invisible to Computers (2015) -
…OCaml https://github.com/ocaml/ocaml/blob/trunk/Makefile Python https://github.com/python/cpython/blob/main/Makefile.pre.in Haskell https://github.com/ghc/ghc/blob/master/ghc/Makefile R https://github.com/wch/r-source/blob
comment by dumah · 2025-01-31 · in A better build system for OCaml -
…in its official tooling. 1: https://github.com/google/flatbuffers/blob/master/src/idl_ge... 2: https://github.com/python/cpython/issues/94675
comment by elcritch · 2025-01-29 · in An update on Dart macros and data serialization -
…library; the standard library `ensurepip` (called from `venv`) includes a vendored wheel for Pip ( https://github.com/python/cpython/tree/main/Lib/ensurepip/_b... ), and imports Pip from within that wheel to bootstrap it. (Wheels are zip…
comment by zahlman · 2025-01-13 · in Uv's killer feature is making ad-hoc environments easy -
…the table. So it'll know that 40 is not in the set without having to jump up into `__eq__`**. [1] https://github.com/python/cpython/blob/main/Objects/setobjec... * Note that the actual implementation will place bucket conflicts in the next…
comment by daxfohl · 2025-01-11 · in Why is hash(-1) == hash(-2) in Python? -
▲ 3
A new tail-calling interpreter for significantly better interpreter performancestory by nmstoker · 2025-01-08 · 1 comment
-
…This is in part thanks to algorithmic improvements implemented at least partially in Python ( https://github.com/python/cpython/blob/main/Lib/_pylong.py#L... ). But I can also see improved performance even for only a couple hundred digits…
comment by zahlman · 2025-01-04 · in Can LLMs write better code if you keep asking them to “write better code”? -
…you can do on a dict is thread safe but if you find a situation where it isn't it's a bug. https://github.com/python/cpython/issues/112075 Google is recommending people not rely on it because it does make dict subclasses not substitutable.…
comment by Spivak · 2025-01-01 · in Databases in 2024: A Year in Review -
Dang: Link should be https://github.com/python/cpython/issues/86904
comment by zitterbewegung · 2024-12-26 · in Subprocess: Don't close all file descriptors by default (close_fds=False) -
https://github.com/python/cpython/issues/86904
comment by williamjackson · 2024-12-26 · in Subprocess: Don't close all file descriptors by default (close_fds=False) -
…a self-socket, but yeah, it's the same approach. The function is even called `_make_self_pipe`. https://github.com/python/cpython/blob/bf21e2160d1dc6869fb23...
comment by badmintonbaseba · 2024-12-02 · in The GNU make jobserver Implementation (2015) -
…incidents reported on status.python.org. there was some discussion on at least two github issues: https://github.com/python/cpython/issues/127307 and https://github.com/python/pythondotorg/issues/2663
comment by jepler · 2024-11-27 · in All Python Downloads from Python.org Return 403 Forbidden -
…also detects this situation (at runtime using refcounts) and does in-place mutations where possible https://github.com/python/cpython/blob/a2ee89968299fc4f0da4b...
comment by ketralnis · 2024-11-25 · in Owl Lisp – A functional Scheme for world domination -
There’s a nasty bug in the python cookie parser, cookies after a cookie with quotes will be dropped: https://github.com/python/cpython/pull/113663 Zoom or some other website our customers use was writing a cookie with quotes that would…
comment by NegativeLatency · 2024-11-22 · in Handling cookies is a minefield -
I went and dug up the original code that caused an issue. Here it is: https://github.com/python/cpython/blob/v2.7.1/Lib/cgi.py#L60... Python's std lib `cgi.FieldStorage` object was falsy if it did not define any headers , even if it…
comment by lihaoyi · 2024-11-17 · in The Pythonic Emptiness -
The issue was migrated to github so more up-to-date discussion is in https://github.com/python/cpython/issues/62817
comment by anttihaapala · 2024-11-02 · in RCE Vulnerability in QBittorrent -
…but only on MacOS (I only tested ARM, no idea on x86). Linux was about the same as for lists. [0]: https://github.com/python/cpython/issues/123540
comment by sgarland · 2024-10-26 · in Python 3.13, what didn't make the headlines -
…that when the user is already in async code they don't call the sync form out of laziness." [1] [1] https://github.com/python/cpython/issues/66435#issuecomment-...
comment by enragedcacti · 2024-10-24 · in What Color is Your Function? (2015) -
…you'll be out of the real Internet. Go ahead man! Upgrade your IP!! Change is a good thing.” [1]: https://github.com/python/cpython/blob/5f5c0b9c23238dc0a1fdb... [2]: https://adminhacks.com/broken-IPv6.html [3]:…
comment by SmartHypercube · 2024-10-21 · in The IPv6 Transition -
…released in Python 3.13 aims to provide modern features No `vi` mode and not planned. Very modern. https://github.com/python/cpython/issues/118840
comment by wiseowise · 2024-10-15 · in PEP 762 – REPL-acing the default REPL -
…call out to C extensions. Peruse the standard library code, if you want to get a sense of it: https://github.com/python/cpython/tree/main/Lib So you can expect any code that heavily relies on the standard library to be slower than the Rust…
comment by tuveson · 2024-10-09 · in My negative views on Rust (2023) -
I've been tracking this one: https://github.com/python/cpython/issues/109534 , but there are multiple others raised in the cpython repo over on Github. Searching for asyncio or sslcontext shows multiple issues raised over the years with no…
comment by boarush · 2024-10-08 · in Python 3.13.0 Is Released -
not just this one, I've been tracking this too https://github.com/python/cpython/issues/109534
comment by boarush · 2024-10-08 · in Python 3.13.0 Is Released -
…the recent deadlocks are due to this pull request as an example that calls out how risky this is. https://github.com/python/cpython/pull/114279 Personally knowing the pain of fork() in the way you are using it, I have moved on. But I would…
comment by nyrikki · 2024-10-08 · in Python 3.13.0 Is Released -
…REPL will not be implementing inputrc support, and consequently there won't be a vi editing mode. https://github.com/python/cpython/issues/118840#issuecomment...
comment by cmdlineluser · 2024-10-07 · in Python 3.13.0 Is Released -
…seen is doing weird rebinding/shadowing stuff with e.g. closures and prebound exception captures. https://github.com/python/cpython/blob/10094a533a947b72d01ed... https://github.com/python/cpython/blob/10094a533a947b72d01ed... So too for…
comment by zbentley · 2024-10-07 · in Python 3.13.0 Is Released -
…longer than merely since 3.10, I am betting this is the one, based on the description of the issue: https://github.com/python/cpython/issues/84904 (Don't let the associates with asyncio throw you: that was merely the code in which it was…
comment by saurik · 2024-10-07 · in Python 3.13.0 Is Released -
Maybe related to this segfault I found on MacOS? https://github.com/python/cpython/issues/114653
comment by orf · 2024-10-07 · in Python 3.13.0 Is Released -
…specific course of action here, but you should probably try to wade into the linked discussion ( https://github.com/python/cpython/issues/84559 ). Looks like the push to disable warnings (in 3.13) is mostly coming from one guy.
comment by icegreentea2 · 2024-10-07 · in Python 3.13.0 Is Released -
You'll also be happy to learn that there's an issue open to deprecate them: https://github.com/python/cpython/issues/78125 It's been open since 2018 though. You might find it worth a read.
comment by talideon · 2024-10-07 · in HPy – A better C API for Python -
…I've opened a CPython/PR that may help a bit by adding `python3 -m sysconfig --json` flag [0] [0] https://github.com/python/cpython/pull/123318
comment by fforflo · 2024-10-06 · in HPy – A better C API for Python -
…templates for JIT. And JIT itself currently has some memory management issues to iron out. [1]: https://github.com/python/cpython/issues/118093 Talk by Brandt Butcher was there but it was made private:…
comment by Ralfp · 2024-09-28 · in Everything you need to know about Python 3.13 – JIT and GIL went up the hill -
…it was. ReStructured Text (.rst) source for the documentation is in the CPython GitHub repository: https://github.com/python/cpython/tree/main/Doc/tutorial . You can see for yourself the commit histories and get a sense of who wrote the…
comment by zahlman · 2024-09-24 -
…Edit: This one is a decent example (and hasn't been fixed for a long time) https://github.com/python/cpython/issues/74957
comment by Retr0id · 2024-09-06 · in Achieving high Python performance with code generation (2022) -
…granularly than lists, so as it grows, it’ll have to do so more frequently compared to lists? [0]: https://github.com/python/cpython/blob/main/Modules/arraymod...
comment by sgarland · 2024-09-06 · in Lesser known parts of Python standard library -
…a heap allocated `unsigned long *` or what have you. https://docs.python.org/3/library/array.html https://github.com/python/cpython/blob/main/Modules/arraymod... And you can use struct for heterogenous data =) It has a neat DSL for…
comment by tomjakubowski · 2024-09-05 · in Lesser known parts of Python standard library -
…in how this (hilarious) error text came to be, it's been hardcoded in cpython since 2001! https://github.com/python/cpython/commit/ad3d3f2f3f19833f59f... The author, Jeremy Hylton, is now a Principal Engineer at Google working on AI search…
comment by btown · 2024-08-22 · in Python’s Preprocessor -
…name). 3. Memoize these steps, much as we see with builtin DSLs in Python, like the re module; see https://github.com/python/cpython/blob/3.12/Lib/re/__init__.... We do plan to make this easier/faster by supporting getting the original…
comment by jimbaker · 2024-08-17 · in PEP 750: Tag Strings for Writing Domain-Specific Languages -
…GitHub-Flavored Markdown, GitHub will auto-embed the current issue title and closed/open status: - https://github.com/python/cpython/issues/1 - python/cpython#1 This without the leading `- ` doesn't get the card embed though:…
comment by westurner · 2024-08-16 · in Architectural Retrospectives: The Key to Getting Better at Architecting -
…[2]: https://pypi.org/project/nest-asyncio/ [3]: https://bugs.python.org/issue22239 [4]: https://github.com/python/cpython/issues/66435
comment by gsmecher · 2024-08-15 · in Awaitless: Ipython and REPL and Coroutines – Suffering -
They removed most of superinstructions because those prevented other more effective optimizations: https://github.com/python/cpython/issues/105229
comment by Ralfp · 2024-08-08 · in Recent Performance Improvements in Function Calls in CPython -
…function in CPython’s `Python/pythonrun.c` [0] to a commit-based link [1]. [0]: https://github.com/python/cpython/blob/main/Python/pythonrun... [1]: https://github.com/python/cpython/blob/967a4f1d180d4cd669d5c...
comment by jay-barronville · 2024-08-07 · in Python extensions should be lazy -
…month [1]. There seems to have been a big influx of new contributors in the last few years. [2] [1] https://github.com/python/cpython/pulse/monthly [2] https://github.com/python/cpython/graphs/contributors
comment by the_duke · 2024-08-02 · in Russ Cox is stepping down as the Go tech lead -
It's still there! https://github.com/python/cpython/blob/main/Python/future.c#...
comment by qrian · 2024-07-08 · in Python with Braces -
…parsing of such URLs on the server side, without the actual interaction happening [1]. [1] https://github.com/python/cpython/issues/104139
comment by lifthrasiir · 2024-06-28 · in Python grapples with Apple App Store rejections -
…the `itms-services://?` URL format is non-standard and broke the existing logic in `urllib.parse`: https://github.com/python/cpython/pull/104312
comment by 7A2A-4AC · 2024-06-27 · in Python grapples with Apple App Store rejections