Author: Philip Jenvey <[email protected]>
Branch: py3k
Changeset: r68478:55a82ced3b8a
Date: 2013-12-18 15:48 -0800
http://bitbucket.org/pypy/pypy/changeset/55a82ced3b8a/
Log: merge upstream
diff --git a/lib-python/3/datetime.py b/lib-python/3/datetime.py
--- a/lib-python/3/datetime.py
+++ b/lib-python/3/datetime.py
@@ -40,9 +40,9 @@
# for all computations. See the book for algorithms for converting between
# proleptic Gregorian ordinals and many other calendar systems.
-_DAYS_IN_MONTH = [None, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]
+_DAYS_IN_MONTH = [-1, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]
-_DAYS_BEFORE_MONTH = [None]
+_DAYS_BEFORE_MONTH = [-1]
dbm = 0
for dim in _DAYS_IN_MONTH[1:]:
_DAYS_BEFORE_MONTH.append(dbm)
@@ -806,7 +806,6 @@
month = self._month
if day is None:
day = self._day
- year, month, day = _check_date_fields(year, month, day)
return date(year, month, day)
# Comparisons of date objects with other.
@@ -1270,8 +1269,6 @@
microsecond = self.microsecond
if tzinfo is True:
tzinfo = self.tzinfo
- hour, minute, second, microsecond = _check_time_fields(hour, minute,
second, microsecond)
- _check_tzinfo_arg(tzinfo)
return time(hour, minute, second, microsecond, tzinfo)
def __bool__(self):
@@ -1486,9 +1483,6 @@
microsecond = self.microsecond
if tzinfo is True:
tzinfo = self.tzinfo
- year, month, day = _check_date_fields(year, month, day)
- hour, minute, second, microsecond = _check_time_fields(hour, minute,
second, microsecond)
- _check_tzinfo_arg(tzinfo)
return datetime(year, month, day, hour, minute, second, microsecond,
tzinfo)
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit