TableValueType should accept is_ operator class
Maintainers usually reply within 1 day
@nightcityblade is already working on this.
Since Oct 6, 2026.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 68/100
Research direction
Start by locating TableValueType and its declared operator classes, then check nearby tests for operator-class behavior. Reproduce the reported warning with the table_valued().is_not(None) example; done when is and is_not are accepted without the deprecation warning and the relevant tests pass.
Written by the indexing model from the issue text.
Description
In 2.1 different kind of operators were added, to improve their organisation in various construct.
The TableValueType currently does not allow is, and it's warning.
This is mostly a postgresql element, and pg does have IS available for rows and it has a specific meaning.
For example this is a perfectly valid example that warns
import sqlalchemy as sa
t = sa.Table(
"t",
sa.MetaData(),
sa.Column("id", sa.Integer),
sa.Column("name", sa.String()),
)
s = sa.select(t).where(t.table_valued().is_(None))
e = sa.create_engine("postgresql://scott:tiger@localhost/test")
e.echo = True
with e.connect() as conn:
t.metadata.create_all(conn)
conn.execute(t.insert(), [{'id': 1, 'name': 2}, {'id': None, 'name': None}])
result = conn.execute(s).all()
print(result)
This prints [(null, null)] (usually it's used with is not)
we above example raises
SADeprecationWarning: Type object <class 'sqlalchemy.sql.sqltypes.TableValueType'> does not include operator 'is_not' in its operator classes. Using built-in operators (not including custom or overridden operators) outside of a type's stated operator classes is deprecated and will raise InvalidRequestError in a future release
s = sa.select(t).where(t.table_valued().is_not(None))
- Dominant language
- Python
- Stars
- 12.2k
- Forks
- 1.8k
- PR merge metrics
- No merged PRs in 30d
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from sqlalchemy/sqlalchemy
-
Difficulty 1/5 1-3 hours Newbie friendliness 82/100
sqlalchemy/sqlalchemy#13655 · 1 reaction ·
Maintainers usually reply within 1 day
-
PostgreSQL multihost URL with bracketed IPv6 hosts raises ValueError: too many values to unpackMay be free again A pull request for this issue was closed without being merged. Openbug engine postgresql
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
sqlalchemy/sqlalchemy#13637 · 3 comments ·
Maintainers usually reply within 1 day
-
asyncpg dialect raises DBAPIError, not DataError, for SQLSTATE class 22 errorsPossibly taken @HardMax71 claimed this 6 days ago. Openbug dialects
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
sqlalchemy/sqlalchemy#13636 · 7 comments ·
Maintainers usually reply within 1 day
-
documentation bugMay be free again A pull request for this issue was closed without being merged. Opendocumentation
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
sqlalchemy/sqlalchemy#13594 · 2 comments · 5 reactions ·
Maintainers usually reply within 1 day
-
bug robots involved :robot: sql
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
sqlalchemy/sqlalchemy#13469 · 4 comments ·
Maintainers usually reply within 1 day
All issues in sqlalchemy/sqlalchemy
Similar issues
-
bug ready for review
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
odysseus-dev/odysseus#6641 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
happypawspillaro/happypaws#78 ·
Maintainers usually reply within 4 days
-
pydanty:is-working
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
pydantic/pydantic-ai#10020 ·
Maintainers usually reply within 1 day
-
Bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
ansible-collections/ibm_zos_core#2650 ·
-
hw: pvc tests: vllm vllm
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
intel/intel-xpu-backend-for-triton#8362 ·
Maintainers usually reply within 1 day