summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Panter <vadmium+py@gmail.com>2016-01-16 06:49:30 (GMT)
committerMartin Panter <vadmium+py@gmail.com>2016-01-16 06:49:30 (GMT)
commit4eb376c441f99e9ea50beae5309020a1469393ac (patch)
tree105bcf31b8d32853045c17bb3eebd80f1db01b73
parent7978e10441e84482d3d28e7c449d68b77c6310b6 (diff)
downloadcpython-4eb376c441f99e9ea50beae5309020a1469393ac.zip
cpython-4eb376c441f99e9ea50beae5309020a1469393ac.tar.gz
cpython-4eb376c441f99e9ea50beae5309020a1469393ac.tar.bz2
Issue #23883: Add missing APIs to calendar.__all__
Patch by Joel Taddei and Jacek Kołodziej.
-rw-r--r--Lib/calendar.py4
-rw-r--r--Lib/test/test_calendar.py9
-rw-r--r--Misc/ACKS1
3 files changed, 13 insertions, 1 deletions
diff --git a/Lib/calendar.py b/Lib/calendar.py
index 196a075..85baf2e 100644
--- a/Lib/calendar.py
+++ b/Lib/calendar.py
@@ -12,7 +12,9 @@ import locale as _locale
__all__ = ["IllegalMonthError", "IllegalWeekdayError", "setfirstweekday",
"firstweekday", "isleap", "leapdays", "weekday", "monthrange",
"monthcalendar", "prmonth", "month", "prcal", "calendar",
- "timegm", "month_name", "month_abbr", "day_name", "day_abbr"]
+ "timegm", "month_name", "month_abbr", "day_name", "day_abbr",
+ "Calendar", "TextCalendar", "HTMLCalendar", "LocaleTextCalendar",
+ "LocaleHTMLCalendar", "weekheader"]
# Exception raised for bad input (with string parameter for details)
error = ValueError
diff --git a/Lib/test/test_calendar.py b/Lib/test/test_calendar.py
index d9d3128..d95ad04 100644
--- a/Lib/test/test_calendar.py
+++ b/Lib/test/test_calendar.py
@@ -815,5 +815,14 @@ class CommandLineTestCase(unittest.TestCase):
b'href="custom.css" />', stdout)
+class MiscTestCase(unittest.TestCase):
+ def test__all__(self):
+ blacklist = {'error', 'mdays', 'January', 'February', 'EPOCH',
+ 'MONDAY', 'TUESDAY', 'WEDNESDAY', 'THURSDAY', 'FRIDAY',
+ 'SATURDAY', 'SUNDAY', 'different_locale', 'c',
+ 'prweek', 'week', 'format', 'formatstring', 'main'}
+ support.check__all__(self, calendar, blacklist=blacklist)
+
+
if __name__ == "__main__":
unittest.main()
diff --git a/Misc/ACKS b/Misc/ACKS
index 1df5d24..ebc0d5d 100644
--- a/Misc/ACKS
+++ b/Misc/ACKS
@@ -1419,6 +1419,7 @@ Péter Szabó
John Szakmeister
Amir Szekely
Maciej Szulik
+Joel Taddei
Arfrever Frehtes Taifersar Arahesis
Hideaki Takahashi
Takase Arihiro