all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#41392] [PATCH] Upgrade python-argcomplete to 1.11.1
@ 2020-05-19  7:32 Lars-Dominik Braun
  2020-05-20 20:47 ` Marius Bakke
  0 siblings, 1 reply; 4+ messages in thread
From: Lars-Dominik Braun @ 2020-05-19  7:32 UTC (permalink / raw)
  To: 41392


[-- Attachment #1.1: Type: text/plain, Size: 146 bytes --]

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


[-- Attachment #1.2: 0001-gnu-python-argcomplete-Update-to-1.11.1.patch --]
[-- Type: text/x-diff, Size: 4533 bytes --]

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

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


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [bug#41392] [PATCH] Upgrade python-argcomplete to 1.11.1
  2020-05-19  7:32 [bug#41392] [PATCH] Upgrade python-argcomplete to 1.11.1 Lars-Dominik Braun
@ 2020-05-20 20:47 ` Marius Bakke
  2020-05-22  6:31   ` Lars-Dominik Braun
  0 siblings, 1 reply; 4+ messages in thread
From: Marius Bakke @ 2020-05-20 20:47 UTC (permalink / raw)
  To: Lars-Dominik Braun, 41392

[-- Attachment #1: Type: text/plain, Size: 1869 bytes --]

Lars-Dominik Braun <ldb@leibniz-psychology.org> writes:

> 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:

> 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.

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

Also mention the removed [inputs].

> * 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.

> 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!

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [bug#41392] [PATCH] Upgrade python-argcomplete to 1.11.1
  2020-05-20 20:47 ` Marius Bakke
@ 2020-05-22  6:31   ` Lars-Dominik Braun
  2020-05-23 18:07     ` bug#41392: " Marius Bakke
  0 siblings, 1 reply; 4+ messages in thread
From: Lars-Dominik Braun @ 2020-05-22  6:31 UTC (permalink / raw)
  To: Marius Bakke; +Cc: 41392


[-- Attachment #1.1: Type: text/plain, Size: 439 bytes --]

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.

Cheers,
Lars


[-- Attachment #1.2: 0001-gnu-python-argcomplete-Update-to-1.11.1.patch --]
[-- Type: text/x-diff, Size: 4382 bytes --]

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

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


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* bug#41392: [PATCH] Upgrade python-argcomplete to 1.11.1
  2020-05-22  6:31   ` Lars-Dominik Braun
@ 2020-05-23 18:07     ` Marius Bakke
  0 siblings, 0 replies; 4+ messages in thread
From: Marius Bakke @ 2020-05-23 18:07 UTC (permalink / raw)
  To: Lars-Dominik Braun; +Cc: 41392-done

[-- Attachment #1: Type: text/plain, Size: 689 bytes --]

Lars-Dominik Braun <ldb@leibniz-psychology.org> writes:

> 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.  :-)

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-05-23 18:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-05-19  7:32 [bug#41392] [PATCH] Upgrade python-argcomplete to 1.11.1 Lars-Dominik Braun
2020-05-20 20:47 ` Marius Bakke
2020-05-22  6:31   ` Lars-Dominik Braun
2020-05-23 18:07     ` bug#41392: " Marius Bakke

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.