Skip to content

Commit 441a32d

Browse files
authored
Merge pull request #31 from vikynoah/main
fix: Remove urllib3 requirement restriction
2 parents 324d69a + 626c8bb commit 441a32d

File tree

4 files changed

+8
-5
lines changed

4 files changed

+8
-5
lines changed

infisical_sdk/infisical_requests.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
11
from typing import Any, Dict, Generic, Optional, TypeVar, Type
2-
from urllib.parse import urljoin
32
import requests
43
from dataclasses import dataclass
54

65
T = TypeVar("T")
76

7+
def join_url(base: str, path: str) -> str:
8+
"""
9+
Join base URL and path properly, handling slashes appropriately.
10+
"""
11+
if not base.endswith('/'):
12+
base += '/'
13+
return base + path.lstrip('/')
814

915
class InfisicalError(Exception):
1016
"""Base exception for Infisical client errors"""
@@ -60,7 +66,7 @@ def __init__(self, host: str, token: Optional[str] = None):
6066

6167
def _build_url(self, path: str) -> str:
6268
"""Construct full URL from path"""
63-
return urljoin(self.host, path.lstrip("/"))
69+
return join_url(self.host, path.lstrip("/"))
6470

6571
def set_token(self, token: str):
6672
"""Set authorization token"""

pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ include = ["infisicalapi_client/py.typed"]
1212
[tool.poetry.dependencies]
1313
python = "^3.7"
1414

15-
urllib3 = ">= 1.25.3"
1615
python-dateutil = ">=2.8.2"
1716
aenum = ">=3.1.11"
1817

requirements.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
python_dateutil >= 2.5.3
22
setuptools >= 21.0.0
3-
urllib3 >= 1.25.3, < 2.1.0
43
aenum >= 3.1.11
54
requests >= 2.31.0
65
boto3 >= 1.33.8

setup.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
VERSION = "1.0.1"
1919
PYTHON_REQUIRES = ">=3.8"
2020
REQUIRES = [
21-
"urllib3 >= 1.25.3, < 2.1.0",
2221
"python-dateutil",
2322
"aenum",
2423
"requests~=2.32",

0 commit comments

Comments
 (0)