Skip to content

Commit ffc7d5b

Browse files
committed
work in progress
1 parent f6addd1 commit ffc7d5b

13 files changed

Lines changed: 77 additions & 2470 deletions

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ dev-dependencies = [
4040
"pytest-xdist>=3.6.1",
4141
"ruff>=0.6.2",
4242
"moto>=5.1.4",
43+
"mypy-boto3-s3>=1.38.44",
4344
]
4445

4546
[tool.rye.include]

requirements-dev.lock

Lines changed: 28 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -12,27 +12,27 @@
1212
-e file:.
1313
annotated-types==0.7.0
1414
# via pydantic
15-
boto3==1.38.9
15+
boto3==1.38.46
1616
# via moto
1717
# via query-farm-server-base
18-
botocore==1.38.9
18+
botocore==1.38.46
1919
# via boto3
2020
# via moto
2121
# via s3transfer
2222
cache3==0.4.3
2323
# via query-farm-server-base
24-
certifi==2025.4.26
24+
certifi==2025.6.15
2525
# via requests
2626
# via sentry-sdk
2727
cffi==1.17.1
2828
# via cryptography
2929
charset-normalizer==3.4.2
3030
# via requests
31-
click==8.1.8
31+
click==8.2.1
3232
# via query-farm-server-base
33-
coverage==7.8.0
33+
coverage==7.9.1
3434
# via pytest-cov
35-
cryptography==44.0.3
35+
cryptography==45.0.4
3636
# via moto
3737
execnet==2.1.1
3838
# via pytest-xdist
@@ -54,42 +54,47 @@ levenshtein==0.27.1
5454
markupsafe==3.0.2
5555
# via jinja2
5656
# via werkzeug
57-
moto==5.1.4
58-
msgpack==1.1.0
57+
moto==5.1.6
58+
msgpack==1.1.1
5959
# via query-farm-server-base
60-
mypy==1.15.0
60+
mypy==1.16.1
6161
# via pytest-mypy
6262
mypy-boto3-dynamodb==1.38.4
6363
# via query-farm-server-base
64-
mypy-boto3-s3==1.38.0
64+
mypy-boto3-s3==1.38.44
6565
# via query-farm-server-base
6666
mypy-extensions==1.1.0
6767
# via mypy
6868
packaging==25.0
6969
# via pytest
70-
pluggy==1.5.0
70+
pathspec==0.12.1
71+
# via mypy
72+
pluggy==1.6.0
7173
# via pytest
74+
# via pytest-cov
7275
prettytable==3.16.0
7376
# via query-farm-server-base
7477
pyarrow==20.0.0
7578
# via query-farm-server-base
7679
pycparser==2.22
7780
# via cffi
78-
pydantic==2.11.4
81+
pydantic==2.11.7
7982
# via query-farm-server-base
8083
pydantic-core==2.33.2
8184
# via pydantic
82-
pytest==8.3.5
85+
pygments==2.19.2
86+
# via pytest
87+
pytest==8.4.1
8388
# via pytest-cov
8489
# via pytest-env
8590
# via pytest-mypy
8691
# via pytest-parallel
8792
# via pytest-xdist
88-
pytest-cov==6.1.1
93+
pytest-cov==6.2.1
8994
pytest-env==1.1.5
9095
pytest-mypy==1.0.1
9196
pytest-parallel==0.1.1
92-
pytest-xdist==3.6.1
97+
pytest-xdist==3.7.0
9398
python-dateutil==2.9.0.post0
9499
# via botocore
95100
# via moto
@@ -99,30 +104,30 @@ pyyaml==6.0.2
99104
# via responses
100105
rapidfuzz==3.13.0
101106
# via levenshtein
102-
requests==2.32.3
107+
requests==2.32.4
103108
# via moto
104109
# via responses
105110
responses==0.25.7
106111
# via moto
107-
ruff==0.11.8
108-
s3transfer==0.12.0
112+
ruff==0.12.1
113+
s3transfer==0.13.0
109114
# via boto3
110-
sentry-sdk==2.27.0
115+
sentry-sdk==2.32.0
111116
# via query-farm-server-base
112117
six==1.17.0
113118
# via python-dateutil
114-
structlog==25.3.0
119+
structlog==25.4.0
115120
# via query-farm-server-base
116121
tblib==3.1.0
117122
# via pytest-parallel
118-
typing-extensions==4.13.2
123+
typing-extensions==4.14.0
119124
# via mypy
120125
# via pydantic
121126
# via pydantic-core
122127
# via typing-inspection
123-
typing-inspection==0.4.0
128+
typing-inspection==0.4.1
124129
# via pydantic
125-
urllib3==2.4.0
130+
urllib3==2.5.0
126131
# via botocore
127132
# via requests
128133
# via responses

requirements.lock

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,16 @@
1212
-e file:.
1313
annotated-types==0.7.0
1414
# via pydantic
15-
boto3==1.38.9
15+
boto3==1.38.46
1616
# via query-farm-server-base
17-
botocore==1.38.9
17+
botocore==1.38.46
1818
# via boto3
1919
# via s3transfer
2020
cache3==0.4.3
2121
# via query-farm-server-base
22-
certifi==2025.4.26
22+
certifi==2025.6.15
2323
# via sentry-sdk
24-
click==8.1.8
24+
click==8.2.1
2525
# via query-farm-server-base
2626
fuzzywuzzy==0.18.0
2727
# via query-farm-server-base
@@ -30,17 +30,17 @@ jmespath==1.0.1
3030
# via botocore
3131
levenshtein==0.27.1
3232
# via python-levenshtein
33-
msgpack==1.1.0
33+
msgpack==1.1.1
3434
# via query-farm-server-base
3535
mypy-boto3-dynamodb==1.38.4
3636
# via query-farm-server-base
37-
mypy-boto3-s3==1.38.0
37+
mypy-boto3-s3==1.38.44
3838
# via query-farm-server-base
3939
prettytable==3.16.0
4040
# via query-farm-server-base
4141
pyarrow==20.0.0
4242
# via query-farm-server-base
43-
pydantic==2.11.4
43+
pydantic==2.11.7
4444
# via query-farm-server-base
4545
pydantic-core==2.33.2
4646
# via pydantic
@@ -50,21 +50,21 @@ python-levenshtein==0.27.1
5050
# via query-farm-server-base
5151
rapidfuzz==3.13.0
5252
# via levenshtein
53-
s3transfer==0.12.0
53+
s3transfer==0.13.0
5454
# via boto3
55-
sentry-sdk==2.27.0
55+
sentry-sdk==2.32.0
5656
# via query-farm-server-base
5757
six==1.17.0
5858
# via python-dateutil
59-
structlog==25.3.0
59+
structlog==25.4.0
6060
# via query-farm-server-base
61-
typing-extensions==4.13.2
61+
typing-extensions==4.14.0
6262
# via pydantic
6363
# via pydantic-core
6464
# via typing-inspection
65-
typing-inspection==0.4.0
65+
typing-inspection==0.4.1
6666
# via pydantic
67-
urllib3==2.4.0
67+
urllib3==2.5.0
6868
# via botocore
6969
# via sentry-sdk
7070
wcwidth==0.2.13

src/query_farm_server_base/auth_manager.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from abc import ABC, abstractmethod
2-
from typing import Any, Generic, TypeVar
2+
from typing import Any, TypeVar
33

44
import structlog
55

@@ -14,7 +14,7 @@
1414

1515

1616
# This is your virtual base class
17-
class AuthManager(ABC, Generic[AccountType, TokenType]):
17+
class AuthManager[AccountType: auth.Account, TokenType: auth.AccountToken](ABC):
1818
@abstractmethod
1919
def allow_anonymous_access(self) -> bool:
2020
"""Return True if anonymous access is allowed."""

src/query_farm_server_base/auth_manager_naive.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,7 @@ def __init__(
3232

3333
def data_for_token(self, token: str) -> TokenType:
3434
if self.tokens.get(token) is None:
35-
self.upsert_token(
36-
self._token_type(token=token, account_id=token, email="example@example.com")
37-
)
35+
self.upsert_token(self._token_type(token=token, account_id=token))
3836
self.upsert_account(
3937
self._account_type(
4038
account_id=token, email="example@example.com", name="Dynamic Account"

0 commit comments

Comments
 (0)