konsti

@konstin
97 Followers
71 Following
116 Posts
he/him · cat in your python packages · pfp by phnyantom
@hynek a good chuck of the AI PRs we get is indistinguishable from spam (fully automated, nonsense claims, etc.). i hope that the wave of AI PRs dies down as the hype settles, and we develop a sense of AI-use courtesy rules instead

@elyn @ancoghlan a lot of the python internal type machinery was added before python had spellable types, which now shows up as those strange breaks in the type math.

there's a similar case where `float` actually means `float | int`, so there's now no way of saying just float, no int, even though `isinstance(1, float) == False`.

@hugovk What's the reason for retitling as spam vs. taking a mod action and deleting the issue?
@hugovk I've been looking at longest and shorted PEP discussion too, and https://discuss.python.org/t/pep-687-isolating-modules-in-the-standard-library/14824 with 4 posts wins shortest accepted PEP discourse thread.
PEP 687: Isolating modules in the standard library

From recent discussions around “what should have a PEP”, it’s clear that this should have been a PEP long ago. Better late than never, I guess! We submit this PEP to explain the changes, seek consensus on whether they are good, propose the remaining changes, and set best practices for new modules. Please head to the PEP page to read it. The initial version is below, so you can quote it, and so that if the PEP is changed future readers can make sense of the discussion. ▶ Text of the PEP:

Discussions on Python.org

@hugovk Unfortunately, we're still the largest even when only looking at the normative part (and exclude all the quotes and workaround analysis):

1160: pep-0817.rst
997: pep-0703.rst
946: pep-0654.rst
851: pep-0804.rst
780: pep-0646.rst
752: pep-0501.rst
708: pep-0642.rst
668: pep-0492.rst
631: pep-3119.rst
613: pep-3101.rst

We're roughly the same normative length as PEP 440, but that used a different PEP structure so it's not in the list (https://gist.github.com/konstin/79959d713be3b4c6605ba6febcc8beec)

analyze.py

GitHub Gist: instantly share code, notes, and snippets.

Gist
@ancoghlan @hugovk @offby1 @ambv @freakboy3742 @sethmlarson Besides being test-aware, i'd also love for Python to be more packaging-aware, so it could check for things suc has if the code comes from an editable install and treat it as code to emit warnings for.
@pganssle @hugovk @emmatyping Are you doing a lot of fresh compiles (as opposed to incremental)? Lifetimes are my biggest pain point when switching from python to rust, but we're mostly using incremental and `cargo check`. There's some tricks to optimize compile times, but it's kinda limited.
@LucasWerkmeister i made a scharfenberg choker for my train nerd friends
@LucasWerkmeister Now for our next question: When a user requests "3.14", in which case do you use a nogil build?
(a) There is only a nogil python installed
(b) There is a nogil python ahead of a gil python in PATH
(c) There is an existing nogil venv
(d) never
50/50 is already used, audience and phone-a-friend are still on the table
@webology @carlton @treyhunner In uv, there's `override-dependencies` to patch (transitive) bounds https://docs.astral.sh/uv/reference/settings/#override-dependencies
Settings | uv

uv is an extremely fast Python package and project manager, written in Rust.