Skip to content

Commit

Permalink
Extract string and dictlib and collections modules into jaraco.text a…
Browse files Browse the repository at this point in the history
…nd jaraco.collections packages.
  • Loading branch information
jaraco committed Feb 16, 2015
1 parent 9551c38 commit e00b92f
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 1,034 deletions.
4 changes: 4 additions & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ Changes
``jaraco.itertools.always_iterable`` instead.
* Deprecated ``jaraco.util.context``. Functionality moved to
``jaraco.context``.
* Deprecated ``jaraco.util.dictlib`` and ``jaraco.util.collections``.
Functionality has been moved to the ``jaraco.collections`` package.
* Deprecated ``jaraco.util.string``. Functionality moved to the ``jaraco.text``
package.

10.8
~~~~
Expand Down
4 changes: 2 additions & 2 deletions jaraco/util/cmdline.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

import six
from jaraco import meta
from jaraco import text

from . import string

@six.add_metaclass(meta.LeafClassesMeta)
class Command(object):
Expand Down Expand Up @@ -41,7 +41,7 @@ def add_subparsers(cls, parser):

@classmethod
def add_parser(cls, subparsers):
cmd_string = string.words(cls.__name__).lowered().dash_separated()
cmd_string = text.words(cls.__name__).lowered().dash_separated()
parser = subparsers.add_parser(cmd_string)
parser.set_defaults(action=cls)
cls.add_arguments(parser)
Expand Down
16 changes: 4 additions & 12 deletions jaraco/util/collections.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,7 @@
from __future__ import absolute_import
import warnings

class Everything(object):
"""
A collection "containing" every possibly thing.
from jaraco.collections import Everything

>>> 'foo' in Everything()
True
__all__ = ['Everything']

>>> import random
>>> random.randint(1, 999) in Everything()
True
"""
def __contains__(self, other):
return True
warnings.warn("Use jaraco.collections package", DeprecationWarning)
Loading

0 comments on commit e00b92f

Please sign in to comment.