Skip to contentSkip to conversation

python3-requests-toolbelt: upgrade 0.9.1 -> 0.10.1

PATCH In review nmali 2 participants 5 messages Aug 23, 2023 – Sep 23, 2023 2 messages not in the archive Arm STM32

lore
Share & tools
lore

nmali

author
#0 lore raw

PATCH v2 1/2 python3-requests-toolbelt: upgrade 0.9.1 -> 0.10.1

From: Narpat Mali <[email protected]>

Changelog:
https://pyup.io/packages/pypi/requests-toolbelt/changelog
https://github.com/requests/toolbelt/blob/master/HISTORY.rst

- License-Update: url of License changed from http to https.
- Fixing missing newline in dump utility.
- Add support for preparing requests in BaseUrlSession.
- Fix urllib3 warning to only emit on X509Adapter usage

Upstream master patches:
0.9.1 -> 0.10.0 : https://git.openembedded.org/meta-openembedded/commit/?id=a4f2646ef27a3f27bc607d57b8166071f307426f
0.10.0 -> 0.10.1 : https://git.openembedded.org/meta-openembedded/commit/?id=b5cd6f6164eb3ab0403f610236ac0cbbe5459671

---
 ...abc-deprecation-warning-in-downloadu.patch | 41 -------------------
 ...bb => python3-requests-toolbelt_0.10.1.bb} |  8 ++--
 2 files changed, 3 insertions(+), 46 deletions(-)
 delete mode 100644 meta-python/recipes-devtools/python/python3-requests-toolbelt/0001-Fix-collections.abc-deprecation-warning-in-downloadu.patch
 rename meta-python/recipes-devtools/python/{python3-requests-toolbelt_0.9.1.bb => python3-requests-toolbelt_0.10.1.bb} (70%)
meta-python/recipes-devtools/python/python3-requests-toolbelt/0001-Fix-collections.abc-deprecation-warning-in-downloadu.patch deleted +0 -41
deleted file mode 100644
index baa833b6d2..0000000000
@@ -1,41 +0,0 @@
-From 7188b06330e5260be20bce8cbcf0d5ae44e34eaf Mon Sep 17 00:00:00 2001
-From: Jon Dufresne <[email protected]>
-Date: Fri, 1 Feb 2019 16:30:01 -0800
-Subject: [PATCH] Fix collections.abc deprecation warning in downloadutils
-
-Warning appears as:
-
-tests/test_downloadutils.py::test_stream_response_to_specific_filename
-  requests_toolbelt/downloadutils/stream.py:161: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working
-    if path and isinstance(getattr(path, 'write', None), collections.Callable):
-
-Upstream-Status: Backport [https://github.com/requests/toolbelt/commit/7188b06330e5260be20bce8cbcf0d5ae44e34eaf]
-
-Signed-off-by: Narpat Mali <[email protected]>
----
- requests_toolbelt/downloadutils/stream.py | 3 +--
- 1 file changed, 1 insertion(+), 2 deletions(-)
-
-diff --git a/requests_toolbelt/downloadutils/stream.py b/requests_toolbelt/downloadutils/stream.py
-index eed60a7..1d1c31b 100644
---- a/requests_toolbelt/downloadutils/stream.py
-+++ b/requests_toolbelt/downloadutils/stream.py
-@@ -1,6 +1,5 @@
- # -*- coding: utf-8 -*-
- """Utilities for dealing with streamed requests."""
--import collections
- import os.path
- import re
- 
-@@ -158,7 +157,7 @@ def stream_response_to_file(response, path=None, chunksize=_DEFAULT_CHUNKSIZE):
-     pre_opened = False
-     fd = None
-     filename = None
--    if path and isinstance(getattr(path, 'write', None), collections.Callable):
-+    if path and callable(getattr(path, 'write', None)):
-         pre_opened = True
-         fd = path
-         filename = getattr(fd, 'name', None)
--- 
-2.25.1
-
meta-python/recipes-devtools/python/python3-requests-toolbelt_0.10.1.bb renamed from meta-python/recipes-devtools/python/python3-requests-toolbelt_0.9.1.bb +3 -5
similarity index 70%
rename from meta-python/recipes-devtools/python/python3-requests-toolbelt_0.9.1.bb
rename to meta-python/recipes-devtools/python/python3-requests-toolbelt_0.10.1.bb
index 72ad7a6180..c39950ab5d 100644
@@ -3,14 +3,12 @@ HOMEPAGE = "https://toolbelt.readthedocs.org"
 AUTHOR = "Ian Cordasco, Cory Benfield"
 
 LICENSE = "Apache-2.0"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=71760e0f1dda8cff91b0bc9246caf571"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=6f14302a4b4099009ab38b4dde5f1075"
 
 SRC_URI = "file://run-ptest \
-           file://0001-Fix-collections.abc-deprecation-warning-in-downloadu.patch \
-           "
+          "
 
-SRC_URI[md5sum] = "b1509735c4b4cf95df2619facbc3672e"
-SRC_URI[sha256sum] = "968089d4584ad4ad7c171454f0a5c6dac23971e9472521ea3b6d49d610aa6fc0"
+SRC_URI[sha256sum] = "62e09f7ff5ccbda92772a29f394a49c3ad6cb181d568b1337626b2abb628a63d"
 
 inherit pypi setuptools3 ptest
 
Signature · 1 line
2.40.0
author
#1 lore raw

PATCH v2 2/2 Introduce python3-trustme to fix ptest error of python3-requests-toolbelt

From: Narpat Mali <[email protected]>

The ptest fails after python3-requests-toolbelt is upgraded to 0.10.1.

=======================================================
Hint: make sure your test modules/packages have valid Python names. Traceback:
../../python3.11/importlib/{}init{}.py:126: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
tests/test_x509_adapter.py:20: in <module>
import trustme
E ModuleNotFoundError: No module named 'trustme'
=======================================================

The commit b93b4067ea "Fix x509 tests by using trustme" of python3-requests-toolbelt introduces the trustme in test_x509_adapter.py.

Introducing python3-trustme to fix ptest error of python3-requests-toolbelt, also introducing python3-service-identity, which is requested by python3-trustme's ptest.

The ptest passes of all the three packages.

Cherry-picked the upstream master commit:
https://git.openembedded.org/meta-openembedded/commit/?id=a4b6e3ee894047cd13c5d2b7bfc67f0093899537

---
 .../packagegroups/packagegroup-meta-python.bb |  2 ++
 .../python3-requests-toolbelt_0.10.1.bb       |  1 +
 .../python/python3-service-identity/run-ptest |  3 +++
 .../python/python3-service-identity_21.1.0.bb | 25 +++++++++++++++++
 .../python/python3-trustme/run-ptest          |  3 +++
 .../python/python3-trustme_0.9.0.bb           | 27 +++++++++++++++++++
 6 files changed, 61 insertions(+)
 create mode 100644 meta-python/recipes-devtools/python/python3-service-identity/run-ptest
 create mode 100644 meta-python/recipes-devtools/python/python3-service-identity_21.1.0.bb
 create mode 100644 meta-python/recipes-devtools/python/python3-trustme/run-ptest
 create mode 100644 meta-python/recipes-devtools/python/python3-trustme_0.9.0.bb
meta-python/recipes-core/packagegroups/packagegroup-meta-python.bb +2 -0
index fdeb83c42a..c2481eb307 100644
@@ -373,6 +373,7 @@ RDEPENDS:packagegroup-meta-python3 = "\
     python3-send2trash \
     python3-sentry-sdk \
     python3-serpent \
+    python3-service-identity \
     python3-sh \
     python3-sijax \
     python3-simpleeval \
@@ -408,6 +409,7 @@ RDEPENDS:packagegroup-meta-python3 = "\
     python3-trafaret-config \
     python3-traitlets \
     python3-transitions \
+    python3-trustme \
     python3-twine \
     python3-twisted \
     python3-twitter \
meta-python/recipes-devtools/python/python3-requests-toolbelt_0.10.1.bb +1 -0
index c39950ab5d..7191a3e6c1 100644
@@ -21,6 +21,7 @@ RDEPENDS:${PN}-ptest += " \
 	${PYTHON_PN}-betamax \
 	${PYTHON_PN}-mock \
 	${PYTHON_PN}-multiprocessing \
+        ${PYTHON_PN}-trustme \
 "
 
 do_install_ptest() {
meta-python/recipes-devtools/python/python3-service-identity/run-ptest new file +3 -0
new file mode 100644
index 0000000000..b63c4de0d9
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+pytest -o log_cli=true -o log_cli_level=INFO | sed -e 's/\[...%\]//g'| sed -e 's/PASSED/PASS/g'| sed -e 's/FAILED/FAIL/g'|sed -e 's/SKIPPED/SKIP/g'| awk '{if ($NF=="PASS" || $NF=="FAIL" || $NF=="SKIP" || $NF=="XFAIL" || $NF=="XPASS"){printf "%s: %s\n", $NF, $0}else{print}}'| awk '{if ($NF=="PASS" || $NF=="FAIL" || $NF=="SKIP" || $NF=="XFAIL" || $NF=="XPASS") {$NF="";print $0}else{print}}'
meta-python/recipes-devtools/python/python3-service-identity_21.1.0.bb new file +25 -0
new file mode 100644
index 0000000000..0210a5de22
@@ -0,0 +1,25 @@
+DESCRIPTION = "The tools for verifying whether a certificate is valid for the intended purposes."
+HOMEPAGE = "https://pypi.org/project/service-identity"
+AUTHOR = "Hynek Schlawack"
+
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=8a0f079f4e6a215d6bd6f9d97cab4d5f"
+
+SRC_URI[md5sum] = "5e5c195d8fcedc72f9068be2ad9b5a13"
+SRC_URI[sha256sum] = "6e6c6086ca271dc11b033d17c3a8bea9f24ebff920c587da090afc9519419d34"
+
+inherit pypi setuptools3 ptest
+
+SRC_URI += " \
+	file://run-ptest \
+"
+
+RDEPENDS:${PN}-ptest += " \
+	${PYTHON_PN}-pytest \
+"
+
+do_install_ptest() {
+	install -d ${D}${PTEST_PATH}/tests
+	cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/
+	cp -rf ${S}/setup.py ${D}${PTEST_PATH}
+}
meta-python/recipes-devtools/python/python3-trustme/run-ptest new file +3 -0
new file mode 100644
index 0000000000..b63c4de0d9
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+pytest -o log_cli=true -o log_cli_level=INFO | sed -e 's/\[...%\]//g'| sed -e 's/PASSED/PASS/g'| sed -e 's/FAILED/FAIL/g'|sed -e 's/SKIPPED/SKIP/g'| awk '{if ($NF=="PASS" || $NF=="FAIL" || $NF=="SKIP" || $NF=="XFAIL" || $NF=="XPASS"){printf "%s: %s\n", $NF, $0}else{print}}'| awk '{if ($NF=="PASS" || $NF=="FAIL" || $NF=="SKIP" || $NF=="XFAIL" || $NF=="XPASS") {$NF="";print $0}else{print}}'
meta-python/recipes-devtools/python/python3-trustme_0.9.0.bb new file +27 -0
new file mode 100644
index 0000000000..641512c46c
@@ -0,0 +1,27 @@
+DESCRIPTION = "A utility provides a fake certificate authority (CA)"
+HOMEPAGE = "https://pypi.org/project/trustme"
+AUTHOR = "Nathaniel J. Smith"
+
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=d5a7af1a4b73e57431e25d15a2da745a"
+
+SRC_URI[md5sum] = "0e4d698e5aecaf8306cf440bf3dcbbe0"
+SRC_URI[sha256sum] = "5e07b23d70ceed64f3bb36ae4b9abc52354c16c98d45ab037bee2b5fbffe586c"
+
+inherit pypi setuptools3 ptest
+
+SRC_URI += " \
+	file://run-ptest \
+"
+
+RDEPENDS:${PN}-ptest += " \
+	${PYTHON_PN}-pytest \
+	${PYTHON_PN}-service-identity \
+	${PYTHON_PN}-pyasn1-modules \
+"
+
+do_install_ptest() {
+	install -d ${D}${PTEST_PATH}/tests
+	cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/
+	cp -rf ${S}/setup.py ${D}${PTEST_PATH}
+}
Signature · 1 line
2.40.0

A message that is not in the archive (sent off-list or not yet received): [email protected]

#3 lore raw

Re: [oe] [meta-python][kirkstone][PATCH v2 2/2] Introduce python3-trustme to fix ptest error of python3-requests-toolbelt

Gentle Reminder !!

../Narpat

Quoted 167 lines · Narpat Mali via lists.openembedded.org

From: Narpat Mali <[email protected]>

The ptest fails after python3-requests-toolbelt is upgraded to 0.10.1.

=======================================================
Hint: make sure your test modules/packages have valid Python names. Traceback:
../../python3.11/importlib/{}init{}.py:126: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
tests/test_x509_adapter.py:20: in <module>
import trustme
E ModuleNotFoundError: No module named 'trustme'
=======================================================

The commit b93b4067ea "Fix x509 tests by using trustme" of python3-requests-toolbelt introduces the trustme in test_x509_adapter.py.

Introducing python3-trustme to fix ptest error of python3-requests-toolbelt, also introducing python3-service-identity, which is requested by python3-trustme's ptest.

The ptest passes of all the three packages.

Cherry-picked the upstream master commit:
https://git.openembedded.org/meta-openembedded/commit/?id=a4b6e3ee894047cd13c5d2b7bfc67f0093899537

---
  .../packagegroups/packagegroup-meta-python.bb |  2 ++
  .../python3-requests-toolbelt_0.10.1.bb       |  1 +
  .../python/python3-service-identity/run-ptest |  3 +++
  .../python/python3-service-identity_21.1.0.bb | 25 +++++++++++++++++
  .../python/python3-trustme/run-ptest          |  3 +++
  .../python/python3-trustme_0.9.0.bb           | 27 +++++++++++++++++++
  6 files changed, 61 insertions(+)

create mode 100644 meta-python/recipes-devtools/python/python3-service-identity/run-ptest create mode 100644 meta-python/recipes-devtools/python/python3-service-identity_21.1.0.bb create mode 100644 meta-python/recipes-devtools/python/python3-trustme/run-ptest create mode 100644 meta-python/recipes-devtools/python/python3-trustme_0.9.0.bb

meta-python/recipes-core/packagegroups/packagegroup-meta-python.bb +2 -0
index fdeb83c42a..c2481eb307 100644
@@ -373,6 +373,7 @@ RDEPENDS:packagegroup-meta-python3 = "\
      python3-send2trash \
      python3-sentry-sdk \
      python3-serpent \
+    python3-service-identity \
      python3-sh \
      python3-sijax \
      python3-simpleeval \
@@ -408,6 +409,7 @@ RDEPENDS:packagegroup-meta-python3 = "\
      python3-trafaret-config \
      python3-traitlets \
      python3-transitions \
+    python3-trustme \
      python3-twine \
      python3-twisted \
      python3-twitter \
meta-python/recipes-devtools/python/python3-requests-toolbelt_0.10.1.bb +1 -0
index c39950ab5d..7191a3e6c1 100644
@@ -21,6 +21,7 @@ RDEPENDS:${PN}-ptest += " \
  	${PYTHON_PN}-betamax \
  	${PYTHON_PN}-mock \
  	${PYTHON_PN}-multiprocessing \
+        ${PYTHON_PN}-trustme \
  "
 
  do_install_ptest() {
meta-python/recipes-devtools/python/python3-service-identity/run-ptest new file +3 -0
new file mode 100644
index 0000000000..b63c4de0d9
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+pytest -o log_cli=true -o log_cli_level=INFO | sed -e 's/\[...%\]//g'| sed -e 's/PASSED/PASS/g'| sed -e 's/FAILED/FAIL/g'|sed -e 's/SKIPPED/SKIP/g'| awk '{if ($NF=="PASS" || $NF=="FAIL" || $NF=="SKIP" || $NF=="XFAIL" || $NF=="XPASS"){printf "%s: %s\n", $NF, $0}else{print}}'| awk '{if ($NF=="PASS" || $NF=="FAIL" || $NF=="SKIP" || $NF=="XFAIL" || $NF=="XPASS") {$NF="";print $0}else{print}}'
meta-python/recipes-devtools/python/python3-service-identity_21.1.0.bb new file +25 -0
new file mode 100644
index 0000000000..0210a5de22
@@ -0,0 +1,25 @@
+DESCRIPTION = "The tools for verifying whether a certificate is valid for the intended purposes."
+HOMEPAGE = "https://pypi.org/project/service-identity"
+AUTHOR = "Hynek Schlawack"
+
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=8a0f079f4e6a215d6bd6f9d97cab4d5f"
+
+SRC_URI[md5sum] = "5e5c195d8fcedc72f9068be2ad9b5a13"
+SRC_URI[sha256sum] = "6e6c6086ca271dc11b033d17c3a8bea9f24ebff920c587da090afc9519419d34"
+
+inherit pypi setuptools3 ptest
+
+SRC_URI += " \
+	file://run-ptest \
+"
+
+RDEPENDS:${PN}-ptest += " \
+	${PYTHON_PN}-pytest \
+"
+
+do_install_ptest() {
+	install -d ${D}${PTEST_PATH}/tests
+	cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/
+	cp -rf ${S}/setup.py ${D}${PTEST_PATH}
+}
meta-python/recipes-devtools/python/python3-trustme/run-ptest new file +3 -0
new file mode 100644
index 0000000000..b63c4de0d9
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+pytest -o log_cli=true -o log_cli_level=INFO | sed -e 's/\[...%\]//g'| sed -e 's/PASSED/PASS/g'| sed -e 's/FAILED/FAIL/g'|sed -e 's/SKIPPED/SKIP/g'| awk '{if ($NF=="PASS" || $NF=="FAIL" || $NF=="SKIP" || $NF=="XFAIL" || $NF=="XPASS"){printf "%s: %s\n", $NF, $0}else{print}}'| awk '{if ($NF=="PASS" || $NF=="FAIL" || $NF=="SKIP" || $NF=="XFAIL" || $NF=="XPASS") {$NF="";print $0}else{print}}'
meta-python/recipes-devtools/python/python3-trustme_0.9.0.bb new file +27 -1
new file mode 100644
index 0000000000..641512c46c
@@ -0,0 +1,27 @@
+DESCRIPTION = "A utility provides a fake certificate authority (CA)"
+HOMEPAGE = "https://pypi.org/project/trustme"
+AUTHOR = "Nathaniel J. Smith"
+
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=d5a7af1a4b73e57431e25d15a2da745a"
+
+SRC_URI[md5sum] = "0e4d698e5aecaf8306cf440bf3dcbbe0"
+SRC_URI[sha256sum] = "5e07b23d70ceed64f3bb36ae4b9abc52354c16c98d45ab037bee2b5fbffe586c"
+
+inherit pypi setuptools3 ptest
+
+SRC_URI += " \
+	file://run-ptest \
+"
+
+RDEPENDS:${PN}-ptest += " \
+	${PYTHON_PN}-pytest \
+	${PYTHON_PN}-service-identity \
+	${PYTHON_PN}-pyasn1-modules \
+"
+
+do_install_ptest() {
+	install -d ${D}${PTEST_PATH}/tests
+	cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/
+	cp -rf ${S}/setup.py ${D}${PTEST_PATH}
+}
 
-=-=-=-=-=-=-=-=-=-=-=-

Links: You receive all messages sent to this group.
View/Reply Online (#104534): https://lists.openembedded.org/g/openembedded-devel/message/104534
Mute This Topic: https://lists.openembedded.org/mt/100912003/7199376
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

A message that is not in the archive (sent off-list or not yet received): [email protected]

#5 lore raw

Re: [oe] [meta-python][kirkstone][PATCH v2 2/2] Introduce python3-trustme to fix ptest error of python3-requests-toolbelt

Gentle Reminder !!

../Narpat

Quoted 187 lines · Narpat Mali via lists.openembedded.org

Gentle Reminder !!

../Narpat

Quoted 163 lines · Narpat Mali via lists.openembedded.org

From: Narpat Mali <[email protected]>

The ptest fails after python3-requests-toolbelt is upgraded to 0.10.1.

=======================================================
Hint: make sure your test modules/packages have valid Python names. Traceback:
../../python3.11/importlib/{}init{}.py:126: in import_module return _bootstrap._gcd_import(name[level:], package, level) tests/test_x509_adapter.py:20: in <module>
     import trustme
E   ModuleNotFoundError: No module named 'trustme'
=======================================================

The commit b93b4067ea "Fix x509 tests by using trustme" of python3-requests-toolbelt introduces the trustme in test_x509_adapter.py.

Introducing python3-trustme to fix ptest error of python3-requests-toolbelt, also introducing python3-service-identity, which is requested by python3-trustme's ptest.

The ptest passes of all the three packages.

Cherry-picked the upstream master commit:
https://git.openembedded.org/meta-openembedded/commit/?id=a4b6e3ee894047cd13c5d2b7bfc67f0093899537

---
  .../packagegroups/packagegroup-meta-python.bb |  2 ++ .../python3-requests-toolbelt_0.10.1.bb       |  1 + .../python/python3-service-identity/run-ptest |  3 +++ .../python/python3-service-identity_21.1.0.bb | 25 +++++++++++++++++ .../python/python3-trustme/run-ptest          |  3 +++ .../python/python3-trustme_0.9.0.bb           | 27 +++++++++++++++++++

  6 files changed, 61 insertions(+)

  create mode 100644 meta-python/recipes-devtools/python/python3-service-identity/run-ptest create mode 100644 meta-python/recipes-devtools/python/python3-service-identity_21.1.0.bb create mode 100644 meta-python/recipes-devtools/python/python3-trustme/run-ptest create mode 100644 meta-python/recipes-devtools/python/python3-trustme_0.9.0.bb

meta-python/recipes-core/packagegroups/packagegroup-meta-python.bb +2 -0
index fdeb83c42a..c2481eb307 100644
@@ -373,6 +373,7 @@ RDEPENDS:packagegroup-meta-python3 = "\
       python3-send2trash \
       python3-sentry-sdk \
       python3-serpent \
+    python3-service-identity \
       python3-sh \
       python3-sijax \
       python3-simpleeval \
@@ -408,6 +409,7 @@ RDEPENDS:packagegroup-meta-python3 = "\
       python3-trafaret-config \
       python3-traitlets \
       python3-transitions \
+    python3-trustme \
       python3-twine \
       python3-twisted \
       python3-twitter \
meta-python/recipes-devtools/python/python3-requests-toolbelt_0.10.1.bb +0 -0

index c39950ab5d..7191a3e6c1 100644
---
a/meta-python/recipes-devtools/python/python3-requests-toolbelt_0.10.1.bb
+++
b/meta-python/recipes-devtools/python/python3-requests-toolbelt_0.10.1.bb

meta-python/recipes-devtools/python/python3-requests-toolbelt_0.10.1.bb +1 -0
@@ -21,6 +21,7 @@ RDEPENDS:${PN}-ptest += " \
       ${PYTHON_PN}-betamax \
       ${PYTHON_PN}-mock \
       ${PYTHON_PN}-multiprocessing \
+        ${PYTHON_PN}-trustme \

  "
    do_install_ptest() {

(quoted diff) +0 -0
new file mode 100644
index 0000000000..b63c4de0d9

b/meta-python/recipes-devtools/python/python3-service-identity/run-ptest

(quoted diff) +3 -0
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+pytest -o log_cli=true -o log_cli_level=INFO | sed -e 

's/\[...%\]//g'| sed -e 's/PASSED/PASS/g'| sed -e 's/FAILED/FAIL/g'|sed -e 's/SKIPPED/SKIP/g'| awk '{if ($NF=="PASS" || $NF=="FAIL" || $NF=="SKIP" || $NF=="XFAIL" || $NF=="XPASS"){printf "%s: %s\n", $NF, $0}else{print}}'| awk '{if ($NF=="PASS" || $NF=="FAIL" || $NF=="SKIP" || $NF=="XFAIL" || $NF=="XPASS") {$NF="";print $0}else{print}}'

(quoted diff) +0 -0
new file mode 100644
index 0000000000..0210a5de22

b/meta-python/recipes-devtools/python/python3-service-identity_21.1.0.bb

(quoted diff) +1 -0
@@ -0,0 +1,25 @@
+DESCRIPTION = "The tools for verifying whether a certificate is 

valid for the intended purposes."

(quoted diff) +5 -0
+HOMEPAGE = "https://pypi.org/project/service-identity"
+AUTHOR = "Hynek Schlawack"
+
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = 

"file://LICENSE;md5=8a0f079f4e6a215d6bd6f9d97cab4d5f"

(quoted diff) +3 -0
+
+SRC_URI[md5sum] = "5e5c195d8fcedc72f9068be2ad9b5a13"
+SRC_URI[sha256sum] = 

"6e6c6086ca271dc11b033d17c3a8bea9f24ebff920c587da090afc9519419d34"

(quoted diff) +16 -0
+
+inherit pypi setuptools3 ptest
+
+SRC_URI += " \
+    file://run-ptest \
+"
+
+RDEPENDS:${PN}-ptest += " \
+    ${PYTHON_PN}-pytest \
+"
+
+do_install_ptest() {
+    install -d ${D}${PTEST_PATH}/tests
+    cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/
+    cp -rf ${S}/setup.py ${D}${PTEST_PATH}
+}
meta-python/recipes-devtools/python/python3-trustme/run-ptest new file +3 -0
new file mode 100644
index 0000000000..b63c4de0d9
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+pytest -o log_cli=true -o log_cli_level=INFO | sed -e 

's/\[...%\]//g'| sed -e 's/PASSED/PASS/g'| sed -e 's/FAILED/FAIL/g'|sed -e 's/SKIPPED/SKIP/g'| awk '{if ($NF=="PASS" || $NF=="FAIL" || $NF=="SKIP" || $NF=="XFAIL" || $NF=="XPASS"){printf "%s: %s\n", $NF, $0}else{print}}'| awk '{if ($NF=="PASS" || $NF=="FAIL" || $NF=="SKIP" || $NF=="XFAIL" || $NF=="XPASS") {$NF="";print $0}else{print}}'

meta-python/recipes-devtools/python/python3-trustme_0.9.0.bb new file +6 -0
new file mode 100644
index 0000000000..641512c46c
@@ -0,0 +1,27 @@
+DESCRIPTION = "A utility provides a fake certificate authority (CA)"
+HOMEPAGE = "https://pypi.org/project/trustme"
+AUTHOR = "Nathaniel J. Smith"
+
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = 

"file://LICENSE;md5=d5a7af1a4b73e57431e25d15a2da745a"

meta-python/recipes-devtools/python/python3-trustme_0.9.0.bb new file +3 -0
+
+SRC_URI[md5sum] = "0e4d698e5aecaf8306cf440bf3dcbbe0"
+SRC_URI[sha256sum] = 

"5e07b23d70ceed64f3bb36ae4b9abc52354c16c98d45ab037bee2b5fbffe586c"

meta-python/recipes-devtools/python/python3-trustme_0.9.0.bb new file +8 -0
+
+inherit pypi setuptools3 ptest
+
+SRC_URI += " \
+    file://run-ptest \
+"
+
+RDEPENDS:${PN}-ptest += " \

meta-python/recipes-devtools/python/python3-trustme_0.9.0.bb

Quoted 10 lines
meta-python/recipes-devtools/python/python3-trustme_0.9.0.bb new file +10 -0
+    ${PYTHON_PN}-pytest \
+    ${PYTHON_PN}-service-identity \
+    ${PYTHON_PN}-pyasn1-modules \
+"
+
+do_install_ptest() {
+    install -d ${D}${PTEST_PATH}/tests
+    cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/
+    cp -rf ${S}/setup.py ${D}${PTEST_PATH}
+}

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#104799): https://lists.openembedded.org/g/openembedded-devel/message/104799
Mute This Topic: https://lists.openembedded.org/mt/101232091/7199376
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

#6 lore raw

Re: [oe] [meta-python][kirkstone][PATCH v2 2/2] Introduce python3-trustme to fix ptest error of python3-requests-toolbelt

Quoted 1 line · Narpat

Gentle Reminder !!

Since this appears to not affect the functionality of python3-requests-toolbelt, request is declined.

BR,
Armin

Quoted 198 lines

../Narpat

Quoted 194 lines · Narpat Mali via lists.openembedded.org

Gentle Reminder !!

../Narpat

Quoted 170 lines · Narpat Mali via lists.openembedded.org

From: Narpat Mali <[email protected]>

The ptest fails after python3-requests-toolbelt is upgraded to 0.10.1.

=======================================================
Hint: make sure your test modules/packages have valid Python names. Traceback:
../../python3.11/importlib/{}init{}.py:126: in import_module return _bootstrap._gcd_import(name[level:], package, level) tests/test_x509_adapter.py:20: in <module>
     import trustme
E   ModuleNotFoundError: No module named 'trustme'
=======================================================

The commit b93b4067ea "Fix x509 tests by using trustme" of python3-requests-toolbelt introduces the trustme in test_x509_adapter.py.

Introducing python3-trustme to fix ptest error of python3-requests-toolbelt, also introducing python3-service-identity, which is requested by python3-trustme's ptest.

The ptest passes of all the three packages.

Cherry-picked the upstream master commit:
https://git.openembedded.org/meta-openembedded/commit/?id=a4b6e3ee894047cd13c5d2b7bfc67f0093899537

---
  .../packagegroups/packagegroup-meta-python.bb |  2 ++ .../python3-requests-toolbelt_0.10.1.bb       |  1 + .../python/python3-service-identity/run-ptest |  3 +++ .../python/python3-service-identity_21.1.0.bb | 25 +++++++++++++++++ .../python/python3-trustme/run-ptest          |  3 +++ .../python/python3-trustme_0.9.0.bb           | 27
+++++++++++++++++++

  6 files changed, 61 insertions(+)

  create mode 100644 meta-python/recipes-devtools/python/python3-service-identity/run-ptest create mode 100644 meta-python/recipes-devtools/python/python3-service-identity_21.1.0.bb create mode 100644 meta-python/recipes-devtools/python/python3-trustme/run-ptest create mode 100644 meta-python/recipes-devtools/python/python3-trustme_0.9.0.bb

meta-python/recipes-core/packagegroups/packagegroup-meta-python.bb +0 -1
index fdeb83c42a..c2481eb307 100644
--- 

a/meta-python/recipes-core/packagegroups/packagegroup-meta-python.bb
+++
b/meta-python/recipes-core/packagegroups/packagegroup-meta-python.bb

meta-python/recipes-core/packagegroups/packagegroup-meta-python.bb +2 -0
@@ -373,6 +373,7 @@ RDEPENDS:packagegroup-meta-python3 = "\
       python3-send2trash \
       python3-sentry-sdk \
       python3-serpent \
+    python3-service-identity \
       python3-sh \
       python3-sijax \
       python3-simpleeval \
@@ -408,6 +409,7 @@ RDEPENDS:packagegroup-meta-python3 = "\
       python3-trafaret-config \
       python3-traitlets \
       python3-transitions \
+    python3-trustme \
       python3-twine \
       python3-twisted \
       python3-twitter \
meta-python/recipes-devtools/python/python3-requests-toolbelt_0.10.1.bb +0 -0

index c39950ab5d..7191a3e6c1 100644
---
a/meta-python/recipes-devtools/python/python3-requests-toolbelt_0.10.1.bb
+++
b/meta-python/recipes-devtools/python/python3-requests-toolbelt_0.10.1.bb

meta-python/recipes-devtools/python/python3-requests-toolbelt_0.10.1.bb +1 -0
@@ -21,6 +21,7 @@ RDEPENDS:${PN}-ptest += " \
       ${PYTHON_PN}-betamax \
       ${PYTHON_PN}-mock \
       ${PYTHON_PN}-multiprocessing \
+        ${PYTHON_PN}-trustme \

  "
    do_install_ptest() {

meta-python/recipes-devtools/python/python3-service-identity/run-ptest +0 -0

new file mode 100644
index 0000000000..b63c4de0d9
--- /dev/null
+++
b/meta-python/recipes-devtools/python/python3-service-identity/run-ptest

meta-python/recipes-devtools/python/python3-service-identity/run-ptest +3 -0
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+pytest -o log_cli=true -o log_cli_level=INFO | sed -e 

's/\[...%\]//g'| sed -e 's/PASSED/PASS/g'| sed -e 's/FAILED/FAIL/g'|sed -e 's/SKIPPED/SKIP/g'| awk '{if ($NF=="PASS" || $NF=="FAIL" || $NF=="SKIP" || $NF=="XFAIL" || $NF=="XPASS"){printf "%s: %s\n", $NF, $0}else{print}}'| awk '{if ($NF=="PASS" || $NF=="FAIL" || $NF=="SKIP" || $NF=="XFAIL" || $NF=="XPASS") {$NF="";print $0}else{print}}'

meta-python/recipes-devtools/python/python3-service-identity_21.1.0.bb +0 -0

new file mode 100644
index 0000000000..0210a5de22
--- /dev/null
+++
b/meta-python/recipes-devtools/python/python3-service-identity_21.1.0.bb

meta-python/recipes-devtools/python/python3-service-identity_21.1.0.bb +1 -0
@@ -0,0 +1,25 @@
+DESCRIPTION = "The tools for verifying whether a certificate is 

valid for the intended purposes."

meta-python/recipes-devtools/python/python3-service-identity_21.1.0.bb +5 -0
+HOMEPAGE = "https://pypi.org/project/service-identity"
+AUTHOR = "Hynek Schlawack"
+
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = 

"file://LICENSE;md5=8a0f079f4e6a215d6bd6f9d97cab4d5f"

meta-python/recipes-devtools/python/python3-service-identity_21.1.0.bb +3 -0
+
+SRC_URI[md5sum] = "5e5c195d8fcedc72f9068be2ad9b5a13"
+SRC_URI[sha256sum] = 

"6e6c6086ca271dc11b033d17c3a8bea9f24ebff920c587da090afc9519419d34"

meta-python/recipes-devtools/python/python3-service-identity_21.1.0.bb +16 -0
+
+inherit pypi setuptools3 ptest
+
+SRC_URI += " \
+    file://run-ptest \
+"
+
+RDEPENDS:${PN}-ptest += " \
+    ${PYTHON_PN}-pytest \
+"
+
+do_install_ptest() {
+    install -d ${D}${PTEST_PATH}/tests
+    cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/
+    cp -rf ${S}/setup.py ${D}${PTEST_PATH}
+}
meta-python/recipes-devtools/python/python3-trustme/run-ptest new file +3 -0
new file mode 100644
index 0000000000..b63c4de0d9
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+pytest -o log_cli=true -o log_cli_level=INFO | sed -e 

's/\[...%\]//g'| sed -e 's/PASSED/PASS/g'| sed -e 's/FAILED/FAIL/g'|sed -e 's/SKIPPED/SKIP/g'| awk '{if ($NF=="PASS" || $NF=="FAIL" || $NF=="SKIP" || $NF=="XFAIL" || $NF=="XPASS"){printf "%s: %s\n", $NF, $0}else{print}}'| awk '{if ($NF=="PASS" || $NF=="FAIL" || $NF=="SKIP" || $NF=="XFAIL" || $NF=="XPASS") {$NF="";print $0}else{print}}'

meta-python/recipes-devtools/python/python3-trustme_0.9.0.bb new file +6 -0
new file mode 100644
index 0000000000..641512c46c
@@ -0,0 +1,27 @@
+DESCRIPTION = "A utility provides a fake certificate authority (CA)"
+HOMEPAGE = "https://pypi.org/project/trustme"
+AUTHOR = "Nathaniel J. Smith"
+
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = 

"file://LICENSE;md5=d5a7af1a4b73e57431e25d15a2da745a"

meta-python/recipes-devtools/python/python3-trustme_0.9.0.bb new file +3 -0
+
+SRC_URI[md5sum] = "0e4d698e5aecaf8306cf440bf3dcbbe0"
+SRC_URI[sha256sum] = 

"5e07b23d70ceed64f3bb36ae4b9abc52354c16c98d45ab037bee2b5fbffe586c"

meta-python/recipes-devtools/python/python3-trustme_0.9.0.bb new file +8 -0
+
+inherit pypi setuptools3 ptest
+
+SRC_URI += " \
+    file://run-ptest \
+"
+
+RDEPENDS:${PN}-ptest += " \

meta-python/recipes-devtools/python/python3-trustme_0.9.0.bb

Quoted 10 lines
meta-python/recipes-devtools/python/python3-trustme_0.9.0.bb new file +10 -0
+    ${PYTHON_PN}-pytest \
+    ${PYTHON_PN}-service-identity \
+    ${PYTHON_PN}-pyasn1-modules \
+"
+
+do_install_ptest() {
+    install -d ${D}${PTEST_PATH}/tests
+    cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/
+    cp -rf ${S}/setup.py ${D}${PTEST_PATH}
+}

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#104799): https://lists.openembedded.org/g/openembedded-devel/message/104799
Mute This Topic: https://lists.openembedded.org/mt/101232091/7199376
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-