diff options
-rw-r--r-- | NEWS | 2 | ||||
-rw-r--r-- | README.rst | 4 | ||||
-rw-r--r-- | ci_tools/retry.bat | 2 | ||||
-rw-r--r-- | dateutil/relativedelta.py | 2 | ||||
-rw-r--r-- | dateutil/rrule.py | 2 | ||||
-rw-r--r-- | dateutil/test/_common.py | 3 | ||||
-rw-r--r-- | dateutil/test/test_parser.py | 7 | ||||
-rw-r--r-- | dateutil/test/test_relativedelta.py | 2 | ||||
-rw-r--r-- | dateutil/test/test_rrule.py | 7 | ||||
-rw-r--r-- | dateutil/tz/_common.py | 4 | ||||
-rw-r--r-- | dateutil/tz/tz.py | 14 | ||||
-rw-r--r-- | dateutil/tz/win.py | 6 | ||||
-rw-r--r-- | dateutil/tzwin.py | 2 | ||||
-rw-r--r-- | dateutil/zoneinfo/__init__.py | 4 | ||||
-rw-r--r-- | docs/examples.rst | 4 | ||||
-rw-r--r-- | docs/index.rst | 1 | ||||
-rw-r--r-- | zonefile_metadata.json | 2 |
17 files changed, 30 insertions, 38 deletions
@@ -45,7 +45,7 @@ Version 2.6.0 compared to unsupported classes, rather than raising TypeError, to allow other classes to provide fallback support. (gh pr #236) - Several classes have been marked as explicitly unhashable to maintain - identical behavior between Python 2 and 3. Submitted by Roy Williams + identical behavior between Python 2 and 3. Submitted by Roy Williams (@rowillia) (gh pr #296) - Trailing whitespace in easter.py has been removed. Submitted by @OmgImAlexis (gh pr #299) @@ -106,7 +106,7 @@ It is maintained by: * Yaron de Leeuw <me@jarondl.net> 2014- * Paul Ganssle <paul@ganssle.io> 2015- -Our mailing list is available at `dateutil@python.org <https://mail.python.org/mailman/listinfo/dateutil>`_. As it is hosted by the PSF, it is subject to the `PSF code of +Our mailing list is available at `dateutil@python.org <https://mail.python.org/mailman/listinfo/dateutil>`_. As it is hosted by the PSF, it is subject to the `PSF code of conduct <https://www.python.org/psf/codeofconduct/>`_. Building and releasing @@ -140,4 +140,4 @@ All github pull requests are automatically tested using travis and appveyor. .. _6B49 ACBA DCF6 BD1C A206 67AB CD54 FCE3 D964 BEFB: - https://pgp.mit.edu/pks/lookup?op=vindex&search=0xCD54FCE3D964BEFB
\ No newline at end of file + https://pgp.mit.edu/pks/lookup?op=vindex&search=0xCD54FCE3D964BEFB diff --git a/ci_tools/retry.bat b/ci_tools/retry.bat index 9ddc225..301cbe2 100644 --- a/ci_tools/retry.bat +++ b/ci_tools/retry.bat @@ -15,4 +15,4 @@ for /l %%x in (1, 1, %n_retries%) do ( ) REM If it failed all n_retries times, we can give up at last. -EXIT /B 1
\ No newline at end of file +EXIT /B 1 diff --git a/dateutil/relativedelta.py b/dateutil/relativedelta.py index d343f8a..61faff3 100644 --- a/dateutil/relativedelta.py +++ b/dateutil/relativedelta.py @@ -546,5 +546,3 @@ def _sign(x): return int(copysign(1, x)) # vim:ts=4:sw=4:et - - diff --git a/dateutil/rrule.py b/dateutil/rrule.py index 0f21e16..c8d6e20 100644 --- a/dateutil/rrule.py +++ b/dateutil/rrule.py @@ -363,7 +363,7 @@ class rrule(rrulebase): limit of the recurrence. The last recurrence in the rule is the greatest datetime that is less than or equal to the value specified in the ``until`` parameter. - + .. note:: As of version 2.5.0, the use of the ``until`` keyword together with the ``count`` keyword is deprecated per RFC-2445 Sec. 4.3.10. diff --git a/dateutil/test/_common.py b/dateutil/test/_common.py index f77b53e..0097399 100644 --- a/dateutil/test/_common.py +++ b/dateutil/test/_common.py @@ -192,7 +192,7 @@ class TZWinContext(TZContextBase): p = subprocess.Popen(['tzutil', '/g'], stdout=subprocess.PIPE) ctzname, err = p.communicate() - ctzname = ctzname.decode() # Popen returns + ctzname = ctzname.decode() # Popen returns if p.returncode: raise OSError('Failed to get current time zone: ' + err) @@ -285,4 +285,3 @@ class UnsetTzClass(object): pass UnsetTz = UnsetTzClass() - diff --git a/dateutil/test/test_parser.py b/dateutil/test/test_parser.py index 6e7014b..b8a82d0 100644 --- a/dateutil/test/test_parser.py +++ b/dateutil/test/test_parser.py @@ -744,11 +744,11 @@ class ParserTest(unittest.TestCase): self.assertEqual(parse("April 2009", default=datetime(2010, 1, 31)), datetime(2009, 4, 30)) - def testUnspecifiedDayFallbackFebNoLeapYear(self): + def testUnspecifiedDayFallbackFebNoLeapYear(self): self.assertEqual(parse("Feb 2007", default=datetime(2010, 1, 31)), datetime(2007, 2, 28)) - def testUnspecifiedDayFallbackFebLeapYear(self): + def testUnspecifiedDayFallbackFebLeapYear(self): self.assertEqual(parse("Feb 2008", default=datetime(2010, 1, 31)), datetime(2008, 2, 29)) @@ -857,11 +857,10 @@ class ParserTest(unittest.TestCase): def testUnambiguousDayFirst(self): dtstr = '2015 09 25' - self.assertEqual(parse(dtstr, dayfirst=True), + self.assertEqual(parse(dtstr, dayfirst=True), datetime(2015, 9, 25)) def testUnambiguousDayFirstYearFirst(self): dtstr = '2015 09 25' self.assertEqual(parse(dtstr, dayfirst=True, yearfirst=True), datetime(2015, 9, 25)) - diff --git a/dateutil/test/test_relativedelta.py b/dateutil/test/test_relativedelta.py index 3baf282..32d62f6 100644 --- a/dateutil/test/test_relativedelta.py +++ b/dateutil/test/test_relativedelta.py @@ -185,7 +185,7 @@ class RelativeDeltaTest(WarningTestMixin, unittest.TestCase): relativedelta(day=0, hour=0)) self.assertEqual(relativedelta(day=0, hour=0) + relativedelta(), relativedelta(day=0, hour=0)) - + def testAdditionToDatetime(self): self.assertEqual(datetime(2000, 1, 1) + relativedelta(days=1), datetime(2000, 1, 2)) diff --git a/dateutil/test/test_rrule.py b/dateutil/test/test_rrule.py index a5acd42..bfaacdf 100644 --- a/dateutil/test/test_rrule.py +++ b/dateutil/test/test_rrule.py @@ -2818,7 +2818,7 @@ class RRuleTest(WarningTestMixin, unittest.TestCase): def testStrUntil(self): self.assertEqual(list(rrulestr( - "DTSTART:19970902T090000\n" + "DTSTART:19970902T090000\n" "RRULE:FREQ=YEARLY;" "UNTIL=19990101T000000;BYDAY=1TU,-1TH\n" )), @@ -4405,7 +4405,7 @@ class RRuleTest(WarningTestMixin, unittest.TestCase): byminute=long(6), bysecond=long(6), dtstart=datetime(1997, 9, 2, 9, 0))) - + self._rrulestr_reverse_test(rrule(YEARLY, count=long(2), bymonthday=long(5), @@ -4678,7 +4678,7 @@ class WeekdayTest(unittest.TestCase): self.n = n MO_Basic = BasicWeekday(0) - + self.assertNotEqual(MO, MO_Basic) self.assertNotEqual(MO(1), MO_Basic) @@ -4704,4 +4704,3 @@ class WeekdayTest(unittest.TestCase): for repstr, wday in zip(with_n_reprs, with_n_wdays): self.assertEqual(repr(wday), repstr) - diff --git a/dateutil/tz/_common.py b/dateutil/tz/_common.py index ade3b52..e677598 100644 --- a/dateutil/tz/_common.py +++ b/dateutil/tz/_common.py @@ -121,7 +121,7 @@ class _tzinfo(tzinfo): same_offset = wall_0.utcoffset() == wall_1.utcoffset() same_dt = wall_0.replace(tzinfo=None) == wall_1.replace(tzinfo=None) - + return same_dt and not same_offset def _fold_status(self, dt_utc, dt_wall): @@ -360,7 +360,7 @@ class tzrangebase(_tzinfo): @property def _dst_base_offset(self): return self._dst_offset - self._std_offset - + __hash__ = None def __ne__(self, other): diff --git a/dateutil/tz/tz.py b/dateutil/tz/tz.py index 6bee291..bde40f7 100644 --- a/dateutil/tz/tz.py +++ b/dateutil/tz/tz.py @@ -93,7 +93,7 @@ class tzoffset(datetime.tzinfo): """ def __init__(self, name, offset): self._name = name - + try: # Allow a timedelta offset = _total_seconds(offset) @@ -337,7 +337,7 @@ class tzfile(_tzinfo): and ``fileobj`` is a file stream, this parameter will be set either to ``fileobj``'s ``name`` attribute or to ``repr(fileobj)``. - See `Sources for Time Zone and Daylight Saving Time Data + See `Sources for Time Zone and Daylight Saving Time Data <http://www.twinsun.com/tz/tz-link.htm>`_ for more information. Time zone files can be compiled from the `IANA Time Zone database files <https://www.iana.org/time-zones>`_ with the `zic time zone compiler @@ -585,7 +585,7 @@ class tzfile(_tzinfo): if not isinstance(tti.dstoffset, datetime.timedelta): tti.dstoffset = datetime.timedelta(seconds=tti.dstoffset) - + out.trans_idx[i] = tti out.trans_idx = tuple(out.trans_idx) @@ -680,7 +680,7 @@ class tzfile(_tzinfo): if not self._ttinfo_dst: return ZERO - + tti = self._find_ttinfo(dt) if not tti.isdst: @@ -1375,7 +1375,7 @@ def datetime_exists(dt, tz=None): :param tz: A :class:`datetime.tzinfo` with support for the ``fold`` attribute. If ``None`` or not provided, the datetime's own time zone will be used. - + :return: Returns a boolean value whether or not the "wall time" exists in ``tz``. """ @@ -1407,7 +1407,7 @@ def datetime_ambiguous(dt, tz=None): :param tz: A :class:`datetime.tzinfo` with support for the ``fold`` attribute. If ``None`` or not provided, the datetime's own time zone will be used. - + :return: Returns a boolean value whether or not the "wall time" is ambiguous in ``tz``. @@ -1449,7 +1449,7 @@ def _datetime_to_timestamp(dt): class _ContextWrapper(object): """ - Class for wrapping contexts so that they are passed through in a + Class for wrapping contexts so that they are passed through in a with statement. """ def __init__(self, context): diff --git a/dateutil/tz/win.py b/dateutil/tz/win.py index 9f4e551..1c061bd 100644 --- a/dateutil/tz/win.py +++ b/dateutil/tz/win.py @@ -49,7 +49,7 @@ class tzres(object): def __init__(self, tzres_loc='tzres.dll'): # Load the user32 DLL so we can load strings from tzres user32 = ctypes.WinDLL('user32') - + # Specify the LoadStringW function user32.LoadStringW.argtypes = (wintypes.HINSTANCE, wintypes.UINT, @@ -63,7 +63,7 @@ class tzres(object): def load_name(self, offset): """ Load a timezone name from a DLL offset (integer). - + >>> from dateutil.tzwin import tzres >>> tzr = tzres() >>> print(tzr.load_name(112)) @@ -266,7 +266,7 @@ class tzwinlocal(tzwinbase): self._stdweeknumber, # Last = 5 self._stdhour, self._stdminute) = tup[1:5] - + self._stddayofweek = tup[7] tup = struct.unpack("=8h", keydict["DaylightStart"]) diff --git a/dateutil/tzwin.py b/dateutil/tzwin.py index 55cd910..cebc673 100644 --- a/dateutil/tzwin.py +++ b/dateutil/tzwin.py @@ -1,2 +1,2 @@ # tzwin has moved to dateutil.tz.win -from .tz.win import *
\ No newline at end of file +from .tz.win import * diff --git a/dateutil/zoneinfo/__init__.py b/dateutil/zoneinfo/__init__.py index 7145e05..3ac17ef 100644 --- a/dateutil/zoneinfo/__init__.py +++ b/dateutil/zoneinfo/__init__.py @@ -75,7 +75,7 @@ class ZoneInfoFile(object): """ Wrapper for :func:`ZoneInfoFile.zones.get`. This is a convenience method for retrieving zones from the zone dictionary. - + :param name: The name of the zone to retrieve. (Generally IANA zone names) @@ -183,5 +183,3 @@ def gettz_db_metadata(): if len(_CLASS_ZONE_INSTANCE) == 0: _CLASS_ZONE_INSTANCE.append(ZoneInfoFile(getzoneinfofile_stream())) return _CLASS_ZONE_INSTANCE[0].metadata - - diff --git a/docs/examples.rst b/docs/examples.rst index f3e7f5d..c049177 100644 --- a/docs/examples.rst +++ b/docs/examples.rst @@ -1330,7 +1330,7 @@ Check the daylight limit. 'EDT' >>> datetime(2003, 10, 26, 1, 00, tzinfo=tz).tzname() 'EST' - + tzrange examples ---------------- @@ -1405,7 +1405,7 @@ Check the daylight limit. 'EDT' >>> datetime(2003, 10, 26, 1, 00, tzinfo=tz).tzname() 'EST' - + tzical examples --------------- diff --git a/docs/index.rst b/docs/index.rst index 5d252f6..b2503a1 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -28,4 +28,3 @@ Indices and tables * :ref:`genindex` * :ref:`modindex` * :ref:`search` - diff --git a/zonefile_metadata.json b/zonefile_metadata.json index 36e6e2d..2f4de08 100644 --- a/zonefile_metadata.json +++ b/zonefile_metadata.json @@ -22,4 +22,4 @@ "backzone", "backward" ] -}
\ No newline at end of file +} |