From 115faefc47e48f80afa9ae4e1145a42c77f75de7 Mon Sep 17 00:00:00 2001 From: Leon Anavi Date: Thu, 20 Mar 2025 14:32:27 +0200 Subject: python3-pylint: Upgrade 3.3.4 -> 3.3.6 Upgrade to release 3.3.6: - Fix a false positive for used-before-assignment when an inner function's return type annotation is a class defined at module scope. - Fix false positives for use-implicit-booleaness-not-comparison, use-implicit-booleaness-not-comparison-to-string and use-implicit-booleaness-not-comparison-to-zero when chained comparisons are checked. - Fix a false positive for invalid-getnewargs-ex-returned when the tuple or dict has been assigned to a name. - Remove getopt and optparse from the list of deprecated modules. - Fixed conditional import x.y causing false positive possibly-used-before-assignment. - Fix a crash when something besides a class is found in an except handler. - Fixed raising invalid-name when using camelCase for private methods with two leading underscores. Signed-off-by: Leon Anavi Signed-off-by: Khem Raj --- ...t.toml-Keep-tool.setuptools.license-files.patch | 48 ++++++++++++++++++ .../python/python3-pylint_3.3.4.bb | 58 --------------------- .../python/python3-pylint_3.3.6.bb | 59 ++++++++++++++++++++++ 3 files changed, 107 insertions(+), 58 deletions(-) create mode 100644 meta-python/recipes-devtools/python/python3-pylint/0002-pyproject.toml-Keep-tool.setuptools.license-files.patch delete mode 100644 meta-python/recipes-devtools/python/python3-pylint_3.3.4.bb create mode 100644 meta-python/recipes-devtools/python/python3-pylint_3.3.6.bb (limited to 'meta-python') diff --git a/meta-python/recipes-devtools/python/python3-pylint/0002-pyproject.toml-Keep-tool.setuptools.license-files.patch b/meta-python/recipes-devtools/python/python3-pylint/0002-pyproject.toml-Keep-tool.setuptools.license-files.patch new file mode 100644 index 0000000000..28ed0c8951 --- /dev/null +++ b/meta-python/recipes-devtools/python/python3-pylint/0002-pyproject.toml-Keep-tool.setuptools.license-files.patch @@ -0,0 +1,48 @@ +From 2a08adb0e90219626dac0b6d05a21265e460eae2 Mon Sep 17 00:00:00 2001 +From: Leon Anavi +Date: Thu, 20 Mar 2025 12:09:42 +0000 +Subject: [PATCH] pyproject.toml: Keep tool.setuptools.license-files + +Keep legacy license declaration and tool.setuptools.license-files +to avoid the following errors: + +| ValueError: invalid pyproject.toml config: `project.license`. +| configuration error: `project.license` must be valid exactly by one definition (2 matches found): + +| ValueError: invalid pyproject.toml config: `project`. +| configuration error: `project` must not contain {'license-files'} properties + +Upstream-Status: Inappropriate + +Signed-off-by: Leon Anavi +--- + pyproject.toml | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/pyproject.toml b/pyproject.toml +index 0cf1ade57..7a4665ce0 100644 +--- a/pyproject.toml ++++ b/pyproject.toml +@@ -8,8 +8,7 @@ name = "pylint" + description = "python code static checker" + readme = "README.rst" + keywords = [ "lint", "linter", "python", "static code analysis" ] +-license = "GPL-2.0-or-later" +-license-files = [ "LICENSE", "CONTRIBUTORS.txt" ] ++license = { text = "GPL-2.0-or-later" } + authors = [ + { name = "Python Code Quality Authority", email = "code-quality@python.org" }, + ] +@@ -65,6 +64,9 @@ scripts.pylint-config = "pylint:_run_pylint_config" + scripts.pyreverse = "pylint:run_pyreverse" + scripts.symilar = "pylint:run_symilar" + ++[tool.setuptools] ++license-files = [ "LICENSE", "CONTRIBUTORS.txt" ] ++ + [tool.setuptools.packages.find] + include = [ "pylint*" ] + +-- +2.39.5 + diff --git a/meta-python/recipes-devtools/python/python3-pylint_3.3.4.bb b/meta-python/recipes-devtools/python/python3-pylint_3.3.4.bb deleted file mode 100644 index 92378d7fda..0000000000 --- a/meta-python/recipes-devtools/python/python3-pylint_3.3.4.bb +++ /dev/null @@ -1,58 +0,0 @@ -SUMMARY = "Pylint is a Python source code analyzer" -HOMEPAGE = "http://www.pylint.org/" -LICENSE = "GPL-2.0-only" -LIC_FILES_CHKSUM = "file://LICENSE;md5=c107cf754550e65755c42985a5d4e9c9" - -SRCREV = "c2b01c3d0b6410d4c93eb1f32fb28f2116b1e68f" -SRC_URI += "git://github.com/pylint-dev/pylint;branch=main;protocol=https \ - file://0001-Adjust-test-expectations-for-ptest.patch \ - file://run-ptest \ - " - -inherit python_setuptools_build_meta ptest - -S = "${WORKDIR}/git" - -RDEPENDS:${PN} += "\ - python3-astroid \ - python3-difflib \ - python3-dill \ - python3-isort \ - python3-json \ - python3-mccabe \ - python3-netserver \ - python3-numbers \ - python3-pkgutil \ - python3-platformdirs \ - python3-shell \ - python3-tomlkit \ - " -# python3-misc for timeit.py -RDEPENDS:${PN}-ptest += " \ - python3-core \ - python3-git \ - python3-misc \ - python3-py \ - python3-pytest \ - python3-pytest-benchmark \ - python3-pytest-runner \ - python3-pytest-timeout \ - python3-pytest-xdist \ - python3-requests \ - python3-statistics \ - python3-tomllib \ - python3-typing-extensions \ - python3-unittest-automake-output \ - " - -do_install_ptest() { - install -d ${D}${PTEST_PATH}/tests - cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/ - install -Dm 0644 ${S}/tests/.pylint_primer_tests/.gitkeep ${D}${PTEST_PATH}/tests/.pylint_primer_tests/.gitkeep - sed -i 's#/usr/bin/python$#/usr/bin/python3#g' ${D}${PTEST_PATH}/tests/data/a_script - # regression_distutil_import_error_73.py fails to run see - # https://lists.openembedded.org/g/openembedded-devel/topic/103181847 - rm ${D}${PTEST_PATH}/tests/functional/r/regression_02/regression_distutil_import_error_73.py -} - -BBCLASSEXTEND = "native nativesdk" diff --git a/meta-python/recipes-devtools/python/python3-pylint_3.3.6.bb b/meta-python/recipes-devtools/python/python3-pylint_3.3.6.bb new file mode 100644 index 0000000000..f70049c898 --- /dev/null +++ b/meta-python/recipes-devtools/python/python3-pylint_3.3.6.bb @@ -0,0 +1,59 @@ +SUMMARY = "Pylint is a Python source code analyzer" +HOMEPAGE = "http://www.pylint.org/" +LICENSE = "GPL-2.0-only" +LIC_FILES_CHKSUM = "file://LICENSE;md5=c107cf754550e65755c42985a5d4e9c9" + +SRCREV = "7ac5a4d4f77576df3a00e63f86ca86e0e1780b47" +SRC_URI += "git://github.com/pylint-dev/pylint;branch=maintenance/3.3.x;protocol=https \ + file://0001-Adjust-test-expectations-for-ptest.patch \ + file://0002-pyproject.toml-Keep-tool.setuptools.license-files.patch \ + file://run-ptest \ + " + +inherit python_setuptools_build_meta ptest + +S = "${WORKDIR}/git" + +RDEPENDS:${PN} += "\ + python3-astroid \ + python3-difflib \ + python3-dill \ + python3-isort \ + python3-json \ + python3-mccabe \ + python3-netserver \ + python3-numbers \ + python3-pkgutil \ + python3-platformdirs \ + python3-shell \ + python3-tomlkit \ + " +# python3-misc for timeit.py +RDEPENDS:${PN}-ptest += " \ + python3-core \ + python3-git \ + python3-misc \ + python3-py \ + python3-pytest \ + python3-pytest-benchmark \ + python3-pytest-runner \ + python3-pytest-timeout \ + python3-pytest-xdist \ + python3-requests \ + python3-statistics \ + python3-tomllib \ + python3-typing-extensions \ + python3-unittest-automake-output \ + " + +do_install_ptest() { + install -d ${D}${PTEST_PATH}/tests + cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/ + install -Dm 0644 ${S}/tests/.pylint_primer_tests/.gitkeep ${D}${PTEST_PATH}/tests/.pylint_primer_tests/.gitkeep + sed -i 's#/usr/bin/python$#/usr/bin/python3#g' ${D}${PTEST_PATH}/tests/data/a_script + # regression_distutil_import_error_73.py fails to run see + # https://lists.openembedded.org/g/openembedded-devel/topic/103181847 + rm ${D}${PTEST_PATH}/tests/functional/r/regression_02/regression_distutil_import_error_73.py +} + +BBCLASSEXTEND = "native nativesdk" -- cgit v1.2.3-54-g00ecf