Browse Source

Update dateutil 2.8.0 (c90a30c) → 2.8.0 (27848c5).

pull/1200/head
JackDandy 6 years ago
parent
commit
d46ffdd92e
  1. 1
      CHANGES.md
  2. 8
      lib/dateutil/parser/_parser.py
  3. 2
      lib/dateutil/relativedelta.py
  4. 2
      lib/dateutil/rrule.py
  5. 4
      lib/dateutil/tz/_common.py
  6. 4
      lib/dateutil/tz/tz.py
  7. 2
      lib/dateutil/utils.py

1
CHANGES.md

@ -6,6 +6,7 @@
* Update cachecontrol library 0.12.4 (bd94f7e) to 0.12.5 (007e8ca) * Update cachecontrol library 0.12.4 (bd94f7e) to 0.12.5 (007e8ca)
* Update Certifi 2019.03.09 (401100f) to 2019.06.16 (84dc766) * Update Certifi 2019.03.09 (401100f) to 2019.06.16 (84dc766)
* Update ConfigObj 5.1.0 (a68530a) to 5.1.0 (45fbf1b) * Update ConfigObj 5.1.0 (a68530a) to 5.1.0 (45fbf1b)
* Update dateutil 2.8.0 (c90a30c) to 2.8.0 (27848c5)
* Update DiskCache library 3.1.1 (2649ac9) to 4.0.0 (2c79bb9) * Update DiskCache library 3.1.1 (2649ac9) to 4.0.0 (2c79bb9)
* Update feedparser 5.2.1 (2b11c80) to 5.2.1 (cbe18d0) * Update feedparser 5.2.1 (2b11c80) to 5.2.1 (cbe18d0)
* Update Fuzzywuzzy 0.15.1 to 0.17.0 (778162c) * Update Fuzzywuzzy 0.15.1 to 0.17.0 (778162c)

8
lib/dateutil/parser/_parser.py

@ -423,7 +423,7 @@ class _ymd(list):
elif not self.has_month: elif not self.has_month:
return 1 <= value <= 31 return 1 <= value <= 31
elif not self.has_year: elif not self.has_year:
# Be permissive, assume leapyear # Be permissive, assume leap year
month = self[self.mstridx] month = self[self.mstridx]
return 1 <= value <= monthrange(2000, month)[1] return 1 <= value <= monthrange(2000, month)[1]
else: else:
@ -539,7 +539,7 @@ class _ymd(list):
year, month, day = self year, month, day = self
else: else:
# 01-Jan-01 # 01-Jan-01
# Give precendence to day-first, since # Give precedence to day-first, since
# two-digit years is usually hand-written. # two-digit years is usually hand-written.
day, month, year = self day, month, year = self
@ -1025,7 +1025,7 @@ class parser(object):
hms_idx = idx + 2 hms_idx = idx + 2
elif idx > 0 and info.hms(tokens[idx-1]) is not None: elif idx > 0 and info.hms(tokens[idx-1]) is not None:
# There is a "h", "m", or "s" preceeding this token. Since neither # There is a "h", "m", or "s" preceding this token. Since neither
# of the previous cases was hit, there is no label following this # of the previous cases was hit, there is no label following this
# token, so we use the previous label. # token, so we use the previous label.
# e.g. the "04" in "12h04" # e.g. the "04" in "12h04"
@ -1105,7 +1105,7 @@ class parser(object):
def _parse_min_sec(self, value): def _parse_min_sec(self, value):
# TODO: Every usage of this function sets res.second to the return # TODO: Every usage of this function sets res.second to the return
# value. Are there any cases where second will be returned as None and # value. Are there any cases where second will be returned as None and
# we *dont* want to set res.second = None? # we *don't* want to set res.second = None?
minute = int(value) minute = int(value)
second = None second = None

2
lib/dateutil/relativedelta.py

@ -45,7 +45,7 @@ class relativedelta(object):
years, months, weeks, days, hours, minutes, seconds, microseconds: years, months, weeks, days, hours, minutes, seconds, microseconds:
Relative information, may be negative (argument is plural); adding Relative information, may be negative (argument is plural); adding
or subtracting a relativedelta with relative information performs or subtracting a relativedelta with relative information performs
the corresponding aritmetic operation on the original datetime value the corresponding arithmetic operation on the original datetime value
with the information in the relativedelta. with the information in the relativedelta.
weekday: weekday:

2
lib/dateutil/rrule.py

@ -177,7 +177,7 @@ class rrulebase(object):
return False return False
return False return False
# __len__() introduces a large performance penality. # __len__() introduces a large performance penalty.
def count(self): def count(self):
""" Returns the number of recurrences in this set. It will have go """ Returns the number of recurrences in this set. It will have go
trough the whole recurrence, if this hasn't been done before. """ trough the whole recurrence, if this hasn't been done before. """

4
lib/dateutil/tz/_common.py

@ -212,7 +212,7 @@ class _tzinfo(tzinfo):
Since this is the one time that we *know* we have an unambiguous Since this is the one time that we *know* we have an unambiguous
datetime object, we take this opportunity to determine whether the datetime object, we take this opportunity to determine whether the
datetime is ambiguous and in a "fold" state (e.g. if it's the first datetime is ambiguous and in a "fold" state (e.g. if it's the first
occurence, chronologically, of the ambiguous datetime). occurrence, chronologically, of the ambiguous datetime).
:param dt: :param dt:
A timezone-aware :class:`datetime.datetime` object. A timezone-aware :class:`datetime.datetime` object.
@ -250,7 +250,7 @@ class _tzinfo(tzinfo):
Since this is the one time that we *know* we have an unambiguous Since this is the one time that we *know* we have an unambiguous
datetime object, we take this opportunity to determine whether the datetime object, we take this opportunity to determine whether the
datetime is ambiguous and in a "fold" state (e.g. if it's the first datetime is ambiguous and in a "fold" state (e.g. if it's the first
occurance, chronologically, of the ambiguous datetime). occurrence, chronologically, of the ambiguous datetime).
:param dt: :param dt:
A timezone-aware :class:`datetime.datetime` object. A timezone-aware :class:`datetime.datetime` object.

4
lib/dateutil/tz/tz.py

@ -385,7 +385,7 @@ class _tzfile(object):
class tzfile(_tzinfo): class tzfile(_tzinfo):
""" """
This is a ``tzinfo`` subclass thant allows one to use the ``tzfile(5)`` This is a ``tzinfo`` subclass that allows one to use the ``tzfile(5)``
format timezone files to extract current and historical zone information. format timezone files to extract current and historical zone information.
:param fileobj: :param fileobj:
@ -1827,7 +1827,7 @@ else:
try: try:
# Python 3.7 feature # Python 3.7 feature
from contextmanager import nullcontext as _nullcontext from contextlib import nullcontext as _nullcontext
except ImportError: except ImportError:
class _nullcontext(object): class _nullcontext(object):
""" """

2
lib/dateutil/utils.py

@ -28,7 +28,7 @@ def today(tzinfo=None):
def default_tzinfo(dt, tzinfo): def default_tzinfo(dt, tzinfo):
""" """
Sets the the ``tzinfo`` parameter on naive datetimes only Sets the ``tzinfo`` parameter on naive datetimes only
This is useful for example when you are provided a datetime that may have This is useful for example when you are provided a datetime that may have
either an implicit or explicit time zone, such as when parsing a time zone either an implicit or explicit time zone, such as when parsing a time zone

Loading…
Cancel
Save