Skip to content

Commit e00b92f

Browse files
committed
Extract string and dictlib and collections modules into jaraco.text and jaraco.collections packages.
1 parent 9551c38 commit e00b92f

File tree

7 files changed

+18
-1034
lines changed

7 files changed

+18
-1034
lines changed

CHANGES.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ Changes
1313
``jaraco.itertools.always_iterable`` instead.
1414
* Deprecated ``jaraco.util.context``. Functionality moved to
1515
``jaraco.context``.
16+
* Deprecated ``jaraco.util.dictlib`` and ``jaraco.util.collections``.
17+
Functionality has been moved to the ``jaraco.collections`` package.
18+
* Deprecated ``jaraco.util.string``. Functionality moved to the ``jaraco.text``
19+
package.
1620

1721
10.8
1822
~~~~

jaraco/util/cmdline.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
import six
44
from jaraco import meta
5+
from jaraco import text
56

6-
from . import string
77

88
@six.add_metaclass(meta.LeafClassesMeta)
99
class Command(object):
@@ -41,7 +41,7 @@ def add_subparsers(cls, parser):
4141

4242
@classmethod
4343
def add_parser(cls, subparsers):
44-
cmd_string = string.words(cls.__name__).lowered().dash_separated()
44+
cmd_string = text.words(cls.__name__).lowered().dash_separated()
4545
parser = subparsers.add_parser(cmd_string)
4646
parser.set_defaults(action=cls)
4747
cls.add_arguments(parser)

jaraco/util/collections.py

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,7 @@
1-
from __future__ import absolute_import
1+
import warnings
22

3-
class Everything(object):
4-
"""
5-
A collection "containing" every possibly thing.
3+
from jaraco.collections import Everything
64

7-
>>> 'foo' in Everything()
8-
True
5+
__all__ = ['Everything']
96

10-
>>> import random
11-
>>> random.randint(1, 999) in Everything()
12-
True
13-
"""
14-
def __contains__(self, other):
15-
return True
7+
warnings.warn("Use jaraco.collections package", DeprecationWarning)

0 commit comments

Comments
 (0)