Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Patch/avoid future deprecation #167

Merged
merged 2 commits into from
Feb 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/).

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`

## [0.6.3] - 2024-02-02

- update pydantic's `Field` usage to avoid 3.0 deprecation
- update starlette's `TemplateResponse' usage to avoid deprecation

## [0.6.2] - 2024-01-19

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

- Initial release

[unreleased]: https://github.com/developmentseed/tipg/compare/0.6.2...HEAD
[unreleased]: https://github.com/developmentseed/tipg/compare/0.6.3...HEAD
[0.6.3]: https://github.com/developmentseed/tipg/compare/0.6.2...0.6.3
[0.6.2]: https://github.com/developmentseed/tipg/compare/0.6.1...0.6.2
[0.6.1]: https://github.com/developmentseed/tipg/compare/0.6.0...0.6.1
[0.6.0]: https://github.com/developmentseed/tipg/compare/0.5.7...0.6.0
Expand Down
2 changes: 1 addition & 1 deletion tipg/collections.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ class Collection(BaseModel):
type: str
id: str
table: str
dbschema: str = Field(..., alias="schema")
dbschema: str = Field(alias="schema")
title: Optional[str] = None
description: Optional[str] = None
table_columns: List[Column] = []
Expand Down
8 changes: 4 additions & 4 deletions tipg/factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,9 @@ def create_html_response(
baseurl += router_prefix

return templates.TemplateResponse(
f"{template_name}.html",
{
"request": request,
request,
name=f"{template_name}.html",
context={
"response": orjson.loads(data),
"template": {
"api_root": baseurl,
Expand Down Expand Up @@ -1829,9 +1829,9 @@ def viewer_endpoint(
tilejson_url += f"?{urlencode(request.query_params._list)}"

return self.templates.TemplateResponse(
request,
name="map.html",
context={
"request": request,
"tilejson_endpoint": tilejson_url,
},
media_type="text/html",
Expand Down
Loading
Loading