Skip to content
This repository was archived by the owner on Apr 26, 2025. It is now read-only.

Commit 80daed8

Browse files
committed
Drop Python 3.7 support
1 parent 44e360a commit 80daed8

File tree

6 files changed

+8
-27
lines changed

6 files changed

+8
-27
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
runs-on: ubuntu-latest
99
strategy:
1010
matrix:
11-
python_version: [3.7, 3.8, 3.9, '3.10', '3.11']
11+
python_version: [3.8, 3.9, '3.10', '3.11']
1212

1313
steps:
1414
- uses: actions/checkout@v3
@@ -44,7 +44,7 @@ jobs:
4444
- name: Set up Python
4545
uses: actions/setup-python@v4
4646
with:
47-
python-version: 3.7
47+
python-version: 3.8
4848
- name: Install dependencies
4949
shell: bash
5050
run: |

fief_client/client.py

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,7 @@
1-
import sys
2-
import uuid
3-
4-
if sys.version_info < (3, 8):
5-
from typing_extensions import TypedDict # pragma: no cover
6-
else:
7-
from typing import TypedDict # pragma: no cover
8-
91
import contextlib
102
import json
11-
from typing import Any, Dict, List, Mapping, Optional, Tuple, Union
3+
import uuid
4+
from typing import Any, Dict, List, Mapping, Optional, Tuple, TypedDict, Union
125
from urllib.parse import urlencode
136

147
import httpx

fief_client/integrations/fastapi.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
"""FastAPI integration."""
2-
import sys
32
import uuid
43
from inspect import Parameter, Signature, isawaitable
54
from typing import (
@@ -9,16 +8,12 @@
98
Generator,
109
List,
1110
Optional,
11+
Protocol,
1212
TypeVar,
1313
Union,
1414
cast,
1515
)
1616

17-
if sys.version_info < (3, 8):
18-
from typing_extensions import Protocol # pragma: no cover
19-
else:
20-
from typing import Protocol # pragma: no cover
21-
2217
from fastapi import Depends, HTTPException, Request, Response, status
2318
from fastapi.security.base import SecurityBase
2419
from fastapi.security.http import HTTPAuthorizationCredentials

fief_client/pkce.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,7 @@
11
import base64
22
import hashlib
33
import secrets
4-
import sys
5-
6-
if sys.version_info < (3, 8):
7-
from typing_extensions import Literal # pragma: no cover
8-
else:
9-
from typing import Literal # pragma: no cover
4+
from typing import Literal
105

116

127
def get_code_verifier() -> str:

pyproject.toml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,19 +89,17 @@ license = "MIT"
8989
classifiers = [
9090
"License :: OSI Approved :: MIT License",
9191
"Intended Audience :: Developers",
92-
"Programming Language :: Python :: 3.7",
9392
"Programming Language :: Python :: 3.8",
9493
"Programming Language :: Python :: 3.9",
9594
"Programming Language :: Python :: 3.10",
9695
"Programming Language :: Python :: 3.11",
9796
"Programming Language :: Python :: 3 :: Only",
9897
]
9998
dynamic = ["version"]
100-
requires-python = ">=3.7"
99+
requires-python = ">=3.8"
101100
dependencies = [
102101
"httpx >=0.21.3,<0.24.0",
103102
"jwcrypto >=1.4,<2.0.0",
104-
"typing-extensions >=4.0.1; python_version < '3.8'",
105103
]
106104

107105
[project.optional-dependencies]

tests/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
@pytest.fixture(scope="session")
1414
def keys() -> jwk.JWKSet:
15-
with open(path.join(path.dirname(__file__), "jwks.json"), "r") as jwks_file:
15+
with open(path.join(path.dirname(__file__), "jwks.json")) as jwks_file:
1616
return jwk.JWKSet.from_json(jwks_file.read())
1717

1818

0 commit comments

Comments
 (0)