[arch-commits] Commit in python-httpx/repos/community-any (4 files)

Antonio Rojas arojas at gemini.archlinux.org
Wed Jan 26 16:51:44 UTC 2022


    Date: Wednesday, January 26, 2022 @ 16:51:44
  Author: arojas
Revision: 1116062

archrelease: copy trunk to community-any

Added:
  python-httpx/repos/community-any/0001-Do-not-override-the-system-SSL-certificates-with-the.patch
    (from rev 1116061, python-httpx/trunk/0001-Do-not-override-the-system-SSL-certificates-with-the.patch)
  python-httpx/repos/community-any/PKGBUILD
    (from rev 1116061, python-httpx/trunk/PKGBUILD)
Deleted:
  python-httpx/repos/community-any/0001-Do-not-override-the-system-SSL-certificates-with-the.patch
  python-httpx/repos/community-any/PKGBUILD

-----------------------------------------------------------------+
 0001-Do-not-override-the-system-SSL-certificates-with-the.patch |  174 +++++-----
 PKGBUILD                                                        |   97 ++---
 2 files changed, 135 insertions(+), 136 deletions(-)

Deleted: 0001-Do-not-override-the-system-SSL-certificates-with-the.patch
===================================================================
--- 0001-Do-not-override-the-system-SSL-certificates-with-the.patch	2022-01-26 16:51:34 UTC (rev 1116061)
+++ 0001-Do-not-override-the-system-SSL-certificates-with-the.patch	2022-01-26 16:51:44 UTC (rev 1116062)
@@ -1,87 +0,0 @@
-From f2d28b9a35572134b336bcc6e347659cf0504be6 Mon Sep 17 00:00:00 2001
-From: Eli Schwartz <eschwartz at archlinux.org>
-Date: Mon, 13 Jul 2020 11:29:54 -0400
-Subject: [PATCH] Do not override the system SSL certificates with the certifi
- bundle.
-
-We need to respect the system certification policy, and by default the
-ssl module will use our packaged ca-certificates.
-
-ssl.create_default_context(cafile=None) is the default to use the
-builtin (system) certs, but due to the sorcery which this module uses to
-check how arguments are being passed, it's less invasive to simply
-hardcode the standard certificate path instead of letting python
-properly handle it.
----
- httpx/_config.py     | 4 +---
- setup.py             | 1 -
- tests/test_config.py | 5 ++---
- 3 files changed, 3 insertions(+), 7 deletions(-)
-
-diff --git a/httpx/_config.py b/httpx/_config.py
-index 9d29f9f..1ac64e1 100644
---- a/httpx/_config.py
-+++ b/httpx/_config.py
-@@ -4,8 +4,6 @@ import typing
- from base64 import b64encode
- from pathlib import Path
- 
--import certifi
--
- from ._compat import set_minimum_tls_version_1_2
- from ._models import URL, Headers
- from ._types import CertTypes, HeaderTypes, TimeoutTypes, URLTypes, VerifyTypes
-@@ -57,7 +55,7 @@ class SSLConfig:
-     SSL Configuration.
-     """
- 
--    DEFAULT_CA_BUNDLE_PATH = Path(certifi.where())
-+    DEFAULT_CA_BUNDLE_PATH = Path("/etc/ssl/certs/ca-certificates.crt")
- 
-     def __init__(
-         self,
-diff --git a/setup.py b/setup.py
-index f3ada86..396d713 100644
---- a/setup.py
-+++ b/setup.py
-@@ -56,7 +56,6 @@ setup(
-     include_package_data=True,
-     zip_safe=False,
-     install_requires=[
--        "certifi",
-         "charset_normalizer",
-         "sniffio",
-         "rfc3986[idna2008]>=1.3,<2",
-diff --git a/tests/test_config.py b/tests/test_config.py
-index f218f8f..74ab743 100644
---- a/tests/test_config.py
-+++ b/tests/test_config.py
-@@ -3,7 +3,6 @@ import ssl
- import sys
- from pathlib import Path
- 
--import certifi
- import pytest
- 
- import httpx
-@@ -21,7 +20,7 @@ def test_load_ssl_config_verify_non_existing_path():
- 
- 
- def test_load_ssl_config_verify_existing_file():
--    context = httpx.create_ssl_context(verify=certifi.where())
-+    context = httpx.create_ssl_context(verify="/etc/ssl/certs/ca-certificates.crt")
-     assert context.verify_mode == ssl.VerifyMode.CERT_REQUIRED
-     assert context.check_hostname is True
- 
-@@ -44,7 +43,7 @@ def test_load_ssl_config_verify_env_file(
- 
- 
- def test_load_ssl_config_verify_directory():
--    path = Path(certifi.where()).parent
-+    path = Path("/etc/ssl/certs/ca-certificates.crt").parent
-     context = httpx.create_ssl_context(verify=str(path))
-     assert context.verify_mode == ssl.VerifyMode.CERT_REQUIRED
-     assert context.check_hostname is True
--- 
-2.32.0
-

Copied: python-httpx/repos/community-any/0001-Do-not-override-the-system-SSL-certificates-with-the.patch (from rev 1116061, python-httpx/trunk/0001-Do-not-override-the-system-SSL-certificates-with-the.patch)
===================================================================
--- 0001-Do-not-override-the-system-SSL-certificates-with-the.patch	                        (rev 0)
+++ 0001-Do-not-override-the-system-SSL-certificates-with-the.patch	2022-01-26 16:51:44 UTC (rev 1116062)
@@ -0,0 +1,87 @@
+From f2d28b9a35572134b336bcc6e347659cf0504be6 Mon Sep 17 00:00:00 2001
+From: Eli Schwartz <eschwartz at archlinux.org>
+Date: Mon, 13 Jul 2020 11:29:54 -0400
+Subject: [PATCH] Do not override the system SSL certificates with the certifi
+ bundle.
+
+We need to respect the system certification policy, and by default the
+ssl module will use our packaged ca-certificates.
+
+ssl.create_default_context(cafile=None) is the default to use the
+builtin (system) certs, but due to the sorcery which this module uses to
+check how arguments are being passed, it's less invasive to simply
+hardcode the standard certificate path instead of letting python
+properly handle it.
+---
+ httpx/_config.py     | 4 +---
+ setup.py             | 1 -
+ tests/test_config.py | 5 ++---
+ 3 files changed, 3 insertions(+), 7 deletions(-)
+
+diff --git a/httpx/_config.py b/httpx/_config.py
+index 9d29f9f..1ac64e1 100644
+--- a/httpx/_config.py
++++ b/httpx/_config.py
+@@ -4,8 +4,6 @@ import typing
+ from base64 import b64encode
+ from pathlib import Path
+ 
+-import certifi
+-
+ from ._compat import set_minimum_tls_version_1_2
+ from ._models import URL, Headers
+ from ._types import CertTypes, HeaderTypes, TimeoutTypes, URLTypes, VerifyTypes
+@@ -57,7 +55,7 @@ class SSLConfig:
+     SSL Configuration.
+     """
+ 
+-    DEFAULT_CA_BUNDLE_PATH = Path(certifi.where())
++    DEFAULT_CA_BUNDLE_PATH = Path("/etc/ssl/certs/ca-certificates.crt")
+ 
+     def __init__(
+         self,
+diff --git a/setup.py b/setup.py
+index f3ada86..396d713 100644
+--- a/setup.py
++++ b/setup.py
+@@ -56,7 +56,6 @@ setup(
+     include_package_data=True,
+     zip_safe=False,
+     install_requires=[
+-        "certifi",
+         "charset_normalizer",
+         "sniffio",
+         "rfc3986[idna2008]>=1.3,<2",
+diff --git a/tests/test_config.py b/tests/test_config.py
+index f218f8f..74ab743 100644
+--- a/tests/test_config.py
++++ b/tests/test_config.py
+@@ -3,7 +3,6 @@ import ssl
+ import sys
+ from pathlib import Path
+ 
+-import certifi
+ import pytest
+ 
+ import httpx
+@@ -21,7 +20,7 @@ def test_load_ssl_config_verify_non_existing_path():
+ 
+ 
+ def test_load_ssl_config_verify_existing_file():
+-    context = httpx.create_ssl_context(verify=certifi.where())
++    context = httpx.create_ssl_context(verify="/etc/ssl/certs/ca-certificates.crt")
+     assert context.verify_mode == ssl.VerifyMode.CERT_REQUIRED
+     assert context.check_hostname is True
+ 
+@@ -44,7 +43,7 @@ def test_load_ssl_config_verify_env_file(
+ 
+ 
+ def test_load_ssl_config_verify_directory():
+-    path = Path(certifi.where()).parent
++    path = Path("/etc/ssl/certs/ca-certificates.crt").parent
+     context = httpx.create_ssl_context(verify=str(path))
+     assert context.verify_mode == ssl.VerifyMode.CERT_REQUIRED
+     assert context.check_hostname is True
+-- 
+2.32.0
+

Deleted: PKGBUILD
===================================================================
--- PKGBUILD	2022-01-26 16:51:34 UTC (rev 1116061)
+++ PKGBUILD	2022-01-26 16:51:44 UTC (rev 1116062)
@@ -1,49 +0,0 @@
-# Maintainer: Eli Schwartz <eschwartz at archlinux.org>
-
-_pkgname=httpx
-pkgname=python-httpx
-pkgver=0.21.3
-pkgrel=1
-pkgdesc="A next generation HTTP client for Python"
-arch=('any')
-url="https://github.com/encode/${_pkgname}"
-license=('BSD')
-depends=('python-charset-normalizer' 'python-httpcore' 'python-idna' 'python-rfc3986' 'python-sniffio' 'python-rich')
-optdepends=('python-brotlicffi: for brotli response decompression')
-makedepends=('python-setuptools')
-checkdepends=('python-pytest-asyncio' 'python-pytest-trio' 'python-typing_extensions' 'python-brotlicffi' 'python-h2' 'python-trustme' 'uvicorn')
-source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/${pkgver}.tar.gz"
-        "0001-Do-not-override-the-system-SSL-certificates-with-the.patch")
-sha512sums=('0a551de52954db5ed2c33d1b5c172607516031a7c86c0f235bd04f12f4cf82f63980a9f53115dac801748b0c282890b3ed4a53b2c912adbd245c10ad61dbf67e'
-            'faf90f908ab8d5054d096eef1ba4e9cee733eb8178d2df0dfe922923bf8a98eebf880b9a6be3386caffed88229f82f1199c026ede455a57998246821a37e5748')
-b2sums=('08a9328a7350534abe646f0bf60bd15600a1cb3eb8d06578c87ed9a7d4e55efdddd2be597650cddec9f6456e89a1b159f3e23aa657f379f78157c12670cdadb0'
-        '3e020b5f3c3aeeede6304851023eed4ab10f74df68203b504b5564892aa960d5c52521279a0b9cf40ead1e18b5ce9ee3998ad4502e6008f07808817d0405b7c7')
-
-prepare() {
-    cd ${_pkgname}-${pkgver}
-
-    # bad certifi
-    patch -p1 -i ../0001-Do-not-override-the-system-SSL-certificates-with-the.patch
-
-    # fix tests
-    sed -e 's|Transfer-Encoding|transfer-encoding|g' -i tests/test_main.py
-}
-
-build() {
-    cd ${_pkgname}-${pkgver}
-
-    python setup.py build
-}
-
-check() {
-    cd ${_pkgname}-${pkgver}
-
-    pytest -W ignore::DeprecationWarning
-}
-
-package() {
-    cd ${_pkgname}-${pkgver}
-
-    python setup.py install --root="${pkgdir}" --optimize=1 --skip-build
-    install -Dm644 LICENSE.md "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE.md
-}

Copied: python-httpx/repos/community-any/PKGBUILD (from rev 1116061, python-httpx/trunk/PKGBUILD)
===================================================================
--- PKGBUILD	                        (rev 0)
+++ PKGBUILD	2022-01-26 16:51:44 UTC (rev 1116062)
@@ -0,0 +1,48 @@
+# Maintainer: Eli Schwartz <eschwartz at archlinux.org>
+
+_pkgname=httpx
+pkgname=python-httpx
+pkgver=0.22.0
+pkgrel=1
+pkgdesc="A next generation HTTP client for Python"
+arch=('any')
+url="https://github.com/encode/${_pkgname}"
+license=('BSD')
+depends=('python-charset-normalizer' 'python-httpcore' 'python-idna' 'python-rfc3986' 'python-sniffio' 'python-rich')
+optdepends=('python-brotlicffi: for brotli response decompression')
+makedepends=('python-setuptools')
+checkdepends=('python-pytest-asyncio' 'python-pytest-trio' 'python-typing_extensions' 'python-brotlicffi' 'python-h2' 'python-trustme' 'uvicorn' 'python-socksio')
+source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/${pkgver}.tar.gz"
+        "0001-Do-not-override-the-system-SSL-certificates-with-the.patch")
+sha512sums=('a7360f5355f75f07425b42d49697e480319f3fe606d4601bb6d64b870c8a8fce6fad8bd857ef422fc48e6141201307ee94876d5bc54a68557c7dc32ce8f1451b'
+            'faf90f908ab8d5054d096eef1ba4e9cee733eb8178d2df0dfe922923bf8a98eebf880b9a6be3386caffed88229f82f1199c026ede455a57998246821a37e5748')
+b2sums=('bb08a7c4b72478d24264c0dca5630205ff386af73294dca66dcd12b646de602ad64e308feedaabd58742cb7a9d799fa23cd2f922e685e74f8181e1b5e9f1c4ee'
+        '3e020b5f3c3aeeede6304851023eed4ab10f74df68203b504b5564892aa960d5c52521279a0b9cf40ead1e18b5ce9ee3998ad4502e6008f07808817d0405b7c7')
+
+prepare() {
+  cd ${_pkgname}-${pkgver}
+
+  # bad certifi
+  patch -p1 -i ../0001-Do-not-override-the-system-SSL-certificates-with-the.patch
+  # fix tests
+  sed -e 's|Transfer-Encoding|transfer-encoding|g' -i tests/test_main.py
+}
+
+build() {
+  cd ${_pkgname}-${pkgver}
+
+  python setup.py build
+}
+
+check() {
+  cd ${_pkgname}-${pkgver}
+
+  pytest -W ignore::DeprecationWarning -k 'not text_decoder[data3-iso-8859-1] and not response_no_charset_with_iso_8859_1_content'
+}
+
+package() {
+  cd ${_pkgname}-${pkgver}
+
+  python setup.py install --root="${pkgdir}" --optimize=1 --skip-build
+  install -Dm644 LICENSE.md "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE.md
+}



More information about the arch-commits mailing list