diff mbox series

[bug#53046] gnu: python-args: Patch reference to basestring.

Message ID 20220106102102.22512-1-tanguy@bioneland.org
State Accepted
Headers show
Series [bug#53046] gnu: python-args: Patch reference to basestring. | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue

Commit Message

Tanguy LE CARROUR Jan. 6, 2022, 10:21 a.m. UTC
This fixes a build failure in the 'sanity-check' phase.

* gnu/packages/python-xyz.scm (python-args)[arguments]:
Replace reference to basestring with str.
---
 gnu/packages/python-xyz.scm | 8 ++++++++
 1 file changed, 8 insertions(+)

Comments

M Jan. 9, 2022, 9:15 p.m. UTC | #1
> This fixes a build failure in the 'sanity-check' phase.
> +             (substitute* "args.py"
> +               (("basestring") "str"))

Does it actually fix the build failure, or is it only suppressed?

Looking at

<https://github.com/kennethreitz-archive/args/blob/master/args.py>,
line 15--18, it appears that basestring should actually be basestring,
at least for Python 2 (python2-args).

Also, returning #true isn't necessary anymore, and this seems better
fit for a snippet.

Greetings,
Maxime.
M Jan. 9, 2022, 9:34 p.m. UTC | #2
Maxime Devos schreef op zo 09-01-2022 om 22:15 [+0100]:
> > This fixes a build failure in the 'sanity-check' phase.
> > +             (substitute* "args.py"
> > +               (("basestring") "str"))
> 
> Does it actually fix the build failure, or is it only suppressed?
> [...]

According to <https://github.com/kennethreitz-archive/args/pull/19>,
the tests are excluded from the tarball.  It would be useful to
switch to git-fetch such that tests can be run, verifying whether
this change causes problems or not.

Greetings,
Maxime
Tanguy LE CARROUR Jan. 10, 2022, 7:46 a.m. UTC | #3
Hi Maxime,


Quoting Maxime Devos (2022-01-09 22:15:41)
> > This fixes a build failure in the 'sanity-check' phase.
> > +             (substitute* "args.py"
> > +               (("basestring") "str"))
> 
> Does it actually fix the build failure, or is it only suppressed?
> 
> Looking at
> 
> <https://github.com/kennethreitz-archive/args/blob/master/args.py>,
> line 15--18, it appears that basestring should actually be basestring,
> at least for Python 2 (python2-args).

Believe it or not, I had totally forgotten about Python 2 when I wrote
that! ^_^'


> Also, returning #true isn't necessary anymore, and this seems better
> fit for a snippet.

OK, I'll fix it.

Thanks for reviewing,
Tanguy LE CARROUR Jan. 10, 2022, 7:48 a.m. UTC | #4
Hi Maxime,


Quoting Maxime Devos (2022-01-09 22:34:52)
> Maxime Devos schreef op zo 09-01-2022 om 22:15 [+0100]:
> > > This fixes a build failure in the 'sanity-check' phase.
> > > +             (substitute* "args.py"
> > > +               (("basestring") "str"))
> > 
> > Does it actually fix the build failure, or is it only suppressed?
> > [...]
> 
> According to <https://github.com/kennethreitz-archive/args/pull/19>,
> the tests are excluded from the tarball.  It would be useful to
> switch to git-fetch such that tests can be run, verifying whether
> this change causes problems or not.

I'll switch to `git-fetch` and see! Maybe Python 2 tests will also pass
with the patch!?

I'll apply all your suggestions and send a v2.

Thanks again for your time and advice.
diff mbox series

Patch

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index c9a0b7d6bf..0d9bfb1711 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -13013,6 +13013,14 @@  (define-public python-args
                (base32
                 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
     (build-system python-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch-args.py
+           (lambda _
+             (substitute* "args.py"
+               (("basestring") "str"))
+             #t)))))
     (home-page "https://github.com/kennethreitz/args")
     (synopsis "Command-line argument parser")
     (description