* [gentoo-commits] repo/gentoo:master commit in: dev-python/argh/, dev-python/argh/files/
@ 2023-03-11 9:39 Michał Górny
0 siblings, 0 replies; 2+ messages in thread
From: Michał Górny @ 2023-03-11 9:39 UTC (permalink / raw
To: gentoo-commits
commit: df13710e2bb75ab1898e6957efe25041c4a40427
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sat Mar 11 09:33:21 2023 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sat Mar 11 09:33:21 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=df13710e
dev-python/argh: Remove old
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
dev-python/argh/Manifest | 3 ---
dev-python/argh/argh-0.26.2-r3.ebuild | 29 --------------------
dev-python/argh/argh-0.27.1.ebuild | 28 -------------------
dev-python/argh/argh-0.27.2.ebuild | 28 -------------------
.../argh/files/argh-0.26.2-fix-py3.9-msgs.patch | 31 ----------------------
5 files changed, 119 deletions(-)
diff --git a/dev-python/argh/Manifest b/dev-python/argh/Manifest
index d2d07c988298..9a4a2c64e708 100644
--- a/dev-python/argh/Manifest
+++ b/dev-python/argh/Manifest
@@ -1,4 +1 @@
-DIST argh-0.26.2.tar.gz 32913 BLAKE2B 315dc36c4a98cb4a8fdab68a30ed3d4d87d1565717722ed496255d8b1b4e505277032217da4c5d750f210974890d8094c52f920044173ff2168adf7cb7f6a2bd SHA512 90382900d5cec9629dacb4459a2c9491d1425b66fa3f90d7cbf511dec846a99dbb9424f3e08f0c006da48fbf9c067078705be70b314700541fd800630e4b1707
-DIST argh-0.27.1.tar.gz 49106 BLAKE2B 48f21d920d97111656cb5b18c956c7fdda94ae242f92ebfb02c47b55d5ccc1b82b0ef8b94a721f97fb3638b15b38ce3293fbe46ab123ed9c968efdb2e881d8f3 SHA512 edddd35b2a90c6286818986945e9ea8484dd06bc263016d8c52b0e29475dbad610d673acc0918d0cf62657b1d965bb0d59e51af4c384ae0610f471c748a90999
-DIST argh-0.27.2.tar.gz 49200 BLAKE2B 4599781854feb0aa1b5251f6361bcf4e5e4f96c391fd8be3e5a3397d2a6130ec9111f36ad87dd553345a0d9d6471d20ecca7cd7462d41012c8117d2a07f18290 SHA512 9bed6d5f4ea6407be675b4b5c015e0bda5015ef78289ba9c08503687dc33d91fcda9aabdb9a94b9e3dc11020edf873e51eb1ef9d7ee0831b4f0eb0e302b83b98
DIST argh-0.28.1.tar.gz 62511 BLAKE2B fb06ad73c5d8e8508103007a2213285f52f4d245ade288504616d42847c982a27ca94f0850f87052737c17740de705a9f8557fcafbea6f656e30ca1ed99efffb SHA512 c5d4515f5ba94a60dbcc6fa81812c192b51539ceee349129028a3d736ba1b0eac23135b31fa6d350e9fff778250365848e6c2077553849aeebbb9b67be6774dc
diff --git a/dev-python/argh/argh-0.26.2-r3.ebuild b/dev-python/argh/argh-0.26.2-r3.ebuild
deleted file mode 100644
index 610a5b87e84a..000000000000
--- a/dev-python/argh/argh-0.26.2-r3.ebuild
+++ /dev/null
@@ -1,29 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{9..11} pypy3 )
-DISTUTILS_USE_PEP517=setuptools
-
-inherit distutils-r1
-
-DESCRIPTION="A simple argparse wrapper"
-HOMEPAGE="https://pythonhosted.org/argh/"
-SRC_URI="mirror://pypi/a/${PN}/${P}.tar.gz"
-
-SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ppc ppc64 ~riscv ~s390 sparc x86"
-LICENSE="LGPL-3"
-
-BDEPEND="
- test? (
- dev-python/iocapture[${PYTHON_USEDEP}]
- dev-python/mock[${PYTHON_USEDEP}]
- )"
-
-PATCHES=(
- "${FILESDIR}/${P}-fix-py3.9-msgs.patch"
-)
-
-distutils_enable_tests pytest
diff --git a/dev-python/argh/argh-0.27.1.ebuild b/dev-python/argh/argh-0.27.1.ebuild
deleted file mode 100644
index 5a8b81d933a6..000000000000
--- a/dev-python/argh/argh-0.27.1.ebuild
+++ /dev/null
@@ -1,28 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{9..11} pypy3 )
-DISTUTILS_USE_PEP517=setuptools
-
-inherit distutils-r1 pypi
-
-DESCRIPTION="A simple argparse wrapper"
-HOMEPAGE="
- https://pythonhosted.org/argh/
- https://github.com/neithere/argh/
- https://pypi.org/project/argh/
-"
-
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
-LICENSE="LGPL-3"
-
-BDEPEND="
- test? (
- dev-python/iocapture[${PYTHON_USEDEP}]
- )
-"
-
-distutils_enable_tests pytest
diff --git a/dev-python/argh/argh-0.27.2.ebuild b/dev-python/argh/argh-0.27.2.ebuild
deleted file mode 100644
index 5a8b81d933a6..000000000000
--- a/dev-python/argh/argh-0.27.2.ebuild
+++ /dev/null
@@ -1,28 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{9..11} pypy3 )
-DISTUTILS_USE_PEP517=setuptools
-
-inherit distutils-r1 pypi
-
-DESCRIPTION="A simple argparse wrapper"
-HOMEPAGE="
- https://pythonhosted.org/argh/
- https://github.com/neithere/argh/
- https://pypi.org/project/argh/
-"
-
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
-LICENSE="LGPL-3"
-
-BDEPEND="
- test? (
- dev-python/iocapture[${PYTHON_USEDEP}]
- )
-"
-
-distutils_enable_tests pytest
diff --git a/dev-python/argh/files/argh-0.26.2-fix-py3.9-msgs.patch b/dev-python/argh/files/argh-0.26.2-fix-py3.9-msgs.patch
deleted file mode 100644
index 5835c5acbb8e..000000000000
--- a/dev-python/argh/files/argh-0.26.2-fix-py3.9-msgs.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-diff --git a/test/test_integration.py b/test/test_integration.py
-index 8899d8e..589f6d6 100644
---- a/test/test_integration.py
-+++ b/test/test_integration.py
-@@ -377,7 +377,7 @@ def test_invalid_choice():
- p = DebugArghParser()
- p.add_commands([cmd])
-
-- assert run(p, 'bar', exit=True).startswith('invalid choice')
-+ assert 'invalid choice' in run(p, 'bar', exit=True)
-
- if sys.version_info < (3,3):
- # Python before 3.3 exits with a less informative error
-@@ -391,7 +391,7 @@ def test_invalid_choice():
- p = DebugArghParser()
- p.add_commands([cmd], namespace='nest')
-
-- assert run(p, 'nest bar', exit=True).startswith('invalid choice')
-+ assert 'invalid choice' in run(p, 'nest bar', exit=True)
-
- if sys.version_info < (3,3):
- # Python before 3.3 exits with a less informative error
-@@ -511,7 +511,7 @@ def test_explicit_cmd_name():
-
- p = DebugArghParser()
- p.add_commands([orig_name])
-- assert run(p, 'orig-name', exit=True).startswith('invalid choice')
-+ assert 'invalid choice' in run(p, 'orig-name', exit=True)
- assert run(p, 'new-name').out == 'ok\n'
-
-
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-python/argh/, dev-python/argh/files/
@ 2024-07-12 7:33 Michał Górny
0 siblings, 0 replies; 2+ messages in thread
From: Michał Górny @ 2024-07-12 7:33 UTC (permalink / raw
To: gentoo-commits
commit: 9c0fb575adfcff7bdb2f80c0bae77368d1a1d483
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri Jul 12 07:01:28 2024 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Fri Jul 12 07:33:00 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9c0fb575
dev-python/argh: Enable py3.13
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
dev-python/argh/argh-0.31.2.ebuild | 8 +-
dev-python/argh/files/argh-0.31.2-py313.patch | 164 ++++++++++++++++++++++++++
2 files changed, 170 insertions(+), 2 deletions(-)
diff --git a/dev-python/argh/argh-0.31.2.ebuild b/dev-python/argh/argh-0.31.2.ebuild
index fb61d011ee2d..0c53e95bef20 100644
--- a/dev-python/argh/argh-0.31.2.ebuild
+++ b/dev-python/argh/argh-0.31.2.ebuild
@@ -4,8 +4,7 @@
EAPI=8
DISTUTILS_USE_PEP517=flit
-# py3.13: https://github.com/neithere/argh/issues/228
-PYTHON_COMPAT=( python3_{10..12} pypy3 )
+PYTHON_COMPAT=( python3_{10..13} pypy3 )
inherit distutils-r1 pypi
@@ -27,3 +26,8 @@ BDEPEND="
"
distutils_enable_tests pytest
+
+PATCHES=(
+ # https://github.com/neithere/argh/commit/cdb70d5ac7d8a5a5dff3c55100e5f67b68b26826
+ "${FILESDIR}/${P}-py313.patch"
+)
diff --git a/dev-python/argh/files/argh-0.31.2-py313.patch b/dev-python/argh/files/argh-0.31.2-py313.patch
new file mode 100644
index 000000000000..4049fedc0d0d
--- /dev/null
+++ b/dev-python/argh/files/argh-0.31.2-py313.patch
@@ -0,0 +1,164 @@
+From cdb70d5ac7d8a5a5dff3c55100e5f67b68b26826 Mon Sep 17 00:00:00 2001
+From: Andy Mikhaylenko <neithere@gmail.com>
+Date: Sun, 16 Jun 2024 22:38:21 +0200
+Subject: [PATCH] fix: tests under Python 3.13 (fixes #228)
+
+diff --git a/tests/test_integration.py b/tests/test_integration.py
+index f863386..258a148 100644
+--- a/tests/test_integration.py
++++ b/tests/test_integration.py
+@@ -724,18 +724,34 @@ def remind(
+ help_normalised = re.sub(r"\s+", " ", parser.format_help())
+
+ assert "name 'Basil'" in help_normalised
+- assert "-t TASK, --task TASK 'hang the Moose'" in help_normalised
+- assert (
+- "-r REASON, --reason REASON 'there are creatures living in it'"
+- in help_normalised
+- )
+
+- # explicit help message is not obscured by the implicit one
+- # but is still present
+- assert (
+- "-n NOTE, --note NOTE why is it a remarkable animal? "
+- "(default: 'it can speak English')"
+- ) in help_normalised
++ # argh#228 — argparse in Python before 3.13 duplicated the placeholder in help
++ if sys.version_info < (3, 13):
++ assert "-t TASK, --task TASK 'hang the Moose'" in help_normalised
++ assert (
++ "-r REASON, --reason REASON 'there are creatures living in it'"
++ in help_normalised
++ )
++
++ # explicit help message is not obscured by the implicit one
++ # but is still present
++ assert (
++ "-n NOTE, --note NOTE why is it a remarkable animal? "
++ "(default: 'it can speak English')"
++ ) in help_normalised
++ else:
++ assert "-t, --task TASK 'hang the Moose'" in help_normalised
++ assert (
++ "-r, --reason REASON 'there are creatures living in it'"
++ in help_normalised
++ )
++
++ # explicit help message is not obscured by the implicit one
++ # but is still present
++ assert (
++ "-n, --note NOTE why is it a remarkable animal? "
++ "(default: 'it can speak English')"
++ ) in help_normalised
+
+
+ def test_default_arg_values_in_help__regression():
+@@ -750,9 +766,16 @@ def foo(*, bar=""):
+ # doesn't break
+ parser.format_help()
+
++ # argh#228 — argparse in Python before 3.13 duplicated the placeholder in help
++ if sys.version_info < (3, 13):
++ expected_line = "-b BAR, --bar BAR ''"
++ # note the empty str repr ^^^
++ else:
++ expected_line = "-b, --bar BAR ''"
++ # note the empty str repr ^^^
++
+ # now check details
+- assert "-b BAR, --bar BAR ''" in parser.format_help()
+- # note the empty str repr ^^^
++ assert expected_line in parser.format_help()
+
+
+ def test_help_formatting_is_preserved():
+@@ -868,6 +891,19 @@ def second_func():
+
+ run(parser, "first-func --help", exit=True)
+ captured = capsys.readouterr()
++
++ # argh#228 — argparse in Python before 3.13 duplicated the placeholder in help
++ if sys.version_info < (3, 13):
++ arg_help_lines = (
++ " -h, --help show this help message and exit\n"
++ " -f FOO, --foo FOO 123"
++ )
++ else:
++ arg_help_lines = (
++ " -h, --help show this help message and exit\n"
++ " -f, --foo FOO 123"
++ )
++
+ assert (
+ captured.out
+ == unindent(
+@@ -877,8 +913,7 @@ def second_func():
+ Owl stretching time
+
+ {HELP_OPTIONS_LABEL}:
+- -h, --help show this help message and exit
+- -f FOO, --foo FOO 123
++ {arg_help_lines}
+ """
+ )[1:]
+ )
+@@ -997,6 +1032,19 @@ def second_func():
+
+ run(parser, "my-group first-func --help", exit=True)
+ captured = capsys.readouterr()
++
++ # argh#228 — argparse in Python before 3.13 duplicated the placeholder in help
++ if sys.version_info < (3, 13):
++ arg_help_lines = (
++ " -h, --help show this help message and exit\n"
++ " -f FOO, --foo FOO 123"
++ )
++ else:
++ arg_help_lines = (
++ " -h, --help show this help message and exit\n"
++ " -f, --foo FOO 123"
++ )
++
+ assert (
+ captured.out
+ == unindent(
+@@ -1006,8 +1054,7 @@ def second_func():
+ Owl stretching time
+
+ {HELP_OPTIONS_LABEL}:
+- -h, --help show this help message and exit
+- -f FOO, --foo FOO 123
++ {arg_help_lines}
+ """
+ )[1:]
+ )
+@@ -1079,6 +1126,19 @@ def second_func():
+
+ run(parser, "first-func --help", exit=True)
+ captured = capsys.readouterr()
++
++ # argh#228 — argparse in Python before 3.13 duplicated the placeholder in help
++ if sys.version_info < (3, 13):
++ arg_help_lines = (
++ " -h, --help show this help message and exit\n"
++ " -f FOO, --foo FOO 123"
++ )
++ else:
++ arg_help_lines = (
++ " -h, --help show this help message and exit\n"
++ " -f, --foo FOO 123"
++ )
++
+ assert (
+ captured.out
+ == unindent(
+@@ -1088,8 +1148,7 @@ def second_func():
+ func description override
+
+ {HELP_OPTIONS_LABEL}:
+- -h, --help show this help message and exit
+- -f FOO, --foo FOO 123
++ {arg_help_lines}
+ """
+ )[1:]
+ )
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-07-12 7:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-12 7:33 [gentoo-commits] repo/gentoo:master commit in: dev-python/argh/, dev-python/argh/files/ Michał Górny
-- strict thread matches above, loose matches on Subject: below --
2023-03-11 9:39 Michał Górny
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox