[PATCH] Upgrade python-argcomplete to 1.11.1

DoneSubmitted by Lars-Dominik Braun.
Details
2 participants
  • Lars-Dominik Braun
  • Marius Bakke
Owner
unassigned
Severity
normal
L
L
Lars-Dominik Braun wrote on 19 May 2020 09:32
(address . guix-patches@gnu.org)
20200519073209.GA3485@zpidnp36
Hi,

the attached patch upgrades python-argcomplete to version 1.11.1 and includes a
fix from git for the testsuite and fish>=3.1.

Cheers,
Lars
From f72dc474ff2e0ded162661b5c845371cb48c936d Mon Sep 17 00:00:00 2001
From: Lars-Dominik Braun <ldb@leibniz-psychology.org>
Date: Tue, 19 May 2020 09:24:03 +0200
Subject: [PATCH] gnu: python-argcomplete: Update to 1.11.1

* gnu/packages/python-xyz.scm (python-argcomplete)[version]: Upgrade
[arguments]: Remove, obsolete
* gnu/packages/patches/python-argcomplete-1.11.1-fish31.patch: Add fix for fish 3.1
* gnu/local.mk (dist_patch_DATA): Add new file
---
gnu/local.mk | 1 +
.../python-argcomplete-1.11.1-fish31.patch | 35 +++++++++++++++++++
gnu/packages/python-xyz.scm | 23 ++----------
3 files changed, 39 insertions(+), 20 deletions(-)
create mode 100644 gnu/packages/patches/python-argcomplete-1.11.1-fish31.patch

Toggle diff (96 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index 38b286203e..82497923c8 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1409,6 +1409,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/python-CVE-2018-14647.patch		\
   %D%/packages/patches/python-aiohttp-3.6.2-no-warning-fail.patch	\
   %D%/packages/patches/python-alembic-exceptions-cause.patch	\
+  %D%/packages/patches/python-argcomplete-1.11.1-fish31.patch	\
   %D%/packages/patches/python-axolotl-AES-fix.patch		\
   %D%/packages/patches/python-cairocffi-dlopen-path.patch	\
   %D%/packages/patches/python-cross-compile.patch		\
diff --git a/gnu/packages/patches/python-argcomplete-1.11.1-fish31.patch b/gnu/packages/patches/python-argcomplete-1.11.1-fish31.patch
new file mode 100644
index 0000000000..575c8abbb7
--- /dev/null
+++ b/gnu/packages/patches/python-argcomplete-1.11.1-fish31.patch
@@ -0,0 +1,35 @@
+From 08bfc8a788e8081515d733e67be026d051c726f7 Mon Sep 17 00:00:00 2001
+From: Evan <evanunderscore@gmail.com>
+Date: Thu, 19 Mar 2020 14:55:07 +1100
+Subject: [PATCH] Remove expected test failure for new versions of fish (#292)
+
+---
+ test/test.py | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/test/test.py b/test/test.py
+index e91352b..2c34806 100755
+--- a/test/test.py
++++ b/test/test.py
+@@ -28,6 +28,8 @@
+ 
+ BASH_VERSION = subprocess.check_output(['bash', '-c', 'echo $BASH_VERSION']).decode()
+ BASH_MAJOR_VERSION = int(BASH_VERSION.split('.')[0])
++FISH_VERSION_STR = subprocess.check_output(['fish', '-c', 'echo -n $FISH_VERSION']).decode()
++FISH_VERSION_TUPLE = tuple(int(x) for x in FISH_VERSION_STR.split('.'))
+ 
+ 
+ class TempDir(object):
+@@ -1258,8 +1260,11 @@ class TestFish(_TestSh, unittest.TestCase):
+     expected_failures = [
+         'test_parse_special_characters',
+         'test_comp_point',
+-        'test_special_characters_double_quoted'
+     ]
++    if FISH_VERSION_TUPLE < (3, 1):
++        expected_failures.extend([
++            'test_special_characters_double_quoted'
++        ])
+ 
+     skipped = [
+         'test_single_quotes_in_single_quotes',
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index c26a766d64..bc593120aa 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -13014,33 +13014,16 @@ PNG, JPEG, JPEG2000 and GIF files in pure Python.")
 (define-public python-argcomplete
   (package
     (name "python-argcomplete")
-    (version "1.10.3")
+    (version "1.11.1")
     (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "argcomplete" version))
        (sha256
         (base32
-         "02jkc44drb0yjz6x28lvg6rj607n8r2irdpdvyylm8xnycn54zx3"))))
+         "0h1przxffrhqvi46k40pzjsvdrq4zc3sl1pc96kkigqppq0vdrss"))
+       (patches (search-patches "python-argcomplete-1.11.1-fish31.patch"))))
     (build-system python-build-system)
