File: patch-out-uritools.patch

package info (click to toggle)
python-pyhanko-certvalidator 0.26.3-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,988 kB
  • sloc: python: 9,254; sh: 47; makefile: 4
file content (32 lines) | stat: -rw-r--r-- 867 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
--- a/pyhanko_certvalidator/name_trees.py
+++ b/pyhanko_certvalidator/name_trees.py
@@ -3,9 +3,9 @@
 from dataclasses import dataclass
 from ipaddress import IPv4Address, IPv6Address
 from typing import Callable, Dict, Iterable, List, Optional, Set, Union
+from urllib.parse import urlparse
 
 from asn1crypto import x509
-from uritools import urisplit
 
 logger = logging.getLogger(__name__)
 
@@ -25,7 +25,7 @@
 
 
 def _host_regname(cand_uri):
-    cand_host = urisplit(cand_uri).gethost()
+    cand_host = urlparse(cand_uri).hostname
     if not cand_host or isinstance(cand_host, (IPv4Address, IPv6Address)):
         host_err = (
             f'has host {cand_host}.'
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -36,7 +36,6 @@
     "asn1crypto>=1.5.1",
     "oscrypto>=1.1.0",
     "cryptography>=41.0.5",
-    "uritools>=3.0.1",
     "requests>=2.31.0",
 ]