* Stuart Prescott <[email protected]>, 2016-06-15, 00:02:
+    @property
+    def date(self):
+        """ a datetime object for the removal action """
+        try:
+            from dateutil.parser import parse
+        except ImportError:
+            warnings.warn("Install the python-dateutil or python3-dateutil "
+                    "package to process dates in package removals.")
+            raise
+        return parse(self['date'])

There's a RFC 822 date parser in Python stdlib (email.utils.parsedate_tz), so if we jumped through a hops or two, we could avoid this extra dependency.

Hmm, I wonder how other parts of python-debian parse dates...

+            self.assertEqual(r.bug, ['753912'])
+            self.assertEqual(r.also_wnpp, ['123456'])

Shouldn't bug numbers be integers?

--
Jakub Wilk

--
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-python-debian-maint

Reply via email to