From 8db93b4ef72deb9ef8be096dad2376c4161e72fc Mon Sep 17 00:00:00 2001 From: dolfies Date: Sun, 1 Dec 2024 08:46:22 -0500 Subject: [PATCH] Remove unnecessary runtime typing_extensions dependency (#450) --- curl_cffi/requests/session.py | 5 +++-- pyproject.toml | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/curl_cffi/requests/session.py b/curl_cffi/requests/session.py index c4ba53f..f10cedd 100644 --- a/curl_cffi/requests/session.py +++ b/curl_cffi/requests/session.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import asyncio import math import queue @@ -25,8 +27,6 @@ ) from urllib.parse import ParseResult, parse_qsl, quote, unquote, urlencode, urljoin, urlparse -from typing_extensions import Unpack - from .. import AsyncCurl, Curl, CurlError, CurlHttpVersion, CurlInfo, CurlOpt, CurlSslVersion from ..curl import CURL_WRITEFUNC_ERROR, CurlMime from .cookies import Cookies, CookieTypes, CurlMorsel @@ -53,6 +53,7 @@ import eventlet.tpool if TYPE_CHECKING: + from typing_extensions import Unpack class ProxySpec(TypedDict, total=False): all: str diff --git a/pyproject.toml b/pyproject.toml index c43572d..227427f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,7 +7,6 @@ license = { file = "LICENSE" } dependencies = [ "cffi>=1.12.0", "certifi>=2024.2.2", - "typing_extensions", ] readme = "README.md" requires-python = ">=3.8" @@ -40,6 +39,7 @@ dev = [ "trustme>=1.1.0,<2.0", "uvicorn>=0.29.0,<1.0", "websockets>=12.0,<13.0", + "typing_extensions", ] build = [ "cibuildwheel", @@ -59,6 +59,7 @@ test = [ "trustme>=1.1.0,<2.0", "uvicorn>=0.29.0,<1.0", "websockets>=12.0,<13.0", + "typing_extensions", ]