SIGN IN SIGN UP

fix: Session.get() with with_for_update=False skips identity map

Fixes #13176.

`Session.get()` checks `with_for_update is None` to decide whether to look up the identity map. Passing `with_for_update=False` fails this check and always hits the database, even though `ForUpdateArg._from_argument` already treats `False` and `None` identically (both return `None`). Changed to `with_for_update in (None, False)` to match.

Closes: #13199
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/13199
Pull-request-sha: c639b8723888947317598df387c5e3e4d87acac4

Change-Id: I0584873f46099afadcdd760c0a267ae4d30528eb
J
joshuaswanson committed
d466d375889ee266ef928b6fbb6d673bda6beeb1
Parent: a49a4f0
Committed by Federico Caselli <cfederico87@gmail.com> on 3/27/2026, 6:03:38 PM