]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Support `matmul` (@) as an optional operator.
authorAramís Segovia <aramissegovia@gmail.com>
Tue, 13 May 2025 20:18:11 +0000 (16:18 -0400)
committersqla-tester <sqla-tester@sqlalchemy.org>
Tue, 13 May 2025 20:18:11 +0000 (16:18 -0400)
commit8bd314378c1d477761346433c441c4a0c8a5abde
tree1af61eec122a886e740a3316aa8c36c2929f0e2b
parentc3f1ea62286a0b038482437923c4d1c53d668dcb
Support `matmul` (@) as an optional operator.

Allow custom operator systems to use the @ Python operator (#12479).

### Description
Add a dummy implementation for the  `__matmul__` operator rasing `NotImplementedError` by default.

### Checklist
<!-- go over following points. check them with an `x` if they do apply, (they turn into clickable checkboxes once the PR is submitted, so no need to do everything at once)

-->

This pull request is:

- [ ] A documentation / typographical / small typing error fix
- Good to go, no issue or tests are needed
- [ ] A short code fix
- please include the issue number, and create an issue if none exists, which
  must include a complete example of the issue.  one line code fixes without an
  issue and demonstration will not be accepted.
- Please include: `Fixes: #<issue number>` in the commit message
- please include tests.   one line code fixes without tests will not be accepted.
- [X] A new feature implementation
- please include the issue number, and create an issue if none exists, which must
  include a complete example of how the feature would look.
- Please include: `Fixes: #<issue number>` in the commit message
- please include tests.

**Have a nice day!**

Closes: #12583
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/12583
Pull-request-sha: 7e69d23610f39468b24c0a9a1ffdbdab20ae34fb

Change-Id: Ia0d565decd437b940efd3b97478c16d7a0377bc6
doc/build/changelog/unreleased_21/12479.rst [new file with mode: 0644]
lib/sqlalchemy/sql/default_comparator.py
lib/sqlalchemy/sql/elements.py
lib/sqlalchemy/sql/operators.py
test/sql/test_operators.py