Skip to content

Commit b4732c0

Browse files
Merge pull request #167 from developmentseed/patch/avoid-future-deprecation
Patch/avoid future deprecation
2 parents 1ed838c + 2a6b62a commit b4732c0

File tree

4 files changed

+304
-80
lines changed

4 files changed

+304
-80
lines changed

CHANGES.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/).
66

77
Note: Minor version `0.X.0` update might break the API, It's recommended to pin `tipg` to minor version: `tipg>=0.1,<0.2`
88

9+
## [0.6.3] - 2024-02-02
10+
11+
- update pydantic's `Field` usage to avoid 3.0 deprecation
12+
- update starlette's `TemplateResponse' usage to avoid deprecation
13+
914
## [0.6.2] - 2024-01-19
1015

1116
- add `root_path` API settings
@@ -281,7 +286,8 @@ Note: Minor version `0.X.0` update might break the API, It's recommended to pin
281286

282287
- Initial release
283288

284-
[unreleased]: https://github.com/developmentseed/tipg/compare/0.6.2...HEAD
289+
[unreleased]: https://github.com/developmentseed/tipg/compare/0.6.3...HEAD
290+
[0.6.3]: https://github.com/developmentseed/tipg/compare/0.6.2...0.6.3
285291
[0.6.2]: https://github.com/developmentseed/tipg/compare/0.6.1...0.6.2
286292
[0.6.1]: https://github.com/developmentseed/tipg/compare/0.6.0...0.6.1
287293
[0.6.0]: https://github.com/developmentseed/tipg/compare/0.5.7...0.6.0

tipg/collections.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ class Collection(BaseModel):
160160
type: str
161161
id: str
162162
table: str
163-
dbschema: str = Field(..., alias="schema")
163+
dbschema: str = Field(alias="schema")
164164
title: Optional[str] = None
165165
description: Optional[str] = None
166166
table_columns: List[Column] = []

tipg/factory.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -139,9 +139,9 @@ def create_html_response(
139139
baseurl += router_prefix
140140

141141
return templates.TemplateResponse(
142-
f"{template_name}.html",
143-
{
144-
"request": request,
142+
request,
143+
name=f"{template_name}.html",
144+
context={
145145
"response": orjson.loads(data),
146146
"template": {
147147
"api_root": baseurl,
@@ -1829,9 +1829,9 @@ def viewer_endpoint(
18291829
tilejson_url += f"?{urlencode(request.query_params._list)}"
18301830

18311831
return self.templates.TemplateResponse(
1832+
request,
18321833
name="map.html",
18331834
context={
1834-
"request": request,
18351835
"tilejson_endpoint": tilejson_url,
18361836
},
18371837
media_type="text/html",

0 commit comments

Comments
 (0)