Skip to content

Commit

Permalink
rollback of python 3.9 support
Browse files Browse the repository at this point in the history
  • Loading branch information
barrydaniels-nl committed Dec 5, 2024
1 parent a6c5f16 commit 1c9ada5
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/precommit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
with:
python-version: '3.10'
python-version: '3.9'
- uses: pre-commit/[email protected]
3 changes: 3 additions & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ jobs:
fail-fast: false
matrix:
include:
# Django 3.2
- django: "3.2"
python: "3.9"
# Django 4.2
- django: "4.2"
python: "3.10"
Expand Down
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Supported hooks: https://pre-commit.com/hooks.html
# Running "make format" fixes most issues for you
default_language_version:
python: python3.10
python: python3.9
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
Expand All @@ -21,7 +21,7 @@ repos:
hooks:
- id: pyupgrade
args:
- --py310-plus
- --py39-plus
- --keep-runtime-typing
- repo: https://github.com/adamchainz/django-upgrade
rev: "1.20.0"
Expand Down
1 change: 0 additions & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# 2024-11-25 (1.5.0)

* Added PROPERTYNAME support
* Dropped support for Python 3.9 and Django 3.2

# 2024-08-29 (1.4.1)

Expand Down
4 changes: 2 additions & 2 deletions gisserver/output/geojson.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from datetime import datetime, timezone
from decimal import Decimal
from io import BytesIO
from typing import cast
from typing import Optional, cast

import orjson
from django.conf import settings
Expand Down Expand Up @@ -225,7 +225,7 @@ def get_properties(
feature_type: FeatureType,
xsd_type: XsdComplexType,
instance: models.Model,
property_name: list[str] | None = None,
property_name: Optional[list[str]] = None,
) -> dict:
"""Collect the data for the 'properties' field.
Expand Down
3 changes: 2 additions & 1 deletion gisserver/queries/adhoc.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

import logging
from dataclasses import dataclass
from typing import Optional

from django.db.models import Q

Expand Down Expand Up @@ -45,7 +46,7 @@ class AdhocQuery(QueryExpression):
# aliases: Optional[List[str]] = None
handle: str = "" # only for XML POST requests

property_name: list[str] | None = None
property_name: Optional[list[str]] = None # noqa: UP007

# Selection clause:
# - for XML POST this is encoded in a <fes:Query>
Expand Down

0 comments on commit 1c9ada5

Please sign in to comment.