[arch-commits] Commit in python-httpx/trunk (2 files)

Chih-Hsuan Yen yan12125 at gemini.archlinux.org
Tue Jun 28 10:34:41 UTC 2022


    Date: Tuesday, June 28, 2022 @ 10:34:40
  Author: yan12125
Revision: 1239823

upgpkg: python-httpx 0.23.0-2; drop python-certifi hack

Not needed since https://archlinux.org/todo/use-system-ca-store/

Also mentioned myself as the maintainer

Modified:
  python-httpx/trunk/PKGBUILD
Deleted:
  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 |   87 ----------
 PKGBUILD                                                        |   12 -
 2 files changed, 4 insertions(+), 95 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-06-28 10:21:51 UTC (rev 1239822)
+++ 0001-Do-not-override-the-system-SSL-certificates-with-the.patch	2022-06-28 10:34:40 UTC (rev 1239823)
@@ -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",
-         "sniffio",
-         "rfc3986[idna2008]>=1.3,<2",
-         "httpcore>=0.15.0,<0.16.0",
-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
-

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2022-06-28 10:21:51 UTC (rev 1239822)
+++ PKGBUILD	2022-06-28 10:34:40 UTC (rev 1239823)
@@ -1,14 +1,15 @@
-# Maintainer: Eli Schwartz <eschwartz at archlinux.org>
+# Maintainer: Chih-Hsuan Yen <yan12125 at archlinux.org>
+# Contributor: Eli Schwartz <eschwartz at archlinux.org>
 
 _pkgname=httpx
 pkgname=python-httpx
 pkgver=0.23.0
-pkgrel=1
+pkgrel=2
 pkgdesc="A next generation HTTP client for Python"
 arch=('any')
 url="https://github.com/encode/${_pkgname}"
 license=('BSD')
-depends=('python-httpcore' 'python-idna' 'python-rfc3986' 'python-sniffio')
+depends=('python-certifi' 'python-httpcore' 'python-idna' 'python-rfc3986' 'python-sniffio')
 optdepends=(
   'python-brotlicffi: for brotli response decompression'
   'python-h2: HTTP/2 support'
@@ -21,20 +22,15 @@
 checkdepends=('python-pytest-asyncio' 'python-pytest-trio' 'python-typing_extensions' 'python-brotlicffi' 'python-h2' 'python-trustme' 'uvicorn' 'python-socksio'
               'python-rich' 'python-chardet')
 source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/${pkgver}.tar.gz"
-        "0001-Do-not-override-the-system-SSL-certificates-with-the.patch"
         "uvicorn-test-server-use-h11.diff")
 sha512sums=('3cfdf2b3b2f15967a1eec0be05ed947c5e18a46576b68a9cbfd5147dfd4736cb7c389f5431732b93f3a11f3ec6c6f25f7cbb3d96d845f00b58e2b8dae047c1d5'
-            '163665f984ef33fb8ddfdbc4d5f6fe7bec1a8c7aa5bce9acd6fc21e917ac3329ad70c2d6c642831fcc52d21ba030c072434f6492bc64ffaf143d54982fff435f'
             'd86ec2b97ca0dda68f023f9d1fbed0cb143e4ae118ac71fe6651f8f65d7130f014c0cc14a9ab490fc09583370141d5827976c334bd1c58aaebcf1a00762214c9')
 b2sums=('036c66b2c3f743cd069716297f331f0d75043a98180b9db3e156c5692ae8bf9c68d1db87169953a7f44aaf7ee8554d0166f70b508f77b7ff4b0ebc0500bc02ad'
-        '14043504b8369655bd9a6db78f24bbffd3b687d437276d62314320b59f9b2ef09618bef27612353078cbc9554ed7c2b7e2468e2ef3a155bca35ae72b7aa1f1ee'
         'b67493e9c8d38ae9b64d831b178d8b943a90a3382e381f08792a35c935fa702b094ea962eb653e5b6ad1b5990466d3d0814d166093aa7b9e921632e61d4ebd45')
 
 prepare() {
   cd ${_pkgname}-${pkgver}
 
-  # bad certifi
-  patch -p1 -i ../0001-Do-not-override-the-system-SSL-certificates-with-the.patch
   # fix tests
   patch -Np1 -i ../uvicorn-test-server-use-h11.diff
 



More information about the arch-commits mailing list