guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/04: gnu: python-parse: Update to 1.8.2.


From: Marius Bakke
Subject: 01/04: gnu: python-parse: Update to 1.8.2.
Date: Sun, 25 Feb 2018 21:09:47 -0500 (EST)

mbakke pushed a commit to branch master
in repository guix.

commit 2115bde3024b685087af70a20d7846498d6c9985
Author: Marius Bakke <address@hidden>
Date:   Mon Feb 26 02:39:15 2018 +0100

    gnu: python-parse: Update to 1.8.2.
    
    * gnu/packages/patches/python-parse-too-many-fields.patch: Delete file.
    * gnu/local.mk (dist_patch_DATA): Remove it.
    * gnu/packages/python.scm (python-parse): Update to 1.8.2.
    [source](patches): Remove.
    [arguments]: Use INVOKE instead of SYSTEM*.
---
 gnu/local.mk                                       |  1 -
 .../patches/python-parse-too-many-fields.patch     | 52 ----------------------
 gnu/packages/python.scm                            |  7 ++-
 3 files changed, 3 insertions(+), 57 deletions(-)

diff --git a/gnu/local.mk b/gnu/local.mk
index 8acb3ce..72fbf90 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1031,7 +1031,6 @@ dist_patch_DATA =                                         
\
   %D%/packages/patches/python2-larch-coverage-4.0a6-compatibility.patch \
   %D%/packages/patches/python-networkx2-reproducible-build.patch       \
   %D%/packages/patches/python-nose-timer-drop-ordereddict.patch \
-  %D%/packages/patches/python-parse-too-many-fields.patch      \
   %D%/packages/patches/python-pillow-fix-failing-tests.patch   \
   %D%/packages/patches/python2-rdflib-drop-sparqlwrapper.patch \
   %D%/packages/patches/python-statsmodels-fix-tests.patch      \
diff --git a/gnu/packages/patches/python-parse-too-many-fields.patch 
b/gnu/packages/patches/python-parse-too-many-fields.patch
deleted file mode 100644
index 9db6b91..0000000
--- a/gnu/packages/patches/python-parse-too-many-fields.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-From 32f15cfefb7c7b6476360ac65cba807aa3dfccfa Mon Sep 17 00:00:00 2001
-From: David King <address@hidden>
-Date: Mon, 14 Dec 2015 09:58:19 +0000
-Subject: [PATCH] Fix test_too_many_fields with Python 3.5
-
-taken from https://github.com/r1chardj0n3s/parse/pull/34
-
-Python versions before 3.5 had a limit of 100 groups in regular
-expressions. This limit was removed during 3.5 development:
-
-http://bugs.python.org/issue22437
-https://hg.python.org/cpython/rev/0b85ea4bd1af
-
-The test_too_many_fields test asserts that the limit exists by
-attempting to parse a string with 15 fields, which triggers the 100
-named groups limit.
-
-Adjust the test so that if first checks to see whether the limit of 100
-named groups exists, and only assert that parsing 15 fields fails if
-that is the case.
----
- test_parse.py | 10 ++++++++--
- 1 file changed, 8 insertions(+), 2 deletions(-)
-
-diff --git a/test_parse.py b/test_parse.py
-index c524349..1d50568 100755
---- a/test_parse.py
-+++ b/test_parse.py
-@@ -6,6 +6,7 @@
- 
- import unittest
- from datetime import datetime, time
-+import re
- 
- import parse
- 
-@@ -624,8 +625,13 @@ def test_mixed_type_variant(self):
-         self.assertEqual(r.fixed[21], 'spam')
- 
-     def test_too_many_fields(self):
--        p = parse.compile('{:ti}' * 15)
--        self.assertRaises(parse.TooManyFields, p.parse, '')
-+        # Python 3.5 removed the limit of 100 named groups in a regular 
expression,
-+        # so only test for the exception if the limit exists.
-+        try:
-+            re.compile("".join("(?P<n{n}>{n}-)".format(n=i) for i in 
range(101)))
-+        except AssertionError:
-+            p = parse.compile('{:ti}' * 15)
-+            self.assertRaises(parse.TooManyFields, p.parse, '')
- 
- 
- class TestSearch(unittest.TestCase):
diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 3c816cd..14a79a9 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -1431,21 +1431,20 @@ backported for previous versions of Python from 2.4 to 
3.3.")
 (define-public python-parse
   (package
     (name "python-parse")
-    (version "1.6.6")
+    (version "1.8.2")
     (source
      (origin
       (method url-fetch)
       (uri (pypi-uri "parse" version))
       (sha256
        (base32
-        "0y31i3mwgv35qn0kzzjn9q8jqfdqmbi6sr6yfvn8rq4lqjm5lhvi"))
-      (patches (search-patches "python-parse-too-many-fields.patch"))))
+        "1lj9v1q4imszyhvipb6drsm3xdl35nan011mqxxas1yaypixsj40"))))
     (build-system python-build-system)
     (arguments
      `(#:phases
        (modify-phases %standard-phases
          (replace 'check
-           (lambda _ (zero? (system* "python" "test_parse.py")))))))
+           (lambda _ (invoke "python" "test_parse.py"))))))
     (home-page "https://github.com/r1chardj0n3s/parse";)
     (synopsis "Parse strings")
     (description



reply via email to

[Prev in Thread] Current Thread [Next in Thread]