-    (arguments
-     `(#:phases
-       (modify-phases %standard-phases
-         (add-after 'unpack 'embed-tool-references
-           (lambda _
-             (substitute* "argcomplete/bash_completion.d/python-argcomplete.sh"
-               ((" grep")
-                (string-append " " (which "grep")))
-               ((" egrep")
-                (string-append " " (which "egrep")))
-               (("elif which")
-                (string-append "elif " (which "which")))
-               (("\\$\\(which")
-                (string-append "$(" (which "which"))))
-             #t)))))
-    (inputs
-     `(("grep" ,grep)
-       ("which" ,which)))
     (native-inputs
      `(("python-coverage" ,python-coverage)
        ("python-flake8" ,python-flake8)
-- 
2.20.1
-----BEGIN PGP SIGNATURE-----

iQGzBAABCgAdFiEEyk+M9DfXR4/aBV/UQhN3ARo3hEYFAl7Di3QACgkQQhN3ARo3
hEa9ZQv9H6MxYc98K0vsOV7ElnxAPtjU9zLGV2txQDDlUjVxDaIvYj5Dr8gQmWWC
1GRm2T1PRWSiwsTQIYjCRMCgFAK6ZGGLZRvQ9tOCsgQV8LLuMD3Tpr86zroQILeT
20vpbLQYaHD8fOUF0yXcAEtZAmvmQRIEBKx/nlfq3U9fpjyoz8wB2BRq+FtCTmfE
bhMC17+OxGvhD/ozsU6iwiMCbWpjZGtvwaTwOpLxUIW2unrS9797BDA57FkhmTcX
N+P4gS91WfdaI5p+r1ATiCWOfZmx1XWT8kGQCBfiEgRYTdI8ctgP3PyAMfbo0UOq
csOeIR6R0hrCboq6nJ8AhuLhzMEAUcOxSn9G68tzSeeIqc0IlEGMYEQlaIQP8Jss
VyphXtDtLvvk9w9q9pFsKmTwq8g9Q/rFuAPkxwCsr/5Csn8oGHRwvPAbSi5owH3q
7KSMIODZyntX8ja+b9Y+GOCftPbOGQ3hgcqcl7RfZFxk/NEaeV9im9QOsNI0gWuQ
/gEVMz3U
=U9I3
-----END PGP SIGNATURE-----


M
M
Marius Bakke wrote on 20 May 2020 22:47
87wo569vvb.fsf@devup.no
Lars-Dominik Braun <ldb@leibniz-psychology.org> writes:

Toggle quote (5 lines)
> Hi,
>
> the attached patch upgrades python-argcomplete to version 1.11.1 and includes a
> fix from git for the testsuite and fish>=3.1.

Thanks! A few small nit-picks:

Toggle quote (5 lines)
> From f72dc474ff2e0ded162661b5c845371cb48c936d Mon Sep 17 00:00:00 2001
> From: Lars-Dominik Braun <ldb@leibniz-psychology.org>
> Date: Tue, 19 May 2020 09:24:03 +0200
> Subject: [PATCH] gnu: python-argcomplete: Update to 1.11.1

Please use punctuations in commit messages.

Toggle quote (3 lines)
> * gnu/packages/python-xyz.scm (python-argcomplete)[version]: Upgrade
> [arguments]: Remove, obsolete

Also mention the removed [inputs].

Toggle quote (3 lines)
> * gnu/packages/patches/python-argcomplete-1.11.1-fish31.patch: Add fix for fish 3.1
> * gnu/local.mk (dist_patch_DATA): Add new file

Here it should say something along the lines of "...fish31.patch": New file.
...(dist_patch_DATA): Add it.

See the commit log for examples.

Toggle quote (16 lines)
> diff --git a/gnu/packages/patches/python-argcomplete-1.11.1-fish31.patch b/gnu/packages/patches/python-argcomplete-1.11.1-fish31.patch
> new file mode 100644
> index 0000000000..575c8abbb7
> --- /dev/null
> +++ b/gnu/packages/patches/python-argcomplete-1.11.1-fish31.patch
> @@ -0,0 +1,35 @@
> +From 08bfc8a788e8081515d733e67be026d051c726f7 Mon Sep 17 00:00:00 2001
> +From: Evan <evanunderscore@gmail.com>
> +Date: Thu, 19 Mar 2020 14:55:07 +1100
> +Subject: [PATCH] Remove expected test failure for new versions of fish (#292)
> +
> +---
> + test/test.py | 7 ++++++-
> + 1 file changed, 6 insertions(+), 1 deletion(-)
> +

Finally, can you remove this git patch header, and instead add a short
free-style comment about what the patch does, and where it comes from
(URL)? See other patches for examples.

Very minor issues, but getting these right will get your patches merged
faster in the future. ;-)

Can you send an updated patch? TIA!
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAl7Fl2gACgkQoqBt8qM6
VPqokQgAyWkbf+5LWFBGw5aGyKBW0qgPo0LkbTtAI6kkXP3MO4HIfIxFnF7Ml0iN
Sa+ZZ2174wxZ5gC3EJsl00oGnrNSAc2A+9r+X4qgMZ+afrEHIQTZDK+i5i8UWYnM
a74OWYG6ZC0mOs7hN9xbBgABPtjZ2BKkllCix5tjqpGDJWKqWGi5LhRjetUiUJsw
96TzTbZlbaFWX/SwyI/s4raRjDHjgfA9a7HXJHPIRwn9pukVB5faU4jUy8C0oZ6I
Ff+eGo/1+WVpvjRepupSyg1HswpOyf4Xh1jklzdghg6p+O90mn6ZH3LWvEIY+SkV
WbcQ79ahwPWfR8SL4+3A1S/6a5OT1g==
=WJu3
-----END PGP SIGNATURE-----

L
L
Lars-Dominik Braun wrote on 22 May 2020 08:31
(name . Marius Bakke)(address . mbakke@fastmail.com)(address . 41392@debbugs.gnu.org)
20200522063135.GB3278@zpidnp36
Hi,

Toggle quote (7 lines)
> Please use punctuations in commit messages.
> Also mention the removed [inputs].
> Here it should say something along the lines of "...fish31.patch": New file.
> ...(dist_patch_DATA): Add it.
> Finally, can you remove this git patch header, and instead add a short
> free-style comment about what the patch does, and where it comes from
> (URL)? See other patches for examples.
all done. See attached updated patch.

Cheers,
Lars
From b02f6b56c0b35e2a47a31516bb9a3a8ad1f82366 Mon Sep 17 00:00:00 2001
From: Lars-Dominik Braun <ldb@leibniz-psychology.org>
Date: Tue, 19 May 2020 09:24:03 +0200
Subject: [PATCH] gnu: python-argcomplete: Update to 1.11.1.

* gnu/packages/python-xyz.scm (python-argcomplete)[version]: Update to 1.11.1.
[arguments]: Remove, obsolete.
[inputs]: Remove as well.
* gnu/packages/patches/python-argcomplete-1.11.1-fish31.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
---
gnu/local.mk | 1 +
.../python-argcomplete-1.11.1-fish31.patch | 29 +++++++++++++++++++
gnu/packages/python-xyz.scm | 23 ++-------------
3 files changed, 33 insertions(+), 20 deletions(-)
create mode 100644 gnu/packages/patches/python-argcomplete-1.11.1-fish31.patch

Toggle diff (90 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index 38b286203e..82497923c8 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1409,6 +1409,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/python-CVE-2018-14647.patch		\
   %D%/packages/patches/python-aiohttp-3.6.2-no-warning-fail.patch	\
   %D%/packages/patches/python-alembic-exceptions-cause.patch	\
+  %D%/packages/patches/python-argcomplete-1.11.1-fish31.patch	\
   %D%/packages/patches/python-axolotl-AES-fix.patch		\
   %D%/packages/patches/python-cairocffi-dlopen-path.patch	\
   %D%/packages/patches/python-cross-compile.patch		\
diff --git a/gnu/packages/patches/python-argcomplete-1.11.1-fish31.patch b/gnu/packages/patches/python-argcomplete-1.11.1-fish31.patch
new file mode 100644
index 0000000000..98f0ca1473
--- /dev/null
+++ b/gnu/packages/patches/python-argcomplete-1.11.1-fish31.patch
@@ -0,0 +1,29 @@
+Upstream commit fixing testcases for fish>=3.1, see
+https://github.com/kislyuk/argcomplete/commit/08bfc8a788e8081515d733e67be026d051c726f7
+
+diff --git a/test/test.py b/test/test.py
+index e91352b..2c34806 100755
+--- a/test/test.py
++++ b/test/test.py
+@@ -28,6 +28,8 @@
+ 
+ BASH_VERSION = subprocess.check_output(['bash', '-c', 'echo $BASH_VERSION']).decode()
+ BASH_MAJOR_VERSION = int(BASH_VERSION.split('.')[0])
++FISH_VERSION_STR = subprocess.check_output(['fish', '-c', 'echo -n $FISH_VERSION']).decode()
++FISH_VERSION_TUPLE = tuple(int(x) for x in FISH_VERSION_STR.split('.'))
+ 
+ 
+ class TempDir(object):
+@@ -1258,8 +1260,11 @@ class TestFish(_TestSh, unittest.TestCase):
+     expected_failures = [
+         'test_parse_special_characters',
+         'test_comp_point',
+-        'test_special_characters_double_quoted'
+     ]
++    if FISH_VERSION_TUPLE < (3, 1):
++        expected_failures.extend([
++            'test_special_characters_double_quoted'
++        ])
+ 
+     skipped = [
+         'test_single_quotes_in_single_quotes',
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index c26a766d64..bc593120aa 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -13014,33 +13014,16 @@ PNG, JPEG, JPEG2000 and GIF files in pure Python.")
 (define-public python-argcomplete
   (package
     (name "python-argcomplete")
-    (version "1.10.3")
+    (version "1.11.1")
     (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "argcomplete" version))
        (sha256
         (base32
-         "02jkc44drb0yjz6x28lvg6rj607n8r2irdpdvyylm8xnycn54zx3"))))
+         "0h1przxffrhqvi46k40pzjsvdrq4zc3sl1pc96kkigqppq0vdrss"))
+       (patches (search-patches "python-argcomplete-1.11.1-fish31.patch"))))
     (build-system python-build-system)
-    (arguments
-     `(#:phases
-       (modify-phases %standard-phases
-         (add-after 'unpack 'embed-tool-references
-           (lambda _
-             (substitute* "argcomplete/bash_completion.d/python-argcomplete.sh"
-               ((" grep")
-                (string-append " " (which "grep")))
-               ((" egrep")
-                (string-append " " (which "egrep")))
-               (("elif which")
-                (string-append "elif " (which "which")))
-               (("\\$\\(which")
-                (string-append "$(" (which "which"))))
-             #t)))))
-    (inputs
-     `(("grep" ,grep)
-       ("which" ,which)))
     (native-inputs
      `(("python-coverage" ,python-coverage)
        ("python-flake8" ,python-flake8)
-- 
2.20.1
-----BEGIN PGP SIGNATURE-----

iQGzBAABCgAdFiEEyk+M9DfXR4/aBV/UQhN3ARo3hEYFAl7HccMACgkQQhN3ARo3
hEZqiQwAj9y74z+akl6iz8r0FCL1GnYIPaS7OGq5zer5ixG9LD/WXJp35O3NcKfS
u3/X+aU+rIkR7jdBk+g4wM/pODKWFHhDxh8gx5FPWyVZfAOcSVOTH0DTT9Y7dc41
+aHxscSepPIpwENf5sHGhkGDNx1QvfqW5AaXOtMKJHPpQb0gtGUgHSwgFJqY5k7t
hrDtgSzRhdqQaE/dgOjBFO0q+PrjRLRkNTDqhFwqLd+Z9wKn6h66ujpdHcTNeDGp
MK6iBQpywo3I6gvoV3KdPZP7WyK+x/R3KPAcQX8vvz6eXOs20UqM21S1nMIi0+qr
hup06rPeIDe8PYOD2jrSolGHJQvLfVnOhiTUCh0i42hNaxZEnIs+Sh9wRmiPevbp
pNt8yGIKiIjPjLGc6hrsLQrAZjG/YumcaB04Do2BvQMm4o0aTB8m0qjKzHhfKgJB
rdkwikHU2usCTrMWfOiIP/jTGfTwm+d+OzybpZoFkGIXDTDnA8OCNSzpxqt5ZPWb
UU1j96fm
=QBPe
-----END PGP SIGNATURE-----


M
M
Marius Bakke wrote on 23 May 2020 20:07
(name . Lars-Dominik Braun)(address . ldb@leibniz-psychology.org)(address . 41392-done@debbugs.gnu.org)
87zh9y7cf1.fsf@devup.no
Lars-Dominik Braun <ldb@leibniz-psychology.org> writes:

Toggle quote (11 lines)
> Hi,
>
>> Please use punctuations in commit messages.
>> Also mention the removed [inputs].
>> Here it should say something along the lines of "...fish31.patch": New file.
>> ...(dist_patch_DATA): Add it.
>> Finally, can you remove this git patch header, and instead add a short
>> free-style comment about what the patch does, and where it comes from
>> (URL)? See other patches for examples.
> all done. See attached updated patch.

Perfect, applied!

I noticed it broke the Python 2 variant, but it only has a single
dependency and is probably not worth fixing. Let's see if anyone
complains and instead remove it later. :-)
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAl7JZmIACgkQoqBt8qM6
VPoEAAgAz0ma1NDJYN4Q3+ytePItma2BVho1Rn2GvhwTv/MIxZwZ0Cl1e3telISF
f946/fmF5e8XjMuOlQbqVCHUe8Kgn/azO2v0YW5Zgn/yuHhPRcmcu4q8gs34DMKN
GtPMWJSUhOcGhx5JerqkcMZapPWHUR5EwplrYCNxgYhmbsjkMVtz2OhiA8HUMBnF
/3ZDvQoMQe8Ze4+5qBD6BUdhY3ipvdvPIFKBzwZGwJjBJuJXWHbn2db7ab4jLjDo
lIllc7LPEVhP+7CLtB/dvZvYLWkvuBj/wzlbb848Uy8tWCaVnMvZUcan6UQHg62b
JpbcuZ5FYtWdP0/NLnDMIISQnblpNw==
=nyKW
-----END PGP SIGNATURE-----

Closed
?
Your comment

This issue is archived.

To comment on this conversation send email to 41392@debbugs.gnu.org