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

Maxime Gauduin alucryd at archlinux.org
Fri May 7 09:41:16 UTC 2021


    Date: Friday, May 7, 2021 @ 09:41:16
  Author: alucryd
Revision: 928581

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 928580, python-httpx/trunk/0001-Do-not-override-the-system-SSL-certificates-with-the.patch)
  python-httpx/repos/community-any/PKGBUILD
    (from rev 928580, 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                                                        |   92 ++---
 2 files changed, 133 insertions(+), 133 deletions(-)

Deleted: 0001-Do-not-override-the-system-SSL-certificates-with-the.patch
===================================================================
--- 0001-Do-not-override-the-system-SSL-certificates-with-the.patch	2021-05-07 09:41:10 UTC (rev 928580)
+++ 0001-Do-not-override-the-system-SSL-certificates-with-the.patch	2021-05-07 09:41:16 UTC (rev 928581)
@@ -1,87 +0,0 @@
-From d03e57b75c2eb8a3696b6dd9a5f84aba4f01280c 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 8d589ea..ea256a8 100644
---- a/httpx/_config.py
-+++ b/httpx/_config.py
-@@ -5,8 +5,6 @@ import warnings
- from base64 import b64encode
- from pathlib import Path
- 
--import certifi
--
- from ._models import URL, Headers
- from ._types import CertTypes, HeaderTypes, TimeoutTypes, URLTypes, VerifyTypes
- from ._utils import get_ca_bundle_from_env, get_logger, warn_deprecated
-@@ -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 e811d2a..2eaf419 100644
---- a/setup.py
-+++ b/setup.py
-@@ -55,7 +55,6 @@ setup(
-     include_package_data=True,
-     zip_safe=False,
-     install_requires=[
--        "certifi",
-         "sniffio",
-         "chardet==3.*",
-         "rfc3986[idna2008]>=1.3,<2",
-diff --git a/tests/test_config.py b/tests/test_config.py
-index 5c68bad..a03c607 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.28.0
-

Copied: python-httpx/repos/community-any/0001-Do-not-override-the-system-SSL-certificates-with-the.patch (from rev 928580, 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	2021-05-07 09:41:16 UTC (rev 928581)
@@ -0,0 +1,87 @@
+From d03e57b75c2eb8a3696b6dd9a5f84aba4f01280c 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 8d589ea..ea256a8 100644
+--- a/httpx/_config.py
++++ b/httpx/_config.py
+@@ -5,8 +5,6 @@ import warnings
+ from base64 import b64encode
+ from pathlib import Path
+ 
+-import certifi
+-
+ from ._models import URL, Headers
+ from ._types import CertTypes, HeaderTypes, TimeoutTypes, URLTypes, VerifyTypes
+ from ._utils import get_ca_bundle_from_env, get_logger, warn_deprecated
+@@ -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 e811d2a..2eaf419 100644
+--- a/setup.py
++++ b/setup.py
+@@ -55,7 +55,6 @@ setup(
+     include_package_data=True,
+     zip_safe=False,
+     install_requires=[
+-        "certifi",
+         "sniffio",
+         "chardet==3.*",
+         "rfc3986[idna2008]>=1.3,<2",
+diff --git a/tests/test_config.py b/tests/test_config.py
+index 5c68bad..a03c607 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.28.0
+

Deleted: PKGBUILD
===================================================================
--- PKGBUILD	2021-05-07 09:41:10 UTC (rev 928580)
+++ PKGBUILD	2021-05-07 09:41:16 UTC (rev 928581)
@@ -1,46 +0,0 @@
-# Maintainer: Eli Schwartz <eschwartz at archlinux.org>
-
-_pkgname=httpx
-pkgname=python-httpx
-pkgver=0.17.1
-pkgrel=1
-pkgdesc="A next generation HTTP client for Python"
-arch=('any')
-url="https://github.com/encode/${_pkgname}"
-license=('BSD')
-depends=('python-chardet' 'python-httpcore' 'python-idna' 'python-rfc3986' 'python-sniffio')
-optdepends=('python-brotli: for brotli response decompression')
-makedepends=('python-setuptools')
-checkdepends=('python-pytest-asyncio' 'python-pytest-trio' 'python-brotli' '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=('260040e266144f56b8d1cd085e0d97f2b570c685560fd2bc6baca633e8c9e88a666d0ba072048d63f826dd380df7116ce676dcfb48406e39a7480c44f73368c6'
-            'e4b1e33a77cdb5555a4ac3d09b59bc4a0a176a7f5d97099d66a4876abcfd3889058e21beb8bfc375e8e7e61b3808d2a76119033e1a44602d8e6cd461ea3f88de')
-b2sums=('445e61dba5a2648191f57352b664a33785af01bb9ca29c7f553d10111894d0b4011a6987bdea880dd3fc87a60ddee7813a2d51e12178277b60ac27ac6fa930ef'
-        'e03d340cef44bfb322219030bbcbe53c1323c8b9d9d7aace07045e80faa185a7594839c9ff0fee9604a7fddf916db462f95a341d51f17072bce8e55d53055c7b')
-
-prepare() {
-    cd "${srcdir}"/${_pkgname}-${pkgver}
-
-    # bad certifi
-    patch -p1 -i ../0001-Do-not-override-the-system-SSL-certificates-with-the.patch
-}
-
-build() {
-    cd "${srcdir}"/${_pkgname}-${pkgver}
-
-    python setup.py build
-}
-
-check() {
-    cd "${srcdir}"/${_pkgname}-${pkgver}
-
-    python -m pytest
-}
-
-package() {
-    cd "${srcdir}"/${_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 928580, python-httpx/trunk/PKGBUILD)
===================================================================
--- PKGBUILD	                        (rev 0)
+++ PKGBUILD	2021-05-07 09:41:16 UTC (rev 928581)
@@ -0,0 +1,46 @@
+# Maintainer: Eli Schwartz <eschwartz at archlinux.org>
+
+_pkgname=httpx
+pkgname=python-httpx
+pkgver=0.18.1
+pkgrel=1
+pkgdesc="A next generation HTTP client for Python"
+arch=('any')
+url="https://github.com/encode/${_pkgname}"
+license=('BSD')
+depends=('python-chardet' 'python-httpcore' 'python-idna' 'python-rfc3986' 'python-sniffio')
+optdepends=('python-brotlicffi: for brotli response decompression')
+makedepends=('python-setuptools')
+checkdepends=('python-pytest-asyncio' 'python-pytest-trio' '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=('954b020d117dd1064262f3ac2d3137d01bba344b1a061e5713c3889283334d9ca92d9ed3d23f6ce79d684e31bae2d83fca6993178ef55e5a91353b812ad489e3'
+            'e4b1e33a77cdb5555a4ac3d09b59bc4a0a176a7f5d97099d66a4876abcfd3889058e21beb8bfc375e8e7e61b3808d2a76119033e1a44602d8e6cd461ea3f88de')
+b2sums=('dcbfcb4a452b47b643d5114a535005f7f92170392202dedc6c152546430231d20fd8b94b7ecc1d2abacbc9d76acb14cbfdc268109b171cc40812504e696dcaab'
+        'e03d340cef44bfb322219030bbcbe53c1323c8b9d9d7aace07045e80faa185a7594839c9ff0fee9604a7fddf916db462f95a341d51f17072bce8e55d53055c7b')
+
+prepare() {
+    cd "${srcdir}"/${_pkgname}-${pkgver}
+
+    # bad certifi
+    patch -p1 -i ../0001-Do-not-override-the-system-SSL-certificates-with-the.patch
+}
+
+build() {
+    cd "${srcdir}"/${_pkgname}-${pkgver}
+
+    python setup.py build
+}
+
+check() {
+    cd "${srcdir}"/${_pkgname}-${pkgver}
+
+    python -m pytest
+}
+
+package() {
+    cd "${srcdir}"/${_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