Repository: crsmithdev/arrow
Pull request #521 (2018-03-11 18:29:56)

Include ZZZ in format example as a hint
Takes @smontanaro documentation tweak from https://github.com/crsmithdev/arrow/pull/485.


Patch:
diff --git a/.gitignore b/.gitignore
index ae9b3e3..56d9632 100644
--- a/.gitignore
+++ b/.gitignore
@@ -10,11 +10,8 @@
 
 .coverage
 nosetests.xml
-tests/.noseids
 
-.venv/
 local/
-build/
 dist/
 docs/_build/
 .idea
@@ -22,6 +19,3 @@ docs/_build/
 
 # tox
 .tox
-
-# VS Code
-.vscode/
diff --git a/HISTORY.md b/HISTORY.md
index 84e1e32..e8d4dea 100644
--- a/HISTORY.md
+++ b/HISTORY.md
@@ -1,19 +1,5 @@
 ## History
 
-### 0.12.0
-
-- [FIX] Compatibility fix for Python 2.x
-
-### 0.11.0
-
-- [FIX] Fix grammar of ArabicLocale
-- [NEW] Add Nepali Locale
-- [FIX] Fix month name + rename AustriaLocale -> AustrianLocale
-- [FIX] Fix typo in Basque Locale
-- [FIX] Fix grammar in PortugueseBrazilian locale
-- [FIX] Remove pip --user-mirrors flag
-- [NEW] Add Indonesian Locale
-
 ### 0.10.0
 
 - [FIX] Fix getattr off by one for quarter
@@ -31,9 +17,9 @@
 - [FIX] respect limit even if end is defined range
 - [FIX] Separate replace & shift functions
 - [NEW] Added tox
-- [FIX] Fix supported Python versions in documentation
+- [FIX] Fix supported Python versions in documentation 
 - [NEW] Azerbaijani locale added, locale issue fixed in Turkish.
-- [FIX] Format ParserError's raise message
+- [FIX] Format ParserError's raise message 
 
 ### 0.8.0
 
@@ -44,13 +30,13 @@
 - [NEW] Esperanto locale (batisteo)
 
 
-### 0.7.0
+### 0.7.0 
 - [FIX] Parse localized strings #228 (swistakm)
 - [FIX] Modify tzinfo parameter in `get` api #221 (bottleimp)
 - [FIX] Fix Czech locale (PrehistoricTeam)
 - [FIX] Raise TypeError when adding/subtracting non-dates (itsmeolivia)
 - [FIX] Fix pytz conversion error (Kudo)
-- [FIX] Fix overzealous time truncation in span_range (kdeldycke)
+- [FIX] Fix overzealous time truncation in span_range (kdeldycke) 
 - [NEW] Humanize for time duration #232 (ybrs)
 - [NEW] Add Thai locale (sipp11)
 - [NEW] Adding Belarusian (be) locale (oire)
@@ -176,15 +162,15 @@
 - [FIX] Locale day-of-week is no longer off by one (Cynddl)
 - [FIX] Corrected plurals of Ukrainian and Russian nouns (Catchagain)
 - [CHANGE] Old 0.1 ``arrow`` module method removed
-- [CHANGE] Dropped timestamp support in ``range`` and ``span_range`` (never worked correctly)
-- [CHANGE] Dropped parsing of single string as tz string in factory ``get`` method (replaced by ISO-8601)
+- [CHANGE] Dropped timestamp support in ``range`` and ``span_range`` (never worked correctly) 
+- [CHANGE] Dropped parsing of single string as tz string in factory ``get`` method (replaced by ISO-8601) 
 
 ### 0.3.5
 
 - [NEW] French locale (Cynddl)
 - [NEW] Spanish locale (Slapresta)
 - [FIX] Ranges handle multiple timezones correctly (Ftobia)
-
+ 
 ### 0.3.4
 
 - [FIX] Humanize no longer sometimes returns the wrong month delta
@@ -196,7 +182,7 @@
 - [NEW] Initial support for locale-based parsing and formatting
 - [NEW] ArrowFactory class, now proxied as the module API
 - [NEW] ``factory`` api method to obtain a factory for a custom type
-- [FIX] Python 3 support and tests completely ironed out
+- [FIX] Python 3 support and tests completely ironed out 
 
 ### 0.3.2
 
@@ -226,7 +212,7 @@
 - [NEW] Date parsing
 - [NEW] Date formatting
 - [NEW] ``floor``, ``ceil`` and ``span`` methods
-- [NEW] ``datetime`` interface implementation
+- [NEW] ``datetime`` interface implementation 
 - [NEW] ``clone`` method
 - [NEW] ``get``, ``now`` and ``utcnow`` API methods
 
diff --git a/arrow/__init__.py b/arrow/__init__.py
index 86ccb69..63dd6be 100644
--- a/arrow/__init__.py
+++ b/arrow/__init__.py
@@ -4,5 +4,5 @@ from .arrow import Arrow
 from .factory import ArrowFactory
 from .api import get, now, utcnow
 
-__version__ = '0.12.1'
+__version__ = '0.10.0'
 VERSION = __version__
diff --git a/arrow/api.py b/arrow/api.py
index f23f273..8373145 100644
--- a/arrow/api.py
+++ b/arrow/api.py
@@ -21,9 +21,6 @@ def get(*args, **kwargs):
 
     return _factory.get(*args, **kwargs)
 
-get.__doc__ = _factory.get.__doc__
-
-
 def utcnow():
     ''' Calls the default :class:`ArrowFactory <arrow.factory.ArrowFactory>` ``utcnow`` method.
 
@@ -31,8 +28,6 @@ def utcnow():
 
     return _factory.utcnow()
 
-utcnow.__doc__ = _factory.utcnow.__doc__
-
 
 def now(tz=None):
     ''' Calls the default :class:`ArrowFactory <arrow.factory.ArrowFactory>` ``now`` method.
@@ -41,8 +36,6 @@ def now(tz=None):
 
     return _factory.now(tz)
 
-now.__doc__ = _factory.now.__doc__
-
 
 def factory(type):
     ''' Returns an :class:`.ArrowFactory` for the specified :class:`Arrow <arrow.arrow.Arrow>`
@@ -54,4 +47,6 @@ def factory(type):
 
     return ArrowFactory(type)
 
+
 __all__ = ['get', 'utcnow', 'now', 'factory']
+
diff --git a/arrow/arrow.py b/arrow/arrow.py
index 7dba85b..7cd5dcb 100644
--- a/arrow/arrow.py
+++ b/arrow/arrow.py
@@ -62,7 +62,7 @@ class Arrow(object):
 
         if util.isstr(tzinfo):
             tzinfo = parser.TzinfoParser.parse(tzinfo)
-        tzinfo = tzinfo if tzinfo is not None else dateutil_tz.tzutc()
+        tzinfo = tzinfo or dateutil_tz.tzutc()
 
         self._datetime = datetime(year, month, day, hour, minute, second,
             microsecond, tzinfo)
@@ -79,8 +79,8 @@ class Arrow(object):
 
         '''
 
