News for hackers. Stuff that matters.
Re:Are you expected to run five Python type-checkers now? by eloisius on Monday June 08, 2026 @12:57PM (#48447877)
Yes, where would I be without the _RelationshipBackPopulatesArgument type of

        sqlalchemy.orm.relationship(argument: _RelationshipArgumentType[Any] | None = None, secondary: _RelationshipSecondaryArgument | None = None, *, uselist: bool | None = None, collection_class: Type[Collection[Any]] | Callable[[], Collection[Any]] | None = None, primaryjoin: _RelationshipJoinConditionArgument | None = None, secondaryjoin: _RelationshipJoinConditionArgument | None = None, back_populates: _RelationshipBackPopulatesArgument | None = None, order_by: _ORMOrderByArgument = False, backref: ORMBackrefArgument | None = None, overlaps: str | None = None, post_update: bool = False, cascade: str = 'save-update, merge', viewonly: bool = False, init: _NoArg | bool = _NoArg.NO_ARG, repr: _NoArg | bool = _NoArg.NO_ARG, default: _NoArg | _T = _NoArg.NO_ARG, default_factory: _NoArg | Callable[[], _T] = _NoArg.NO_ARG, compare: _NoArg | bool = _NoArg.NO_ARG, kw_only: _NoArg | bool = _NoArg.NO_ARG, hash: _NoArg | bool | None = _NoArg.NO_ARG, lazy: _LazyLoadArgumentType = 'select', passive_deletes: Literal['all'] | bool = False, passive_updates: bool = True, active_history: bool = False, enable_typechecks: bool = True, foreign_keys: _ORMColCollectionArgument | None = None, remote_side: _ORMColCollectionArgument | None = None, join_depth: int | None = None, comparator_factory: Type[RelationshipProperty.Comparator[Any]] | None = None, single_parent: bool = False, innerjoin: bool = False, distinct_target_key: bool | None = None, load_on_pending: bool = False, query_class: Type[Query[Any]] | None = None, info: _InfoType | None = None, omit_join: Literal[None, False] = None, sync_backref: bool | None = None, dataclass_metadata: _NoArg | Mapping[Any, Any] | None = _NoArg.NO_ARG, \*kw: Any) → _RelationshipDeclared[Any]*
Re:Are you expected to run five Python type-checkers now? by cogman10 on Monday June 08, 2026 @01:37PM (#48448444)
It's not for you, it's for your IDE. And if you aren't using an IDE then you can pretty much ignore it anyways.

You are in exactly the same position as if you knew or didn't know that type.

Re:Are you expected to run five Python type-checkers now? by nonethewiser on Monday June 08, 2026 @02:54PM (#48449791)
If you're not using and IDE nor an LLM
Re:Are you expected to run five Python type-checkers now? by zephen on Tuesday June 09, 2026 @12:35AM (#48456458)
> And if you aren't using an IDE then you can pretty much ignore it anyways.

No. I can't. This completely misses the fucking point entirely.

I use python because. it's. easy. to read.

And figure out what the fuck is going on.

This example is the complete antithesis of that.

> You are in exactly the same position as if you knew or didn't know that type.

But I'm not in exactly the same position as if the fucking static typing weenies hadn't gone and convinced everybody to massively increase the size of the codebase with impenetrable extra crap.

Re:Are you expected to run five Python type-checkers now? by tlavoie on Monday June 08, 2026 @03:49PM (#48450782)
It's probably hard to come up with something messier than SqlAlchemy here. Not an expert, but spent more than enough time spelunking queries in the debugger. I much prefer bugs that can be surfaced at compile-time rather than run-time.
Re:Are you expected to run five Python type-checkers now? by chuckadams on Monday June 08, 2026 @02:58PM (#48449855)
Part of it is due to the clunky `_NoArg.NO_ARG` business for optional params. Pretty-printing it would also go a long way, but that technology seems too advanced for any language circa 2026.
Re:Are you expected to run five Python type-checkers now? by cik on Tuesday June 09, 2026 @09:21AM (#48460800)
This is a big part of the reason that I've embraced ths sqlc (d/re)evolution.

Writing queries in sql and then generating for the target language also provides a flexibility that has reduced rewrite cost. Add to this ease of organization and layoit, and I'm not going back.

Re:Are you expected to run five Python type-checkers now? by strbean on Monday June 08, 2026 @05:06PM (#48452071)
_RelationshipBackPopulatesArgument = Union[ str, PropComparator[Any], Callable[[], Union[str, PropComparator[Any]]], ]
Re:Are you expected to run five Python type-checkers now? by Ardren on Monday June 08, 2026 @09:09PM (#48454835)
What function signature isn't going to look messy with 36 keyword arguments.

https://github.com/sqlalchemy/sqlalchemy/blob/0798e6cbe11b30...

Re:Are you expected to run five Python type-checkers now? by AdieuToLogic on Monday June 08, 2026 @09:30PM (#48455013)
>> I think types are particularly valuable for libraries.

> Yes, where would I be without the _RelationshipBackPopulatesArgument type of ...

(proceeds to list a signature with over 40 parameters)

You would be left wondering which of the 40+ arguments provided to a given invocation is not what was allowed without a compiler to tell you.

Have fun tracking down which one, or ones, is causing the problem.