Skip to content

Commit 5339d04

Browse files
committed
fix URL type after starlette update
1 parent 218206e commit 5339d04

File tree

5 files changed

+12
-41
lines changed

5 files changed

+12
-41
lines changed

.pre-commit-config.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ repos:
66
language_version: python
77

88
- repo: https://github.com/PyCQA/isort
9-
rev: 5.4.2
9+
rev: 5.12.0
1010
hooks:
1111
- id: isort
1212
language_version: python
@@ -26,7 +26,8 @@ repos:
2626
- toml
2727

2828
- repo: https://github.com/pre-commit/mirrors-mypy
29-
rev: v0.812
29+
rev: v0.991
3030
hooks:
3131
- id: mypy
3232
language_version: python
33+

CHANGES.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Release Notes
22

3+
## 0.8.0a3 (2023-03-14)
4+
5+
* fix factories `url_for` type (for starlette >=0.26)
6+
37
## 0.8.0a2 (2022-12-14)
48

59
* replace `VectorTilerFactory.tms_dependency` attribute by `TilerFactory.supported_tms`. This attribute gets a `morecantile.defaults.TileMatrixSets` store and will create the tms dependencies dynamically

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ test = [
4444
"mapbox-vector-tile",
4545
"protobuf>=3.0,<4.0",
4646
"numpy",
47+
"sqlalchemy>=1.1,<1.4",
4748
]
4849
dev = [
4950
"pre-commit",

setup.py

Lines changed: 0 additions & 37 deletions
This file was deleted.

timvt/factory.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,8 @@ def url_for(self, request: Request, name: str, **path_params: Any) -> str:
101101
base_url = str(request.base_url)
102102
if self.router_prefix:
103103
base_url += self.router_prefix.lstrip("/")
104-
return url_path.make_absolute_url(base_url=base_url)
104+
105+
return str(url_path.make_absolute_url(base_url=base_url))
105106

106107
def register_tiles(self):
107108
"""Register /tiles endpoints."""
@@ -335,7 +336,8 @@ def url_for(self, request: Request, name: str, **path_params: Any) -> str:
335336
base_url = str(request.base_url)
336337
if self.router_prefix:
337338
base_url += self.router_prefix.lstrip("/")
338-
return url_path.make_absolute_url(base_url=base_url)
339+
340+
return str(url_path.make_absolute_url(base_url=base_url))
339341

340342
def register_routes(self):
341343
"""Register TMS endpoint routes."""

0 commit comments

Comments
 (0)