-        tzinfo = tzinfo if tzinfo is not None else dateutil_tz.tzlocal()
-        dt = datetime.now(tzinfo)
+        utc = datetime.utcnow().replace(tzinfo=dateutil_tz.tzutc())
+        dt = utc.astimezone(dateutil_tz.tzlocal() if tzinfo is None else tzinfo)
 
         return cls(dt.year, dt.month, dt.day, dt.hour, dt.minute, dt.second,
             dt.microsecond, dt.tzinfo)
@@ -92,10 +92,10 @@ class Arrow(object):
 
         '''
 
-        dt = datetime.now(dateutil_tz.tzutc())
+        dt = datetime.utcnow()
 
         return cls(dt.year, dt.month, dt.day, dt.hour, dt.minute, dt.second,
-            dt.microsecond, dt.tzinfo)
+            dt.microsecond, dateutil_tz.tzutc())
 
     @classmethod
     def fromtimestamp(cls, timestamp, tzinfo=None):
@@ -112,7 +112,7 @@ class Arrow(object):
 
         '''
 
-        tzinfo = tzinfo if tzinfo is not None else dateutil_tz.tzlocal()
+        tzinfo = tzinfo or dateutil_tz.tzlocal()
         timestamp = cls._get_timestamp_from_input(timestamp)
         dt = datetime.fromtimestamp(timestamp, tzinfo)
 
@@ -151,11 +151,7 @@ class Arrow(object):
 
         '''
 
-        if tzinfo is None:
-            if dt.tzinfo is None:
-                tzinfo = dateutil_tz.tzutc()
-            else:
-                tzinfo = dt.tzinfo
+        tzinfo = tzinfo or dt.tzinfo or dateutil_tz.tzutc()
 
         return cls(dt.year, dt.month, dt.day, dt.hour, dt.minute, dt.second,
             dt.microsecond, tzinfo)
@@ -169,7 +165,7 @@ class Arrow(object):
         :param tzinfo: (optional) A :ref:`timezone expression <tz-expr>`.  Defaults to UTC.
         '''
 
-        tzinfo = tzinfo if tzinfo is not None else dateutil_tz.tzutc()
+        tzinfo = tzinfo or dateutil_tz.tzutc()
 
         return cls(date.year, date.month, date.day, tzinfo=tzinfo)
 
