diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2019-12-29 02:09:04 -0500 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2019-12-29 02:09:04 -0500 |
commit | b59f87e6185b26e286147316c20022df4d729f77 (patch) | |
tree | 4e112168f5738da7727ed636cb5a58c1d21d8630 /lib/sqlalchemy/sql/dml.py | |
parent | 92fd25f3e1f69b6fbdc3b2bbd81508a01a2668b3 (diff) | |
download | sqlalchemy-b59f87e6185b26e286147316c20022df4d729f77.tar.gz |
De-implement non-working / testing copy_internals from dml
The DML constructs will need to have traverse_internals
symbols set up; as there are currently non-working /non-used
_copy_internals methods, just remove these for now as they
are unlikely to be working correctly in any case.
Additionally remove an errant "return" statement noted
on the same issue from the MySQL dialect.
Fixes: #5060
Change-Id: I289005af04192e4c755d53244b1ea0711c266c6c
Diffstat (limited to 'lib/sqlalchemy/sql/dml.py')
-rw-r--r-- | lib/sqlalchemy/sql/dml.py | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/lib/sqlalchemy/sql/dml.py b/lib/sqlalchemy/sql/dml.py index 66e92a63c..8b62e57e1 100644 --- a/lib/sqlalchemy/sql/dml.py +++ b/lib/sqlalchemy/sql/dml.py @@ -15,7 +15,6 @@ from .base import _from_objects from .base import _generative from .base import DialectKWArgs from .base import Executable -from .elements import _clone from .elements import and_ from .elements import ClauseElement from .elements import Null @@ -204,6 +203,9 @@ class UpdateBase( self._hints = self._hints.union({(selectable, dialect_name): text}) + def _copy_internals(self, **kw): + raise NotImplementedError() + class ValuesBase(UpdateBase): """Supplies support for :meth:`.ValuesBase.values` to @@ -623,12 +625,6 @@ class Insert(ValuesBase): self.include_insert_from_select_defaults = include_defaults self.select = coercions.expect(roles.DMLSelectRole, select) - def _copy_internals(self, clone=_clone, **kw): - # TODO: coverage - self.parameters = self.parameters.copy() - if self.select is not None: - self.select = _clone(self.select) - class Update(ValuesBase): """Represent an Update construct. @@ -785,11 +781,6 @@ class Update(ValuesBase): else: return () - def _copy_internals(self, clone=_clone, **kw): - # TODO: coverage - self._whereclause = clone(self._whereclause, **kw) - self.parameters = self.parameters.copy() - @_generative def where(self, whereclause): """return a new update() construct with the given expression added to @@ -921,7 +912,3 @@ class Delete(UpdateBase): seen.update(item._cloned_set) return froms - - def _copy_internals(self, clone=_clone, **kw): - # TODO: coverage - self._whereclause = clone(self._whereclause, **kw) |