[arch-commits] Commit in python-httpx/repos/community-any (4 files)
Maxime Gauduin
alucryd at gemini.archlinux.org
Sat Sep 4 10:38:18 UTC 2021
Date: Saturday, September 4, 2021 @ 10:38:18
Author: alucryd
Revision: 1010997
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 1010996, python-httpx/trunk/0001-Do-not-override-the-system-SSL-certificates-with-the.patch)
python-httpx/repos/community-any/PKGBUILD
(from rev 1010996, 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-09-04 10:38:13 UTC (rev 1010996)
+++ 0001-Do-not-override-the-system-SSL-certificates-with-the.patch 2021-09-04 10:38:18 UTC (rev 1010997)
@@ -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.13.3,<0.14.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
-
Copied: python-httpx/repos/community-any/0001-Do-not-override-the-system-SSL-certificates-with-the.patch (from rev 1010996, 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-09-04 10:38:18 UTC (rev 1010997)
@@ -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 2021-09-04 10:38:13 UTC (rev 1010996)
+++ PKGBUILD 2021-09-04 10:38:18 UTC (rev 1010997)
@@ -1,46 +0,0 @@
-# Maintainer: Eli Schwartz <eschwartz at archlinux.org>
-
-_pkgname=httpx
-pkgname=python-httpx
-pkgver=0.18.2
-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-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=('727974e5d5924fdd653987dd4f528d27bb2653085b01ef5efcdac39dc92ef2ed586f872c202349aa31105ad970cff914de4315c2d79338a6aa18bebb8126f392'
- '6c8f9e929f0b5bf24bd288c0ca75f2a97bda294df4ea48bb393d6e9116b515e0388c3a1131de87cfcf41a46af43d15529c0b0e6e0f1c4b05431b985c5f973d79')
-b2sums=('3d1e25d503ae5306150c157bc83afdac9a475110d042e041b58de448a0dcfd75de3f4c15836b838dc799cd5f8b7e0d646e43bbe107ffad87d51ff016afe585cd'
- '7c226209cbea28e3a5360d61a70d9afc465f4f11ae48cb5bc9cc230bff25b320902070e0e0cb1fd55fc2f708b53665e7e247803c87a2ece6c5efa13ada3d8b76')
-
-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 1010996, python-httpx/trunk/PKGBUILD)
===================================================================
--- PKGBUILD (rev 0)
+++ PKGBUILD 2021-09-04 10:38:18 UTC (rev 1010997)
@@ -0,0 +1,46 @@
+# Maintainer: Eli Schwartz <eschwartz at archlinux.org>
+
+_pkgname=httpx
+pkgname=python-httpx
+pkgver=0.19.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')
+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=('3b327f07d62cf0430672d4f1a4f884618e588496f049522de327f5c34f7260eb21739b7f1fbd6f43a21962bc8737547f3eddbc22751546647f56c9cd7212840a'
+ 'faf90f908ab8d5054d096eef1ba4e9cee733eb8178d2df0dfe922923bf8a98eebf880b9a6be3386caffed88229f82f1199c026ede455a57998246821a37e5748')
+b2sums=('b8d4cb0b6e7f643b62b507930ccf1534d73d93261cab9281ef57d6392f00da325e897d5339aebacfa07aeae8278d3a81b78d6501a1587ffeaef68cc5087bfdaa'
+ '3e020b5f3c3aeeede6304851023eed4ab10f74df68203b504b5564892aa960d5c52521279a0b9cf40ead1e18b5ce9ee3998ad4502e6008f07808817d0405b7c7')
+
+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