@@ -186,21 +182,20 @@ class Arrow(object):
         '''
 
         dt = datetime.strptime(date_str, fmt)
-        tzinfo = tzinfo if tzinfo is not None else dt.tzinfo
+        tzinfo = tzinfo or dt.tzinfo
 
         return cls(dt.year, dt.month, dt.day, dt.hour, dt.minute, dt.second,
-                   dt.microsecond, tzinfo)
+            dt.microsecond, tzinfo)
 
 
     # factories: ranges and spans
 
     @classmethod
-    @util.list_to_iter_deprecation
     def range(cls, frame, start, end=None, tz=None, limit=None):
-        ''' Returns an iterator of :class:`Arrow <arrow.arrow.Arrow>` objects, representing
-        points in time between two inputs.
+        ''' Returns a list of :class:`Arrow <arrow.arrow.Arrow>` objects, representing
+        an iteration of time between two inputs.
 
-        :param frame: The timeframe.  Can be any ``datetime`` property (day, hour, minute...).
+        :param frame: the timeframe.  Can be any ``datetime`` property (day, hour, minute...).
         :param start: A datetime expression, the start of the range.
         :param end: (optional) A datetime expression, the end of the range.
         :param tz: (optional) A :ref:`timezone expression <tz-expr>`.  Defaults to
@@ -235,7 +230,7 @@ class Arrow(object):
             <Arrow [2013-05-05T15:30:00+00:00]>
             <Arrow [2013-05-05T16:30:00+00:00]>
 
-        **NOTE**: Unlike Python's ``range``, ``end`` *may* be included in the returned iterator::
+        **NOTE**: Unlike Python's ``range``, ``end`` *may* be included in the returned list::
 
             >>> start = datetime(2013, 5, 5, 12, 30)
             >>> end = datetime(2013, 5, 5, 13, 30)
@@ -256,23 +251,23 @@ class Arrow(object):
         end = cls._get_datetime(end).replace(tzinfo=tzinfo)
 
         current = cls.fromdatetime(start)
-        i = 0
+        results = []
 
-        while current <= end and i < limit:
-            i += 1
-            yield current
+        while current <= end and len(results) < limit:
+            results.append(current)
 
             values = [getattr(current, f) for f in cls._ATTRS]
             current = cls(*values, tzinfo=tzinfo) + relativedelta(**{frame_relative: relative_steps})
 
+        return results
+
 
     @classmethod
-    @util.list_to_iter_deprecation
     def span_range(cls, frame, start, end, tz=None, limit=None):
-        ''' Returns an iterator of tuples, each :class:`Arrow <arrow.arrow.Arrow>` objects,
+        ''' Returns a list of tuples, each :class:`Arrow <arrow.arrow.Arrow>` objects,
         representing a series of timespans between two inputs.
 
-        :param frame: The timeframe.  Can be any ``datetime`` property (day, hour, minute...).
+        :param frame: the timeframe.  Can be any ``datetime`` property (day, hour, minute...).
         :param start: A datetime expression, the start of the range.
         :param end: (optional) A datetime expression, the end of the range.
         :param tz: (optional) A :ref:`timezone expression <tz-expr>`.  Defaults to
@@ -294,8 +289,8 @@ class Arrow(object):
             - An :class:`Arrow <arrow.arrow.Arrow>` object.
             - A ``datetime`` object.
 
-        **NOTE**: Unlike Python's ``range``, ``end`` will *always* be included in the returned
-        iterator of timespans.
+        **NOTE**: Unlike Python's ``range``, ``end`` will *always* be included in the returned list
+        of timespans.
 
         Usage:
 
@@ -316,20 +311,19 @@ class Arrow(object):
         tzinfo = cls._get_tzinfo(start.tzinfo if tz is None else tz)
         start = cls.fromdatetime(start, tzinfo).span(frame)[0]
         _range = cls.range(frame, start, end, tz, limit)
-        return (r.span(frame) for r in _range)
+        return [r.span(frame) for r in _range]
 
     @classmethod
-    @util.list_to_iter_deprecation
     def interval(cls, frame, start, end, interval=1, tz=None):
-        ''' Returns an iterator of tuples, each :class:`Arrow <arrow.arrow.Arrow>` objects,
+        ''' Returns an array of tuples, each :class:`Arrow <arrow.arrow.Arrow>` objects,
         representing a series of intervals between two inputs.
 
-        :param frame: The timeframe.  Can be any ``datetime`` property (day, hour, minute...).
+        :param frame: the timeframe.  Can be any ``datetime`` property (day, hour, minute...).
         :param start: A datetime expression, the start of the range.
         :param end: (optional) A datetime expression, the end of the range.
         :param interval: (optional) Time interval for the given time frame.
         :param tz: (optional) A timezone expression.  Defaults to UTC.
-
+        
         Supported frame values: year, quarter, month, week, day, hour, minute, second
 
         Recognized datetime expressions:
@@ -358,12 +352,10 @@ class Arrow(object):
         if interval < 1:
             raise ValueError("interval has to be a positive integer")
 
-        spanRange = iter(cls.span_range(frame, start, end, tz))
-        while True:
-            intvlStart, intvlEnd = next(spanRange)  # StopIteration when exhausted
-            for _ in range(interval-1):
-                _, intvlEnd = next(spanRange)  # StopIteration when exhausted
-            yield intvlStart, intvlEnd
+        spanRange = cls.span_range(frame,start,end,tz)
+
+        bound = (len(spanRange) // interval) * interval
+        return [ (spanRange[i][0],spanRange[i+ interval - 1][1]) for i in range(0,bound, interval) ]
 
     # representations
 
@@ -750,43 +742,43 @@ class Arrow(object):
         sign = -1 if delta < 0 else 1
         diff = abs(delta)
         delta = diff
-
+        
         if granularity=='auto':
             if diff < 10:
                 return locale.describe('now', only_distance=only_distance)
-
+    
             if diff < 45:
                 seconds = sign * delta
                 return locale.describe('seconds', seconds, only_distance=only_distance)
-
+    
             elif diff < 90:
                 return locale.describe('minute', sign, only_distance=only_distance)
             elif diff < 2700:
                 minutes = sign * int(max(delta / 60, 2))
                 return locale.describe('minutes', minutes, only_distance=only_distance)
-
+    
             elif diff < 5400:
                 return locale.describe('hour', sign, only_distance=only_distance)
             elif diff < 79200:
                 hours = sign * int(max(delta / 3600, 2))
                 return locale.describe('hours', hours, only_distance=only_distance)
-
+    
             elif diff < 129600:
                 return locale.describe('day', sign, only_distance=only_distance)
             elif diff < 2160000:
                 days = sign * int(max(delta / 86400, 2))
                 return locale.describe('days', days, only_distance=only_distance)
-
+    
             elif diff < 3888000:
                 return locale.describe('month', sign, only_distance=only_distance)
             elif diff < 29808000:
                 self_months = self._datetime.year * 12 + self._datetime.month
                 other_months = dt.year * 12 + dt.month
-
+    
                 months = sign * int(max(abs(other_months - self_months), 2))
-
+    
                 return locale.describe('months', months, only_distance=only_distance)
-
+    
             elif diff < 47260800:
                 return locale.describe('year', sign, only_distance=only_distance)
             else:
@@ -810,11 +802,11 @@ class Arrow(object):
                 delta = sign * delta / float(60*60*24*365.25)
             else:
                 raise AttributeError('Error. Could not understand your level of granularity. Please select between \
-                "second", "minute", "hour", "day", "week", "month" or "year"')
-
+                "second", "minute", "hour", "day", "week", "month" or "year"') 
+            
             if(trunc(abs(delta)) != 1):
                 granularity += 's'
-            return locale.describe(granularity, delta, only_distance=only_distance)
+            return locale.describe(granularity, delta, only_distance=False)
     # math
 
     def __add__(self, other):
@@ -837,7 +829,7 @@ class Arrow(object):
 
         elif isinstance(other, Arrow):
             return self._datetime - other._datetime
-
+        
         raise TypeError()
 
     def __rsub__(self, other):
diff --git a/arrow/factory.py b/arrow/factory.py
index 29a7033..ac204e4 100644
--- a/arrow/factory.py
+++ b/arrow/factory.py
@@ -112,8 +112,8 @@ class ArrowFactory(object):
 
         **Two** arguments, both ``str``, to parse the first according to the format of the second::
 
-            >>> arrow.get('2013-05-05 12:30:45', 'YYYY-MM-DD HH:mm:ss')
-            <Arrow [2013-05-05T12:30:45+00:00]>
+            >>> arrow.get('2013-05-05 12:30:45 America/Chicago', 'YYYY-MM-DD HH:mm:ss ZZZ')
+            <Arrow [2013-05-05T12:30:45-05:00]>
 
         **Two** arguments, first a ``str`` to parse and second a ``list`` of formats to try::
 
@@ -172,7 +172,7 @@ class ArrowFactory(object):
             # (str) -> parse.
             elif isstr(arg):
                 dt = parser.DateTimeParser(locale).parse_iso(arg)
-                return self.type.fromdatetime(dt, tz)
+                return self.type.fromdatetime(dt)
 
             # (struct_time) -> from struct_time
             elif isinstance(arg, struct_time):
diff --git a/arrow/locales.py b/arrow/locales.py
index 35c686e..724a3d1 100644
--- a/arrow/locales.py
+++ b/arrow/locales.py
@@ -186,7 +186,7 @@ class Locale(object):
 
 class EnglishLocale(Locale):
 
-    names = ['en', 'en_us', 'en_gb', 'en_au', 'en_be', 'en_jp', 'en_za', 'en_ca', 'en_ph']
+    names = ['en', 'en_us', 'en_gb', 'en_au', 'en_be', 'en_jp', 'en_za', 'en_ca']
 
     past = '{0} ago'
     future = 'in {0}'
@@ -955,7 +955,7 @@ class BrazilianPortugueseLocale(PortugueseLocale):
 
 class TagalogLocale(Locale):
 
-    names = ['tl', 'tl_ph']
+    names = ['tl']
 
     past = 'nakaraang {0}'
     future = '{0} mula ngayon'
@@ -983,8 +983,6 @@ class TagalogLocale(Locale):
     day_names = ['', 'Lunes', 'Martes', 'Miyerkules', 'Huwebes', 'Biyernes', 'Sabado', 'Linggo']
     day_abbreviations = ['', 'Lun', 'Mar', 'Miy', 'Huw', 'Biy', 'Sab', 'Lin']
 
-    def _ordinal_number(self, n):
-        return 'ika-{0}'.format(n)
 
 class VietnameseLocale(Locale):
 
@@ -2157,43 +2155,5 @@ class NepaliLocale(Locale):
         '', 'सोम', 'मंगल', 'बुध', 'बिहि', 'शुक्र', 'शनि', 'आइत'
     ]
 
-class EstonianLocale(Locale):
-    names = ['ee', 'et']
-
-    past = '{0} tagasi'
-    future = '{0} pärast'
-
-    timeframes = {
-        'now': {'past': 'just nüüd', 'future': 'just nüüd'},
-        'second': {'past': 'üks sekund', 'future': 'ühe sekundi'},
-        'seconds': {'past': '{0} sekundit', 'future': '{0} sekundi'},
-        'minute': {'past': 'üks minut', 'future': 'ühe minuti'},
-        'minutes': {'past': '{0} minutit', 'future': '{0} minuti'},
-        'hour': {'past': 'tund aega', 'future': 'tunni aja'},
-        'hours': {'past': '{0} tundi', 'future': '{0} tunni'},
-        'day': {'past': 'üks päev', 'future': 'ühe päeva'},
-        'days': {'past': '{0} päeva', 'future': '{0} päeva'},
-        'month': {'past': 'üks kuu', 'future': 'ühe kuu'},
-        'months': {'past': '{0} kuud', 'future': '{0} kuu'},
-        'year': {'past': 'üks aasta', 'future': 'ühe aasta'},
-        'years': {'past': '{0} aastat', 'future': '{0} aasta'}
-    }
-
-    month_names = ['', 'Jaanuar', 'Veebruar', 'Märts', 'Aprill', 'Mai', 'Juuni', 'Juuli',
-                   'August', 'September', 'Oktoober', 'November', 'Detsember']
-    month_abbreviations = ['', 'Jan', 'Veb', 'Mär', 'Apr', 'Mai', 'Jun', 'Jul', 'Aug',
-                           'Sep', 'Okt', 'Nov', 'Dets']
-
-    day_names = ['', 'Esmaspäev', 'Teisipäev', 'Kolmapäev', 'Neljapäev', 'Reede', 'Laupäev', 'Pühapäev']
-    day_abbreviations = ['', 'Esm', 'Teis', 'Kolm', 'Nelj', 'Re', 'Lau', 'Püh']
-
-    def _format_timeframe(self, timeframe, delta):
-        form = self.timeframes[timeframe]
-        if delta > 0:
-            form = form['future']
-        else:
-            form = form['past']
-        return form.format(abs(delta))
-    
-    
+ 
 _locales = _map_locales()
diff --git a/arrow/parser.py b/arrow/parser.py
index df8cc1a..e4f368a 100644
--- a/arrow/parser.py
+++ b/arrow/parser.py
@@ -127,11 +127,8 @@ class DateTimeParser(object):
         tokens = []
         offset = 0
 
-        # Escape all special RegEx chars
-        escaped_fmt = re.escape(fmt)
-
         # Extract the bracketed expressions to be reinserted later.
-        escaped_fmt = re.sub(self._ESCAPE_RE, "#", escaped_fmt)
+        escaped_fmt = re.sub(self._ESCAPE_RE, "#", fmt)
         # Any number of S is the same as one.
         escaped_fmt = re.sub('S+', 'S', escaped_fmt)
         escaped_data = re.findall(self._ESCAPE_RE, fmt)
@@ -154,7 +151,7 @@ class DateTimeParser(object):
             offset += len(input_pattern) - (m.end() - m.start())
 
         final_fmt_pattern = ""
-        a = fmt_pattern.split("\#")
+        a = fmt_pattern.split("#")
         b = escaped_data
 
         # Due to the way Python splits, 'a' will always be longer
diff --git a/arrow/util.py b/arrow/util.py
index 088e5df..3eed4fa 100644
--- a/arrow/util.py
+++ b/arrow/util.py
@@ -1,9 +1,7 @@
 # -*- coding: utf-8 -*-
 from __future__ import absolute_import
 
-import functools
 import sys
-import warnings
 
 # python 2.6 / 2.7 definitions for total_seconds function.
 
@@ -46,65 +44,4 @@ except NameError: #pragma: no cover
         return isinstance(s, str)
 
 
-class list_to_iter_shim(list):
-    ''' A temporary shim for functions that currently return a list but that will, after a
-    deprecation period, return an iteratator.
-    '''
-
-    def __init__(self, iterable=(), **kwargs):
-        ''' Equivalent to list(iterable).  warn_text will be emitted on all non-iterator operations.
-        '''
-        self._warn_text = kwargs.pop('warn_text', None) or 'this object will be converted to an iterator in a future release'
-        self._iter_count = 0
-        list.__init__(self, iterable, **kwargs)
-
-    def _warn(self):
-        warnings.warn(self._warn_text, DeprecationWarning)
-
-    def __iter__(self):
-        self._iter_count += 1
-        if self._iter_count > 1:
-            self._warn()
-        return list.__iter__(self)
-
-    def _wrap_method(name):
-        list_func = getattr(list, name)
-        def wrapper(self, *args, **kwargs):
-            self._warn()
-            return list_func(self, *args, **kwargs)
-        return wrapper
-
-    __contains__ = _wrap_method('__contains__')
-    __add__ = _wrap_method('__add__')
-    __mul__ = _wrap_method('__mul__')
-    __getitem__ = _wrap_method('__getitem__')
-    # Ideally, we would throw warnings from  __len__, but list(x) calls len(x)
-    index = _wrap_method('index')
-    count = _wrap_method('count')
-    __setitem__ = _wrap_method('__setitem__')
-    __delitem__ = _wrap_method('__delitem__')
-    append = _wrap_method('append')
-    if version >= '3.0':  # pragma: no cover
-        clear = _wrap_method('clear')
-        copy = _wrap_method('copy')
-    extend = _wrap_method('extend')
-    __iadd__ = _wrap_method('__iadd__')
-    __imul__ = _wrap_method('__imul__')
-    insert = _wrap_method('insert')
-    pop = _wrap_method('pop')
-    remove = _wrap_method('remove')
-    reverse = _wrap_method('reverse')
-    sort = _wrap_method('sort')
-
-    del _wrap_method
-
-
-def list_to_iter_deprecation(f):
-    warn_text = '{0}() will return an iterator in a future release, convert to list({0}())'.format(f.__name__)
-    @functools.wraps(f)
-    def wrapper(*args, **kwargs):
-        return list_to_iter_shim(f(*args, **kwargs), warn_text=warn_text)
-    return wrapper
-
-
-__all__ = ['total_seconds', 'is_timestamp', 'isstr', 'list_to_iter_shim', 'list_to_iter_deprecation']
+__all__ = ['total_seconds', 'is_timestamp', 'isstr']
diff --git a/setup.py b/setup.py
index 933e122..a48aa91 100644
--- a/setup.py
+++ b/setup.py
@@ -1,7 +1,6 @@
 import codecs
 import os.path
 import re
-import sys
 
 try:
     from setuptools import setup
@@ -38,11 +37,8 @@ setup(
     packages=['arrow'],
     zip_safe=False,
     install_requires=[
-        'python-dateutil',
+        'python-dateutil'
     ],
-    extras_require={
-        ":python_version=='2.7'": ['backports.functools_lru_cache>=1.2.1'],
-    },
     test_suite="tests",
     classifiers=[
         'Development Status :: 4 - Beta',


Test patch:
diff --git a/tests/arrow_tests.py b/tests/arrow_tests.py
index b49b731..e5a8b52 100644
--- a/tests/arrow_tests.py
+++ b/tests/arrow_tests.py
@@ -691,8 +691,8 @@ class ArrowRangeTests(Chai):
 
     def test_year(self):
 
-        result = list(arrow.Arrow.range('year', datetime(2013, 1, 2, 3, 4, 5),
-            datetime(2016, 4, 5, 6, 7, 8)))
+        result = arrow.Arrow.range('year', datetime(2013, 1, 2, 3, 4, 5),
+            datetime(2016, 4, 5, 6, 7, 8))
 
         assertEqual(result, [
             arrow.Arrow(2013, 1, 2, 3, 4, 5),
@@ -703,8 +703,8 @@ class ArrowRangeTests(Chai):
 
     def test_quarter(self):
 
-        result = list(arrow.Arrow.range('quarter', datetime(2013, 2, 3, 4, 5, 6),
-            datetime(2013, 5, 6, 7, 8, 9)))
+        result = arrow.Arrow.range('quarter', datetime(2013, 2, 3, 4, 5, 6),
+            datetime(2013, 5, 6, 7, 8, 9))
 
         assertEqual(result, [
             arrow.Arrow(2013, 2, 3, 4, 5, 6),
@@ -713,8 +713,8 @@ class ArrowRangeTests(Chai):
 
     def test_month(self):
 
-        result = list(arrow.Arrow.range('month', datetime(2013, 2, 3, 4, 5, 6),
-            datetime(2013, 5, 6, 7, 8, 9)))
+        result = arrow.Arrow.range('month', datetime(2013, 2, 3, 4, 5, 6),
+            datetime(2013, 5, 6, 7, 8, 9))
 
         assertEqual(result, [
             arrow.Arrow(2013, 2, 3, 4, 5, 6),
@@ -725,8 +725,8 @@ class ArrowRangeTests(Chai):
 
     def test_week(self):
 
-        result = list(arrow.Arrow.range('week', datetime(2013, 9, 1, 2, 3, 4),
-            datetime(2013, 10, 1, 2, 3, 4)))
+        result = arrow.Arrow.range('week', datetime(2013, 9, 1, 2, 3, 4),
+            datetime(2013, 10, 1, 2, 3, 4))
 
         assertEqual(result, [
             arrow.Arrow(2013, 9, 1, 2, 3, 4),
@@ -738,8 +738,8 @@ class ArrowRangeTests(Chai):
 
     def test_day(self):
 
-        result = list(arrow.Arrow.range('day', datetime(2013, 1, 2, 3, 4, 5),
-            datetime(2013, 1, 5, 6, 7, 8)))
+        result = arrow.Arrow.range('day', datetime(2013, 1, 2, 3, 4, 5),
+            datetime(2013, 1, 5, 6, 7, 8))
 
         assertEqual(result, [
             arrow.Arrow(2013, 1, 2, 3, 4, 5),
@@ -750,8 +750,8 @@ class ArrowRangeTests(Chai):
 
     def test_hour(self):
 
-        result = list(arrow.Arrow.range('hour', datetime(2013, 1, 2, 3, 4, 5),
-            datetime(2013, 1, 2, 6, 7, 8)))
+        result = arrow.Arrow.range('hour', datetime(2013, 1, 2, 3, 4, 5),
+            datetime(2013, 1, 2, 6, 7, 8))
 
         assertEqual(result, [
             arrow.Arrow(2013, 1, 2, 3, 4, 5),
@@ -760,8 +760,8 @@ class ArrowRangeTests(Chai):
             arrow.Arrow(2013, 1, 2, 6, 4, 5),
         ])
 
-        result = list(arrow.Arrow.range('hour', datetime(2013, 1, 2, 3, 4, 5),
-            datetime(2013, 1, 2, 3, 4, 5)))
+        result = arrow.Arrow.range('hour', datetime(2013, 1, 2, 3, 4, 5),
+            datetime(2013, 1, 2, 3, 4, 5))
 
         assertEqual(result, [
             arrow.Arrow(2013, 1, 2, 3, 4, 5),
@@ -769,8 +769,8 @@ class ArrowRangeTests(Chai):
 
     def test_minute(self):
 
-        result = list(arrow.Arrow.range('minute', datetime(2013, 1, 2, 3, 4, 5),
-            datetime(2013, 1, 2, 3, 7, 8)))
+        result = arrow.Arrow.range('minute', datetime(2013, 1, 2, 3, 4, 5),
+            datetime(2013, 1, 2, 3, 7, 8))
 
         assertEqual(result, [
             arrow.Arrow(2013, 1, 2, 3, 4, 5),
@@ -781,8 +781,8 @@ class ArrowRangeTests(Chai):
 
     def test_second(self):
 
-        result = list(arrow.Arrow.range('second', datetime(2013, 1, 2, 3, 4, 5),
-            datetime(2013, 1, 2, 3, 4, 8)))
+        result = arrow.Arrow.range('second', datetime(2013, 1, 2, 3, 4, 5),
+            datetime(2013, 1, 2, 3, 4, 8))
 
         assertEqual(result, [
             arrow.Arrow(2013, 1, 2, 3, 4, 5),
@@ -793,8 +793,8 @@ class ArrowRangeTests(Chai):
 
     def test_arrow(self):
 
-        result = list(arrow.Arrow.range('day', arrow.Arrow(2013, 1, 2, 3, 4, 5),
-            arrow.Arrow(2013, 1, 5, 6, 7, 8)))
+        result = arrow.Arrow.range('day', arrow.Arrow(2013, 1, 2, 3, 4, 5),
+            arrow.Arrow(2013, 1, 5, 6, 7, 8))
 
         assertEqual(result, [
             arrow.Arrow(2013, 1, 2, 3, 4, 5),
@@ -838,14 +838,14 @@ class ArrowRangeTests(Chai):
     def test_unsupported(self):
 
         with assertRaises(AttributeError):
-            next(arrow.Arrow.range('abc', datetime.utcnow(), datetime.utcnow()))
+            arrow.Arrow.range('abc', datetime.utcnow(), datetime.utcnow())
 
 
 class ArrowSpanRangeTests(Chai):
 
     def test_year(self):
 
-        result = list(arrow.Arrow.span_range('year', datetime(2013, 2, 1), datetime(2016, 3, 31)))
+        result = arrow.Arrow.span_range('year', datetime(2013, 2, 1), datetime(2016, 3, 31))
 
         assertEqual(result, [
             (arrow.Arrow(2013, 1, 1), arrow.Arrow(2013, 12, 31, 23, 59, 59, 999999)),
@@ -856,7 +856,7 @@ class ArrowSpanRangeTests(Chai):
 
     def test_quarter(self):
 
-        result = list(arrow.Arrow.span_range('quarter', datetime(2013, 2, 2), datetime(2013, 5, 15)))
+        result = arrow.Arrow.span_range('quarter', datetime(2013, 2, 2), datetime(2013, 5, 15))
 
         assertEqual(result, [
             (arrow.Arrow(2013, 1, 1), arrow.Arrow(2013, 3, 31, 23, 59, 59, 999999)),
@@ -865,7 +865,7 @@ class ArrowSpanRangeTests(Chai):
 
     def test_month(self):
 
-        result = list(arrow.Arrow.span_range('month', datetime(2013, 1, 2), datetime(2013, 4, 15)))
+        result = arrow.Arrow.span_range('month', datetime(2013, 1, 2), datetime(2013, 4, 15))
 
         assertEqual(result, [
             (arrow.Arrow(2013, 1, 1), arrow.Arrow(2013, 1, 31, 23, 59, 59, 999999)),
@@ -876,7 +876,7 @@ class ArrowSpanRangeTests(Chai):
 
     def test_week(self):
 
-        result = list(arrow.Arrow.span_range('week', datetime(2013, 2, 2), datetime(2013, 2, 28)))
+        result = arrow.Arrow.span_range('week', datetime(2013, 2, 2), datetime(2013, 2, 28))
 
         assertEqual(result, [
             (arrow.Arrow(2013, 1, 28), arrow.Arrow(2013, 2, 3, 23, 59, 59, 999999)),
@@ -889,8 +889,8 @@ class ArrowSpanRangeTests(Chai):
 
     def test_day(self):
 
-        result = list(arrow.Arrow.span_range('day', datetime(2013, 1, 1, 12),
-            datetime(2013, 1, 4, 12)))
+        result = arrow.Arrow.span_range('day', datetime(2013, 1, 1, 12),
+            datetime(2013, 1, 4, 12))
 
         assertEqual(result, [
             (arrow.Arrow(2013, 1, 1, 0), arrow.Arrow(2013, 1, 1, 23, 59, 59, 999999)),
@@ -901,8 +901,8 @@ class ArrowSpanRangeTests(Chai):
 
     def test_hour(self):
 
-        result = list(arrow.Arrow.span_range('hour', datetime(2013, 1, 1, 0, 30),
-            datetime(2013, 1, 1, 3, 30)))
+        result = arrow.Arrow.span_range('hour', datetime(2013, 1, 1, 0, 30),
+            datetime(2013, 1, 1, 3, 30))
 
         assertEqual(result, [
             (arrow.Arrow(2013, 1, 1, 0), arrow.Arrow(2013, 1, 1, 0, 59, 59, 999999)),
@@ -911,8 +911,8 @@ class ArrowSpanRangeTests(Chai):
             (arrow.Arrow(2013, 1, 1, 3), arrow.Arrow(2013, 1, 1, 3, 59, 59, 999999)),
         ])
 
-        result = list(arrow.Arrow.span_range('hour', datetime(2013, 1, 1, 3, 30),
-            datetime(2013, 1, 1, 3, 30)))
+        result = arrow.Arrow.span_range('hour', datetime(2013, 1, 1, 3, 30),
+            datetime(2013, 1, 1, 3, 30))
 
         assertEqual(result, [
             (arrow.Arrow(2013, 1, 1, 3), arrow.Arrow(2013, 1, 1, 3, 59, 59, 999999)),
@@ -920,8 +920,8 @@ class ArrowSpanRangeTests(Chai):
 
     def test_minute(self):
 
-        result = list(arrow.Arrow.span_range('minute', datetime(2013, 1, 1, 0, 0, 30),
-            datetime(2013, 1, 1, 0, 3, 30)))
+        result = arrow.Arrow.span_range('minute', datetime(2013, 1, 1, 0, 0, 30),
+            datetime(2013, 1, 1, 0, 3, 30))
 
         assertEqual(result, [
             (arrow.Arrow(2013, 1, 1, 0, 0), arrow.Arrow(2013, 1, 1, 0, 0, 59, 999999)),
@@ -932,8 +932,8 @@ class ArrowSpanRangeTests(Chai):
 
     def test_second(self):
 
-        result = list(arrow.Arrow.span_range('second', datetime(2013, 1, 1),
-            datetime(2013, 1, 1, 0, 0, 3)))
+        result = arrow.Arrow.span_range('second', datetime(2013, 1, 1),
+            datetime(2013, 1, 1, 0, 0, 3))
 
         assertEqual(result, [
             (arrow.Arrow(2013, 1, 1, 0, 0, 0), arrow.Arrow(2013, 1, 1, 0, 0, 0, 999999)),
@@ -992,14 +992,14 @@ class ArrowIntervalTests(Chai):
     def test_incorrect_input(self):
         correct = True
         try:
-            result = list(arrow.Arrow.interval('month', datetime(2013, 1, 2), datetime(2013, 4, 15), 0))
+            result = arrow.Arrow.interval('month', datetime(2013, 1, 2), datetime(2013, 4, 15),0)
         except:
             correct = False
 
         assertEqual(correct,False)
 
     def test_correct(self):
-        result = list(arrow.Arrow.interval('hour', datetime(2013, 5, 5, 12, 30), datetime(2013, 5, 5, 17, 15), 2))
+        result = arrow.Arrow.interval('hour', datetime(2013, 5, 5, 12, 30), datetime(2013, 5, 5, 17, 15),2)
 
         assertEqual(result,[(arrow.Arrow(2013, 5, 5, 12), arrow.Arrow(2013, 5, 5, 13, 59, 59, 999999)),
             (arrow.Arrow(2013, 5, 5, 14), arrow.Arrow(2013, 5, 5, 15, 59, 59, 999999)),
@@ -1116,15 +1116,15 @@ class ArrowHumanizeTests(Chai):
         self.now = arrow.Arrow.utcnow()
 
     def test_granularity(self):
-
+    
         assertEqual(self.now.humanize(granularity = 'second'), 'just now')
-
+        
         later1 = self.now.shift(seconds=1)
         assertEqual(self.now.humanize(later1, granularity = 'second'), 'just now')
         assertEqual(later1.humanize(self.now, granularity = 'second'), 'just now')
         assertEqual(self.now.humanize(later1, granularity = 'minute'), '0 minutes ago')
         assertEqual(later1.humanize(self.now, granularity = 'minute'), 'in 0 minutes')
-
+        
         later100 = self.now.shift(seconds=100)
         assertEqual(self.now.humanize(later100, granularity = 'second'), 'seconds ago')
         assertEqual(later100.humanize(self.now, granularity = 'second'), 'in seconds')
@@ -1132,7 +1132,7 @@ class ArrowHumanizeTests(Chai):
         assertEqual(later100.humanize(self.now, granularity = 'minute'), 'in a minute')
         assertEqual(self.now.humanize(later100, granularity = 'hour'), '0 hours ago')
         assertEqual(later100.humanize(self.now, granularity = 'hour'), 'in 0 hours')
-
+        
         later4000 = self.now.shift(seconds=4000)
         assertEqual(self.now.humanize(later4000, granularity = 'minute'), '66 minutes ago')
         assertEqual(later4000.humanize(self.now, granularity = 'minute'), 'in 66 minutes')
@@ -1140,7 +1140,7 @@ class ArrowHumanizeTests(Chai):
         assertEqual(later4000.humanize(self.now, granularity = 'hour'), 'in an hour')
         assertEqual(self.now.humanize(later4000, granularity = 'day'), '0 days ago')
         assertEqual(later4000.humanize(self.now, granularity = 'day'), 'in 0 days')
-
+        
         later105 = self.now.shift(seconds=10 ** 5)
         assertEqual(self.now.humanize(later105, granularity = 'hour'), '27 hours ago')
         assertEqual(later105.humanize(self.now, granularity = 'hour'), 'in 27 hours')
@@ -1148,7 +1148,7 @@ class ArrowHumanizeTests(Chai):
         assertEqual(later105.humanize(self.now, granularity = 'day'), 'in a day')
         assertEqual(self.now.humanize(later105, granularity = 'month'), '0 months ago')
         assertEqual(later105.humanize(self.now, granularity = 'month'), 'in 0 months')
-
+        
         later106 = self.now.shift(seconds=3 * 10 ** 6)
         assertEqual(self.now.humanize(later106, granularity = 'day'), '34 days ago')
         assertEqual(later106.humanize(self.now, granularity = 'day'), 'in 34 days')
@@ -1156,23 +1156,19 @@ class ArrowHumanizeTests(Chai):
         assertEqual(later106.humanize(self.now, granularity = 'month'), 'in a month')
         assertEqual(self.now.humanize(later106, granularity = 'year'), '0 years ago')
         assertEqual(later106.humanize(self.now, granularity = 'year'), 'in 0 years')
-
+        
         later506 = self.now.shift(seconds=50 * 10 ** 6)
         assertEqual(self.now.humanize(later506, granularity = 'month'), '18 months ago')
         assertEqual(later506.humanize(self.now, granularity = 'month'), 'in 18 months')
         assertEqual(self.now.humanize(later506, granularity = 'year'), 'a year ago')
         assertEqual(later506.humanize(self.now, granularity = 'year'), 'in a year')
-
+        
         later108 = self.now.shift(seconds=10 ** 8)
         assertEqual(self.now.humanize(later108, granularity = 'year'), '3 years ago')
         assertEqual(later108.humanize(self.now, granularity = 'year'), 'in 3 years')
-
-        later108onlydistance = self.now.shift(seconds=10 ** 8)
-        assertEqual(self.now.humanize(later108onlydistance , only_distance=True, granularity = 'year'), '3 years')
-        assertEqual(later108onlydistance .humanize(self.now, only_distance=True, granularity = 'year'), '3 years')
         with assertRaises(AttributeError):
             self.now.humanize(later108, granularity = 'years')
-
+    
     def test_seconds(self):
 
         later = self.now.shift(seconds=10)
@@ -1405,64 +1401,3 @@ class ArrowUtilTests(Chai):
 
         with assertRaises(Exception):
             arrow.Arrow._get_iteration_params(None, None)
-
-    def test_list_to_iter_shim(self):
-        def newshim():
-            return util.list_to_iter_shim(range(5), warn_text='testing')
-
-        # Iterating over a shim once should not throw a warning
-        with warnings.catch_warnings(record=True) as w:
-            warnings.simplefilter("always")
-
-            iter(newshim())
-            list(newshim())
-            for _ in newshim(): pass
-            len(newshim())  # ...because it's called by `list(x)`
-
-            assertEqual([], w)
-
-        # Iterating over a shim twice (or more) should throw a warning
-        with warnings.catch_warnings(record=True) as w:
-            warnings.simplefilter("always")
-            shim = newshim()
-
-            for _ in shim: pass
-            for _ in shim: pass
-
-            assertEqual(1, len(w))
-            assertEqual(w[0].category, DeprecationWarning)
-            assertEqual("testing", w[0].message.args[0])
-
-        with warnings.catch_warnings(record=True) as w:
-            warnings.simplefilter("always")
-            shim = newshim()
-
-            0 in shim
-            shim + []
-            shim * 1
-            shim[0]
-            shim.index(0)
-            shim.count(0)
-
-            shim[0:0] = []  # doesn't warn on py2
-            del shim[0:0]  # doesn't warn on py2
-            newshim().append(6)
-            if util.version >= '3.0':  # pragma: no cover
-                newshim().clear()
-                shim.copy()
-            shim.extend([])
-            shim += []
-            shim *= 1
-            newshim().insert(0, 6)
-            shim.pop(-1)
-            newshim().remove(0)
-            newshim().reverse()
-            newshim().sort()
-
-            if util.version >= '3.0':  # pragma: no cover
-                assertEqual(19, len(w))
-            else:  # pragma: no cover
-                assertEqual(15, len(w))
-            for warn in w:
-                assertEqual(warn.category, DeprecationWarning)
-                assertEqual("testing", warn.message.args[0])
diff --git a/tests/factory_tests.py b/tests/factory_tests.py
index 378c0f5..6b53957 100644
--- a/tests/factory_tests.py
+++ b/tests/factory_tests.py
@@ -149,12 +149,6 @@ class GetTests(Chai):
 
         assertEqual(result._datetime, datetime(2013, 1, 1, tzinfo=tz.tzutc()))
 
-    def test_two_args_str_tzinfo(self):
-
-        result = self.factory.get('2013-01-01', tzinfo=tz.gettz('US/Pacific'))
-
-        assertDtEqual(result._datetime, datetime(2013, 1, 1, tzinfo=tz.gettz('US/Pacific')))
-
     def test_two_args_twitter_format(self):
 
         # format returned by twitter API for created_at:
diff --git a/tests/locales_tests.py b/tests/locales_tests.py
index 9afe6bc..a95e4b8 100644
--- a/tests/locales_tests.py
+++ b/tests/locales_tests.py
@@ -644,93 +644,3 @@ class IndonesianLocaleTests(Chai):
 
     def test_format_relative_future(self):
         self.assertEqual(self.locale._format_relative('1 jam', 'hour', -1), '1 jam yang lalu')
-
-
-class TagalogLocaleTests(Chai):
-
-    def setUp(self):
-        super(TagalogLocaleTests, self).setUp()
-
-        self.locale = locales.TagalogLocale()
-
-    def test_format_timeframe(self):
-
-        assertEqual(self.locale._format_timeframe('minute', 1), 'isang minuto')
-        assertEqual(self.locale._format_timeframe('hour', 1), 'isang oras')
-        assertEqual(self.locale._format_timeframe('month', 1), 'isang buwan')
-        assertEqual(self.locale._format_timeframe('year', 1), 'isang taon')
-
-        assertEqual(self.locale._format_timeframe('seconds', 2), 'segundo')
-        assertEqual(self.locale._format_timeframe('minutes', 3), '3 minuto')
-        assertEqual(self.locale._format_timeframe('hours', 4), '4 oras')
-        assertEqual(self.locale._format_timeframe('months', 5), '5 buwan')
-        assertEqual(self.locale._format_timeframe('years', 6), '6 taon')
-
-    def test_format_relative_now(self):
-        self.assertEqual(self.locale._format_relative('ngayon lang', 'now', 0), 'ngayon lang')
-
-    def test_format_relative_past(self):
-        self.assertEqual(self.locale._format_relative('2 oras', 'hour', 2), '2 oras mula ngayon')
-
-    def test_format_relative_future(self):
-        self.assertEqual(self.locale._format_relative('3 oras', 'hour', -3), 'nakaraang 3 oras')
-
-    def test_ordinal_number(self):
-        assertEqual(self.locale.ordinal_number(0), 'ika-0')
-        assertEqual(self.locale.ordinal_number(1), 'ika-1')
-        assertEqual(self.locale.ordinal_number(2), 'ika-2')
-        assertEqual(self.locale.ordinal_number(3), 'ika-3')
-        assertEqual(self.locale.ordinal_number(10), 'ika-10')
-        assertEqual(self.locale.ordinal_number(23), 'ika-23')
-        assertEqual(self.locale.ordinal_number(100), 'ika-100')
-        assertEqual(self.locale.ordinal_number(103), 'ika-103')
-        assertEqual(self.locale.ordinal_number(114), 'ika-114')
-
-        
-class EstonianLocaleTests(Chai):
-
-    def setUp(self):
-        super(EstonianLocaleTests, self).setUp()
-
-        self.locale = locales.EstonianLocale()
-
-    def test_format_timeframe(self):
-        assertEqual(self.locale._format_timeframe('now', 0), 'just nüüd')
-        assertEqual(self.locale._format_timeframe('second', 1), 'ühe sekundi')
-        assertEqual(self.locale._format_timeframe('seconds', 3), '3 sekundi')
-        assertEqual(self.locale._format_timeframe('seconds', 30), '30 sekundi')
-        assertEqual(self.locale._format_timeframe('minute', 1), 'ühe minuti')
-        assertEqual(self.locale._format_timeframe('minutes', 4), '4 minuti')
-        assertEqual(self.locale._format_timeframe('minutes', 40), '40 minuti')
-        assertEqual(self.locale._format_timeframe('hour', 1), 'tunni aja')
-        assertEqual(self.locale._format_timeframe('hours', 5), '5 tunni')
-        assertEqual(self.locale._format_timeframe('hours', 23), '23 tunni')
-        assertEqual(self.locale._format_timeframe('day', 1), 'ühe päeva')
-        assertEqual(self.locale._format_timeframe('days', 6), '6 päeva')
-        assertEqual(self.locale._format_timeframe('days', 12), '12 päeva')
-        assertEqual(self.locale._format_timeframe('month', 1), 'ühe kuu')
-        assertEqual(self.locale._format_timeframe('months', 7), '7 kuu')
-        assertEqual(self.locale._format_timeframe('months', 11), '11 kuu')
-        assertEqual(self.locale._format_timeframe('year', 1), 'ühe aasta')
-        assertEqual(self.locale._format_timeframe('years', 8), '8 aasta')
-        assertEqual(self.locale._format_timeframe('years', 12), '12 aasta')
-        
-        assertEqual(self.locale._format_timeframe('now', 0), 'just nüüd')
-        assertEqual(self.locale._format_timeframe('second', -1), 'üks sekund')
-        assertEqual(self.locale._format_timeframe('seconds', -9), '9 sekundit')
-        assertEqual(self.locale._format_timeframe('seconds', -12), '12 sekundit')
-        assertEqual(self.locale._format_timeframe('minute', -1), 'üks minut')
-        assertEqual(self.locale._format_timeframe('minutes', -2), '2 minutit')
-        assertEqual(self.locale._format_timeframe('minutes', -10), '10 minutit')
-        assertEqual(self.locale._format_timeframe('hour', -1), 'tund aega')
-        assertEqual(self.locale._format_timeframe('hours', -3), '3 tundi')
-        assertEqual(self.locale._format_timeframe('hours', -11), '11 tundi')
-        assertEqual(self.locale._format_timeframe('day', -1), 'üks päev')
-        assertEqual(self.locale._format_timeframe('days', -2), '2 päeva')
-        assertEqual(self.locale._format_timeframe('days', -12), '12 päeva')
-        assertEqual(self.locale._format_timeframe('month', -1), 'üks kuu')
-        assertEqual(self.locale._format_timeframe('months', -3), '3 kuud')
-        assertEqual(self.locale._format_timeframe('months', -13), '13 kuud')
-        assertEqual(self.locale._format_timeframe('year', -1), 'üks aasta')
-        assertEqual(self.locale._format_timeframe('years', -4), '4 aastat')
-        assertEqual(self.locale._format_timeframe('years', -14), '14 aastat')
diff --git a/tests/parser_tests.py b/tests/parser_tests.py
index a179be4..7682df8 100644
--- a/tests/parser_tests.py
+++ b/tests/parser_tests.py
@@ -836,9 +836,3 @@ class DateTimeParserSearchDateTests(Chai):
         assertEqual(
             self.parser.parse("I'm entirely escaped, weee!", format),
             datetime(1, 1, 1))
-
-        # Special RegEx characters
-        format = 'MMM DD, YYYY |^${}().*+?<>-& h:mm A'
-        assertEqual(
-            self.parser.parse("Dec 31, 2017 |^${}().*+?<>-& 2:00 AM", format),
-            datetime(2017, 12, 31, 2, 0))