summaryrefslogtreecommitdiff
path: root/doc/build
diff options
context:
space:
mode:
Diffstat (limited to 'doc/build')
-rw-r--r--doc/build/changelog/unreleased_14/5429.rst17
-rw-r--r--doc/build/core/tutorial.rst6
-rw-r--r--doc/build/orm/tutorial.rst6
3 files changed, 23 insertions, 6 deletions
diff --git a/doc/build/changelog/unreleased_14/5429.rst b/doc/build/changelog/unreleased_14/5429.rst
new file mode 100644
index 000000000..2ff7e2416
--- /dev/null
+++ b/doc/build/changelog/unreleased_14/5429.rst
@@ -0,0 +1,17 @@
+.. change::
+ :tags: change, sql
+ :tickets: 5429
+
+ Several operators are renamed to achieve more consistent naming across
+ SQLAlchemy.
+
+ The operator changes are:
+
+ * `isnot` is now `is_not`
+ * `not_in_` is now `not_in`
+
+ Because these are core operators, the internal migration strategy for this
+ change is to support legacy terms for an extended period of time -- if not
+ indefinitely -- but update all documentation, tutorials, and internal usage
+ to the new terms. The new terms are used to define the functions, and
+ the legacy terms have been deprecated into aliases of the new terms.
diff --git a/doc/build/core/tutorial.rst b/doc/build/core/tutorial.rst
index 738d4d74e..395144ed1 100644
--- a/doc/build/core/tutorial.rst
+++ b/doc/build/core/tutorial.rst
@@ -775,7 +775,7 @@ objects is at :class:`.ColumnOperators`.
in_([('ed', 'edsnickname'), ('wendy', 'windy')])
)
-* :meth:`NOT IN <.ColumnOperators.notin_>`::
+* :meth:`NOT IN <.ColumnOperators.not_in>`::
statement.where(~users.c.name.in_(['ed', 'wendy', 'jack']))
@@ -786,12 +786,12 @@ objects is at :class:`.ColumnOperators`.
# alternatively, if pep8/linters are a concern
statement.where(users.c.name.is_(None))
-* :meth:`IS NOT NULL <.ColumnOperators.isnot>`::
+* :meth:`IS NOT NULL <.ColumnOperators.is_not>`::
statement.where(users.c.name != None)
# alternatively, if pep8/linters are a concern
- statement.where(users.c.name.isnot(None))
+ statement.where(users.c.name.is_not(None))
* :func:`AND <.sql.expression.and_>`::
diff --git a/doc/build/orm/tutorial.rst b/doc/build/orm/tutorial.rst
index c04caf9e6..5ed42449a 100644
--- a/doc/build/orm/tutorial.rst
+++ b/doc/build/orm/tutorial.rst
@@ -789,7 +789,7 @@ Here's a rundown of some of the most common operators used in
in_([('ed', 'edsnickname'), ('wendy', 'windy')])
)
-* :meth:`NOT IN <.ColumnOperators.notin_>`::
+* :meth:`NOT IN <.ColumnOperators.not_in>`::
query.filter(~User.name.in_(['ed', 'wendy', 'jack']))
@@ -800,12 +800,12 @@ Here's a rundown of some of the most common operators used in
# alternatively, if pep8/linters are a concern
query.filter(User.name.is_(None))
-* :meth:`IS NOT NULL <.ColumnOperators.isnot>`::
+* :meth:`IS NOT NULL <.ColumnOperators.is_not>`::
query.filter(User.name != None)
# alternatively, if pep8/linters are a concern
- query.filter(User.name.isnot(None))
+ query.filter(User.name.is_not(None))
* :func:`AND <.sql.expression.and_>`::