From 50f3a9c47f0c10cb8d1193de6365ca3548003b13 Mon Sep 17 00:00:00 2001 From: Wang Mingyu Date: Tue, 18 Jul 2023 12:25:26 +0800 Subject: python3-click: upgrade 8.1.3 -> 8.1.5 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 0001-tests-Fix-test_bytes_args.patch removed since it's included in 8.1.5 Changelog: ========== -Fix an issue with type hints for @click.command(), @click.option(), and other decorators. Introduce typing tests. -Replace all typing.Dict occurrences to typing.MutableMapping for parameter hints. #2255 -Improve type hinting for decorators and give all generic types parameters. #2398 -Fix return value and type signature of shell_completion.add_completion_class function. #2421 -Bash version detection doesn’t fail on Windows. #2461 -Completion works if there is a dot (.) in the program name. #2166 -Improve type annotations for pyright type checker. #2268 -Improve responsiveness of click.clear(). #2284 -Improve command name detection when using Shiv or PEX. #2332 -Avoid showing empty lines if command help text is empty. #2368 -ZSH completion script works when loaded from fpath. #2344. -EOFError and KeyboardInterrupt tracebacks are not suppressed when standalone_mode is disabled. #2380 -@group.command does not fail if the group was created with a custom command_class. #2416 -multiple=True is allowed for flag options again and does not require setting default=(). #2246, #2292, #2295 -Make the decorators returned by @argument() and @option() reusable when the cls parameter is used. #2294 -Don’t fail when writing filenames to streams with strict errors. Replace invalid bytes with the replacement character -Remove unnecessary attempt to detect MSYS2 environment. #2355 -Remove outdated and unnecessary detection of App Engine environment. #2554 -echo() does not fail when no streams are attached, such as with pythonw on Windows. #2415 -Argument with expose_value=False do not cause completion to fail. #2336 Signed-off-by: Wang Mingyu Signed-off-by: Khem Raj --- .../0001-tests-Fix-test_bytes_args.patch | 41 --------------------- .../recipes-devtools/python/python3-click_8.1.3.bb | 42 ---------------------- .../recipes-devtools/python/python3-click_8.1.5.bb | 39 ++++++++++++++++++++ 3 files changed, 39 insertions(+), 83 deletions(-) delete mode 100644 meta-python/recipes-devtools/python/python3-click/0001-tests-Fix-test_bytes_args.patch delete mode 100644 meta-python/recipes-devtools/python/python3-click_8.1.3.bb create mode 100644 meta-python/recipes-devtools/python/python3-click_8.1.5.bb diff --git a/meta-python/recipes-devtools/python/python3-click/0001-tests-Fix-test_bytes_args.patch b/meta-python/recipes-devtools/python/python3-click/0001-tests-Fix-test_bytes_args.patch deleted file mode 100644 index e69a37c405..0000000000 --- a/meta-python/recipes-devtools/python/python3-click/0001-tests-Fix-test_bytes_args.patch +++ /dev/null @@ -1,41 +0,0 @@ -From da83bd7ca0959027086115f23534957b0917aaa5 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Thu, 27 Apr 2023 22:21:24 -0700 -Subject: [PATCH] tests: Fix test_bytes_args - -sys.stdin.encoding is readonly therefore use Mocking to wrap it. -Sourced from - Alpine - -Upstream-Status: Pending -Signed-off-by: Khem Raj ---- - tests/test_arguments.py | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) - -diff --git a/tests/test_arguments.py b/tests/test_arguments.py -index 735df4b..3395c55 100644 ---- a/tests/test_arguments.py -+++ b/tests/test_arguments.py -@@ -1,4 +1,5 @@ - import sys -+from unittest import mock - - import pytest - -@@ -86,9 +87,12 @@ def test_bytes_args(runner, monkeypatch): - ), "UTF-8 encoded argument should be implicitly converted to Unicode" - - # Simulate empty locale environment variables -- monkeypatch.setattr(sys.stdin, "encoding", "utf-8") - monkeypatch.setattr(sys, "getfilesystemencoding", lambda: "utf-8") - monkeypatch.setattr(sys, "getdefaultencoding", lambda: "utf-8") -+ # sys.stdin.encoding is readonly, needs some extra effort to patch. -+ stdin = mock.Mock(wraps=sys.stdin) -+ stdin.encoding = "utf-8" -+ monkeypatch.setattr(sys, "stdin", stdin) - - runner.invoke( - from_bytes, --- -2.40.1 - diff --git a/meta-python/recipes-devtools/python/python3-click_8.1.3.bb b/meta-python/recipes-devtools/python/python3-click_8.1.3.bb deleted file mode 100644 index 9b8ea94c2a..0000000000 --- a/meta-python/recipes-devtools/python/python3-click_8.1.3.bb +++ /dev/null @@ -1,42 +0,0 @@ -SUMMARY = "A simple wrapper around optparse for powerful command line utilities." -DESCRIPTION = "\ -Click is a Python package for creating beautiful command line interfaces \ -in a composable way with as little code as necessary. It's the "Command \ -Line Interface Creation Kit". It's highly configurable but comes with \ -sensible defaults out of the box." -HOMEPAGE = "http://click.pocoo.org/" -LICENSE = "BSD-3-Clause" -LIC_FILES_CHKSUM = "file://LICENSE.rst;md5=1fa98232fd645608937a0fdc82e999b8" - -SRC_URI[sha256sum] = "7682dc8afb30297001674575ea00d1814d808d6a36af415a82bd481d37ba7b8e" - -inherit pypi setuptools3 ptest - -SRC_URI += " \ - file://0001-tests-Fix-test_bytes_args.patch \ - file://run-ptest \ -" - -RDEPENDS:${PN}-ptest += " \ - ${PYTHON_PN}-pytest \ - ${PYTHON_PN}-terminal \ - ${PYTHON_PN}-unixadmin \ -" - -do_install_ptest() { - install -d ${D}${PTEST_PATH}/tests - cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/ - cp -rf ${S}/setup.cfg ${D}${PTEST_PATH}/ - cp -rf ${S}/docs ${D}${PTEST_PATH}/ -} - -UPSTREAM_CHECK_REGEX = "click/(?P\d+(\.\d+)+)/" - -CLEANBROKEN = "1" - -RDEPENDS:${PN} += "\ - ${PYTHON_PN}-io \ - ${PYTHON_PN}-threading \ - " - -BBCLASSEXTEND = "native nativesdk" diff --git a/meta-python/recipes-devtools/python/python3-click_8.1.5.bb b/meta-python/recipes-devtools/python/python3-click_8.1.5.bb new file mode 100644 index 0000000000..d7d50118e2 --- /dev/null +++ b/meta-python/recipes-devtools/python/python3-click_8.1.5.bb @@ -0,0 +1,39 @@ +SUMMARY = "A simple wrapper around optparse for powerful command line utilities." +DESCRIPTION = "\ +Click is a Python package for creating beautiful command line interfaces \ +in a composable way with as little code as necessary. It's the "Command \ +Line Interface Creation Kit". It's highly configurable but comes with \ +sensible defaults out of the box." +HOMEPAGE = "http://click.pocoo.org/" +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://LICENSE.rst;md5=1fa98232fd645608937a0fdc82e999b8" + +SRC_URI[sha256sum] = "4be4b1af8d665c6d942909916d31a213a106800c47d0eeba73d34da3cbc11367" + +inherit pypi setuptools3 ptest + +SRC_URI += "file://run-ptest" + +RDEPENDS:${PN}-ptest += " \ + ${PYTHON_PN}-pytest \ + ${PYTHON_PN}-terminal \ + ${PYTHON_PN}-unixadmin \ +" + +do_install_ptest() { + install -d ${D}${PTEST_PATH}/tests + cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/ + cp -rf ${S}/setup.cfg ${D}${PTEST_PATH}/ + cp -rf ${S}/docs ${D}${PTEST_PATH}/ +} + +UPSTREAM_CHECK_REGEX = "click/(?P\d+(\.\d+)+)/" + +CLEANBROKEN = "1" + +RDEPENDS:${PN} += "\ + ${PYTHON_PN}-io \ + ${PYTHON_PN}-threading \ + " + +BBCLASSEXTEND = "native nativesdk" -- cgit v1.2.3-54-g00ecf