Skip to content

Commit c32d5bc

Browse files
geospatial-jefftonybaloneygadomski
authored
Add 3.11 to test matrix (#500)
* Add 3.11 to test matrix * gitlab -> github * add if * dont install server extra * roll our own pre-commit action * pin dev version of pypgstac[psycopg] * remove pypgstac from dev, add psycopg extra to install * pin pypgstac * revert change sto pgstac deps * bump uvicorn to 0.19.0 * whoops * fix: define __str__ for Queryables Needed for 3.11 support. Co-authored-by: Anthony Shaw <[email protected]> Co-authored-by: Pete Gadomski <[email protected]>
1 parent 15b21b0 commit c32d5bc

File tree

4 files changed

+12
-3
lines changed

4 files changed

+12
-3
lines changed

.github/workflows/cicd.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
runs-on: ubuntu-latest
1111
strategy:
1212
matrix:
13-
python-version: ["3.8", "3.9", "3.10"]
13+
python-version: ["3.8", "3.9", "3.10", "3.11"]
1414
timeout-minutes: 10
1515

1616
services:

stac_fastapi/pgstac/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"httpx",
3232
],
3333
"docs": ["mkdocs", "mkdocs-material", "pdocs"],
34-
"server": ["uvicorn[standard]==0.17.0.post1"],
34+
"server": ["uvicorn[standard]==0.19.0"],
3535
"awslambda": ["mangum"],
3636
}
3737

stac_fastapi/sqlalchemy/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"requests",
3030
],
3131
"docs": ["mkdocs", "mkdocs-material", "pdocs"],
32-
"server": ["uvicorn[standard]==0.17.0.post1"],
32+
"server": ["uvicorn[standard]==0.19.0"],
3333
}
3434

3535

stac_fastapi/sqlalchemy/stac_fastapi/sqlalchemy/extensions/query.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,15 @@ class Queryables(str, AutoValueEnum):
6666
dtype = "cog:dtype"
6767
foo = "foo"
6868

69+
def __str__(self) -> str:
70+
"""Return the Queryable's value as its __str__.
71+
72+
Python 3.11 changed the default __str__ behavior for Enums, and since we
73+
can't use StrEnum (it was introduced in 3.11), we need to define our
74+
expected behavior explicitly.
75+
"""
76+
return self.value
77+
6978

7079
@dataclass
7180
class QueryableTypes:

0 commit comments

Comments
 (0)