SIGN IN SIGN UP

fix instrument of typed psycopg sql (#4171)

* fix instrument of typed psycopg sql

The instrumentation is not working when using [typed `SQL`](https://www.psycopg.org/psycopg3/docs/api/sql.html) from psycopg (only when using the `Composed` type, that is returned when the query is formated).

```python
from psycopg.sql import SQL
query = SQL("SELECT * FROM test")
```

This fixes it by checking the `Composable` base class instead of the more restricted `Composed`.

* add changelog

* fix tests for python 3.9

using an identifier requires a real connection, I just replaced it since we only want to test with a composed.

---------

Co-authored-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>
A
Antoine D committed
b8a80209d77347a9f2b58dfb1b133bceaf20ac1c
Parent: 36aa71b
Committed by GitHub <noreply@github.com> on 2/10/2026, 4:34:24 PM