Skip to content

Commit

Permalink
Remove deprecated has_any_changes function
Browse files Browse the repository at this point in the history
  • Loading branch information
kvesteri committed Nov 13, 2014
1 parent 3da0f87 commit 0d2efa1
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 60 deletions.
1 change: 1 addition & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Here you can see the full list of changes between each SQLAlchemy-Utils release.
^^^^^^^^^^^^^^^^^^^

- Added is_loaded utility function
- Removed deprecated has_any_changes


0.27.7 (2014-11-03)
Expand Down
4 changes: 1 addition & 3 deletions sqlalchemy_utils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
get_referencing_foreign_keys,
get_tables,
group_foreign_keys,
has_any_changes,
has_changes,
has_index,
has_unique_index,
Expand Down Expand Up @@ -80,7 +79,7 @@
from .models import Timestamp


__version__ = '0.27.7'
__version__ = '0.27.8'


__all__ = (
Expand Down Expand Up @@ -114,7 +113,6 @@
get_referencing_foreign_keys,
get_tables,
group_foreign_keys,
has_any_changes,
has_changes,
has_index,
identity,
Expand Down
2 changes: 0 additions & 2 deletions sqlalchemy_utils/functions/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
get_query_entities,
get_tables,
getdotattr,
has_any_changes,
has_changes,
identity,
is_loaded,
Expand Down Expand Up @@ -63,7 +62,6 @@
'get_tables',
'getdotattr',
'group_foreign_keys',
'has_any_changes',
'has_changes',
'identity',
'is_loaded',
Expand Down
31 changes: 0 additions & 31 deletions sqlalchemy_utils/functions/orm.py
Original file line number Diff line number Diff line change
Expand Up @@ -724,37 +724,6 @@ def has_changes(obj, attrs=None, exclude=None):
)


def has_any_changes(obj, columns):
"""
Simple shortcut function for checking if any of the given attributes of
given declarative model object have changes.
::
from sqlalchemy_utils import has_any_changes
user = User()
has_any_changes(user, ('name', )) # False
user.name = u'someone'
has_any_changes(user, ('name', 'age')) # True
.. versionadded: 0.26.3
.. deprecated:: 0.26.6
User :func:`has_changes` instead.
:param obj: SQLAlchemy declarative model object
:param attrs: Names of the attributes
"""
return any(has_changes(obj, column) for column in columns)


def is_loaded(obj, prop):
"""
Return whether or not given property of given object has been loaded.
Expand Down
24 changes: 0 additions & 24 deletions tests/functions/test_has_any_changes.py

This file was deleted.

0 comments on commit 0d2efa1

Please sign in to comment.