Six is only needed to support Python 2 and 3 in a single script, but Py2 was EOL six years ago now. Patch out the need for six, and drop it as a dependency.
Also remove a redundant FILESEXTRAPATHS from when there were python- and python3- versions of the recipe. Signed-off-by: Ross Burton <[email protected]> --- .../0001-Remove-usage-of-six.patch | 62 +++++++++++++++++++ .../python/python3-rfc3339-validator_0.1.4.bb | 3 +- 2 files changed, 63 insertions(+), 2 deletions(-) create mode 100644 meta/recipes-devtools/python/python3-rfc3339-validator/0001-Remove-usage-of-six.patch diff --git a/meta/recipes-devtools/python/python3-rfc3339-validator/0001-Remove-usage-of-six.patch b/meta/recipes-devtools/python/python3-rfc3339-validator/0001-Remove-usage-of-six.patch new file mode 100644 index 00000000000..ad34b21edb1 --- /dev/null +++ b/meta/recipes-devtools/python/python3-rfc3339-validator/0001-Remove-usage-of-six.patch @@ -0,0 +1,62 @@ +From 9e74298b018d61f93768061800fa670de8e34dfe Mon Sep 17 00:00:00 2001 +From: Ross Burton <[email protected]> +Date: Mon, 14 Sep 2026 22:27:29 +0100 +Subject: [PATCH] Remove usage of six + +The last release of Python 2 was 2.7.18, released in April 2020. Python +was officially end-of-life in 2020. I think it's time to stop catering +for people using Python 2, so drop the usage of six. + +Closes #11. + +Upstream-Status: Submitted [https://github.com/naimetti/rfc3339-validator/pull/14] +Signed-off-by: Ross Burton <[email protected]> +--- + rfc3339_validator.py | 7 +------ + setup.py | 4 +--- + tests/test_rfc3339_validator.py | 9 +-------- + 3 files changed, 3 insertions(+), 17 deletions(-) + +diff --git a/rfc3339_validator.py b/rfc3339_validator.py +index 4be5e87..efc9b7d 100644 +--- a/rfc3339_validator.py ++++ b/rfc3339_validator.py +@@ -6,11 +6,6 @@ __version__ = '0.1.4' + + import re + import calendar +-import six +- +-RFC3339_REGEX_FLAGS = 0 +-if six.PY3: +- RFC3339_REGEX_FLAGS |= re.ASCII + + RFC3339_REGEX = re.compile(r""" + ^ +@@ -30,7 +25,7 @@ RFC3339_REGEX = re.compile(r""" + | [+-](?:[01]\d|2[0123]):[0-5]\d # Offset + ) + $ +-""", re.VERBOSE | RFC3339_REGEX_FLAGS) ++""", re.VERBOSE | re.ASCII) + + + def validate_rfc3339(date_string): +diff --git a/setup.py b/setup.py +index 73186bd..b9936b0 100644 +--- a/setup.py ++++ b/setup.py +@@ -8,9 +8,7 @@ from setuptools import setup, find_packages + with open('README.md') as readme_file: + readme = readme_file.read() + +-requirements = [ +- 'six', +-] ++requirements = [] + + setup_requirements = [] + +-- +2.43.0 + diff --git a/meta/recipes-devtools/python/python3-rfc3339-validator_0.1.4.bb b/meta/recipes-devtools/python/python3-rfc3339-validator_0.1.4.bb index 242176dd757..06eb833f7a9 100644 --- a/meta/recipes-devtools/python/python3-rfc3339-validator_0.1.4.bb +++ b/meta/recipes-devtools/python/python3-rfc3339-validator_0.1.4.bb @@ -3,7 +3,7 @@ HOMEPAGE = "https://github.com/naimetti/rfc3339-validator" LICENSE = "MIT" LIC_FILES_CHKSUM = "file://LICENSE;md5=a21b13b5a996f08f7e0b088aa38ce9c6" -FILESEXTRAPATHS:prepend := "${THISDIR}/python-rfc3339-validator:" +SRC_URI += "file://0001-Remove-usage-of-six.patch" SRC_URI[sha256sum] = "138a2abdf93304ad60530167e51d2dfb9549521a836871b88d7f4695d0022f6b" @@ -14,7 +14,6 @@ inherit pypi setuptools3 RDEPENDS:${PN} += "\ python3-core \ python3-datetime \ - python3-six \ " BBCLASSEXTEND = "native nativesdk" -- 2.43.0
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#245796): https://lists.openembedded.org/g/openembedded-core/message/245796 Mute This Topic: https://lists.openembedded.org/mt/121251685/21656 Group Owner: [email protected] Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
