summaryrefslogtreecommitdiff
path: root/taskflow/persistence
diff options
context:
space:
mode:
authorJoshua Harlow <harlowja@yahoo-inc.com>2015-07-06 15:31:29 -0700
committerJoshua Harlow <jxharlow@godaddy.com>2016-05-10 15:26:57 -0700
commitafbfe77a7f7bad87c3e95b4f0c94cab84258a5bb (patch)
tree2f27418e05a99cbfd2bad76977152d07067d37f8 /taskflow/persistence
parent3321b22ca81bd0e1d8923abc62db014d07fed9ce (diff)
downloadtaskflow-afbfe77a7f7bad87c3e95b4f0c94cab84258a5bb.tar.gz
Remove deprecated things for 2.0 release
Change-Id: Id9adbc50bd51adc77ce88f698ad0ea2ee63fc5e2
Diffstat (limited to 'taskflow/persistence')
-rw-r--r--taskflow/persistence/backends/impl_memory.py30
-rw-r--r--taskflow/persistence/logbook.py37
2 files changed, 4 insertions, 63 deletions
diff --git a/taskflow/persistence/backends/impl_memory.py b/taskflow/persistence/backends/impl_memory.py
index 879e269..1be48bb 100644
--- a/taskflow/persistence/backends/impl_memory.py
+++ b/taskflow/persistence/backends/impl_memory.py
@@ -20,7 +20,6 @@ import copy
import itertools
import posixpath as pp
-from debtcollector import removals
import fasteners
import six
@@ -193,35 +192,14 @@ class FakeFilesystem(object):
return [selector_func(node, child_node)
for child_node in node.bfs_iter()]
- @removals.removed_kwarg('recursive', version="0.11", removal_version="2.0")
- def ls(self, path, recursive=False):
- """Return list of all children of the given path.
-
- NOTE(harlowja): if ``recursive`` is passed in as truthy then the
- absolute path is **always** returned (not the relative path). If
- ``recursive`` is left as the default or falsey then the
- relative path is **always** returned.
-
- This is documented in bug `1458114`_ and the existing behavior is
- being maintained, to get a recursive version that is absolute (or is
- not absolute) it is recommended to use the :py:meth:`.ls_r` method
- instead.
-
- .. deprecated:: 0.11
-
- In a future release the ``recursive`` keyword argument will
- be removed (so preferring and moving to the :py:meth:`.ls_r` should
- occur earlier rather than later).
-
- .. _1458114: https://bugs.launchpad.net/taskflow/+bug/1458114
- """
+ def ls(self, path, absolute=False):
+ """Return list of all children of the given path (not recursive)."""
node = self._fetch_node(path)
- if recursive:
+ if absolute:
selector_func = self._metadata_path_selector
- child_node_it = node.bfs_iter()
else:
selector_func = self._up_to_root_selector
- child_node_it = iter(node)
+ child_node_it = iter(node)
return [selector_func(node, child_node)
for child_node in child_node_it]
diff --git a/taskflow/persistence/logbook.py b/taskflow/persistence/logbook.py
deleted file mode 100644
index 829f6ba..0000000
--- a/taskflow/persistence/logbook.py
+++ /dev/null
@@ -1,37 +0,0 @@
-# -*- coding: utf-8 -*-
-
-# Copyright (C) 2015 Yahoo! Inc. All Rights Reserved.
-#
-# Licensed under the Apache License, Version 2.0 (the "License"); you may
-# not use this file except in compliance with the License. You may obtain
-# a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-# License for the specific language governing permissions and limitations
-# under the License.
-
-from debtcollector import removals
-
-from taskflow.persistence import models
-
-
-# TODO(harlowja): remove me in a future version, since the models
-# module is more appropriately named to what the objects in it are used for...
-removals.removed_module(__name__, replacement="'%s'" % models.__name__,
- version="1.15", removal_version='2.0',
- stacklevel=4)
-
-
-# Keep alias classes/functions... around until this module is removed.
-LogBook = models.LogBook
-FlowDetail = models.FlowDetail
-AtomDetail = models.AtomDetail
-TaskDetail = models.TaskDetail
-RetryDetail = models.RetryDetail
-atom_detail_type = models.atom_detail_type
-atom_detail_class = models.atom_detail_class
-ATOM_TYPES = models.ATOM_TYPES