summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/sql/operators.py
diff options
context:
space:
mode:
authorFederico Caselli <cfederico87@gmail.com>2021-10-30 22:00:25 +0200
committerMike Bayer <mike_mp@zzzcomputing.com>2021-11-01 15:11:25 -0400
commit36e7aebd8d6faac77570403e99f9aa7b2330fa59 (patch)
treef45950f61a4b27f128518be52157021ca4f4e8f7 /lib/sqlalchemy/sql/operators.py
parenta99ea884403de1e1f762e9b1eb635d7fc6ef8e6f (diff)
downloadsqlalchemy-36e7aebd8d6faac77570403e99f9aa7b2330fa59.tar.gz
First round of removal of python 2
References: #4600 Change-Id: I61e35bc93fe95610ae75b31c18a3282558cd4ffe
Diffstat (limited to 'lib/sqlalchemy/sql/operators.py')
-rw-r--r--lib/sqlalchemy/sql/operators.py27
1 files changed, 2 insertions, 25 deletions
diff --git a/lib/sqlalchemy/sql/operators.py b/lib/sqlalchemy/sql/operators.py
index 695e086b8..b64bea07a 100644
--- a/lib/sqlalchemy/sql/operators.py
+++ b/lib/sqlalchemy/sql/operators.py
@@ -33,12 +33,6 @@ from operator import truediv
from .. import util
-if util.py2k:
- from operator import div
-else:
- div = truediv
-
-
class Operators(object):
"""Base of comparison and logical operators.
@@ -1130,14 +1124,6 @@ class ColumnOperators(Operators):
"""
return self.reverse_operate(mul, other)
- def __rdiv__(self, other):
- """Implement the ``/`` operator in reverse.
-
- See :meth:`.ColumnOperators.__div__`.
-
- """
- return self.reverse_operate(div, other)
-
def __rmod__(self, other):
"""Implement the ``%`` operator in reverse.
@@ -1223,14 +1209,6 @@ class ColumnOperators(Operators):
"""
return self.operate(mul, other)
- def __div__(self, other):
- """Implement the ``/`` operator.
-
- In a column context, produces the clause ``a / b``.
-
- """
- return self.operate(div, other)
-
def __mod__(self, other):
"""Implement the ``%`` operator.
@@ -1240,7 +1218,7 @@ class ColumnOperators(Operators):
return self.operate(mod, other)
def __truediv__(self, other):
- """Implement the ``//`` operator.
+ """Implement the ``/`` operator.
In a column context, produces the clause ``a / b``.
@@ -1248,7 +1226,7 @@ class ColumnOperators(Operators):
return self.operate(truediv, other)
def __rtruediv__(self, other):
- """Implement the ``//`` operator in reverse.
+ """Implement the ``/`` operator in reverse.
See :meth:`.ColumnOperators.__truediv__`.
@@ -1610,7 +1588,6 @@ _PRECEDENCE = {
json_path_getitem_op: 15,
mul: 8,
truediv: 8,
- div: 8,
mod: 8,
neg: 8,
add: 7,