From 28958b646fb38a679e45d3c9d8257e46deebe190 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@gnu.org>
Date: Tue, 14 Mar 2017 11:14:58 +0100
Subject: [PATCH] gnu: python-parsedatetime: Update to 2.3.

Version 2.1 was apparently time-sensitive and started failing like this:

  ======================================================================
  FAIL: testFloat (tests.TestDelta.test)
  ----------------------------------------------------------------------
  Traceback (most recent call last):
    File "/tmp/guix-build-python2-parsedatetime-2.1.drv-0/parsedatetime-2.1/tests/TestDelta.py", line 64, in testFloat
      self.cal.parse('1.4 months ago', self.source), months=-1.4)
    File "/tmp/guix-build-python2-parsedatetime-2.1.drv-0/parsedatetime-2.1/tests/TestDelta.py", line 37, in assertDelta
      self.assertTrue(diff < 0.05, '%s is not less than 0.05' % diff)
  AssertionError: 0.0666666666667 is not less than 0.05

  ----------------------------------------------------------------------

* gnu/packages/python.scm (python-parsedatetime): Update to 2.3.
[native-inputs]: Add PYTHON-PYTEST and PYTHON-PYTEST-RUNNER.
[propagated-inputs]: New field.
---
 gnu/packages/python.scm | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 333cfd54e99..00796d166ec 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -1,6 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
-;;; Copyright © 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2013, 2014, 2015, 2016, 2017 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2013, 2014, 2015, 2016 Andreas Enge <andreas@enge.fr>
 ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
 ;;; Copyright © 2014, 2017 Eric Bavier <bavier@member.fsf.org>
@@ -1141,18 +1141,22 @@ (define-public python2-dateutil
 (define-public python-parsedatetime
   (package
     (name "python-parsedatetime")
-    (version "2.1")
+    (version "2.3")
     (source
      (origin
       (method url-fetch)
       (uri (pypi-uri "parsedatetime" version))
       (sha256
        (base32
-        "0bdgyw6y3v7bcxlx0p50s8drxsh5bb5cy2afccqr3j90amvpii8p"))))
+        "1vkrmd398s11h1zn3zaqqsiqhj9lwy1ikcg6irx2lrgjzjg3rjll"))))
     (build-system python-build-system)
     (native-inputs
      `(("python-nose" ,python-nose)
-       ("python-pyicu" ,python-pyicu)))
+       ("python-pyicu" ,python-pyicu)
+       ("python-pytest" ,python-pytest)
+       ("python-pytest-runner" ,python-pytest-runner)))
+    (propagated-inputs
+     `(("python-future" ,python-future)))
     (home-page "http://github.com/bear/parsedatetime/")
     (synopsis
      "Parse human-readable date/time text")
-- 
GitLab