Skip to content

Commit

Permalink
drop Python 3.9
Browse files Browse the repository at this point in the history
  • Loading branch information
fmigneault committed Feb 4, 2025
1 parent 3ffc53b commit db0c3e3
Show file tree
Hide file tree
Showing 10 changed files with 11 additions and 20 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
python-version: ["3.9", "3.10", "3.11", "3.12"]
python-version: ["3.10", "3.11", "3.12"]
allow-failure: [false]
test-case: [test-unit-only, test-func-only]
include:
Expand Down
1 change: 1 addition & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Changes
Changes:
--------
- Update ``owslib==0.32.1`` for parameters fixes employed by *Collection Input* with ``format=ogc-coverage-collection``.
- Drop support of Python 3.9 (required for ``owslib==0.32.1`` dependency).

Fixes:
------
Expand Down
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ for each process.
* - releases
- | |version| |commits-since| |docker_image|

.. |py_ver| image:: https://img.shields.io/badge/python-3.9%2B-blue.svg?logo=python
:alt: Requires Python 3.9+
.. |py_ver| image:: https://img.shields.io/badge/python-3.10%2B-blue.svg?logo=python
:alt: Requires Python 3.10+
:target: https://www.python.org/getit

.. |commits-since| image:: https://img.shields.io/github/commits-since/crim-ca/weaver/6.1.1.svg?logo=github
Expand Down
8 changes: 2 additions & 6 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,7 @@ mako
# employed by cwltool -> schema-salad -> mistune
#mistune>=2.0.3,<2.1
mypy_boto3_s3
numpy>=1.22.2,<2; python_version < "3.10"
numpy>=1.22.2; python_version >= "3.10"
numpy>=1.22.2
# esgf-compute-api (cwt) needs oauthlib but doesn't add it in their requirements
oauthlib
owslib==0.32.1
Expand Down Expand Up @@ -119,10 +118,7 @@ schema-salad>=8.3.20221209165047,<9
shapely
simplejson
# urllib3 not directly required, pinned by Snyk to avoid CVE-2024-37891
# Python<3.10 error via pip, avoid endless package install lookup error with botocore
# (https://github.com/pypa/pip/issues/12827#issuecomment-2211291150)
urllib3>=2.2.2 ; python_version >= "3.10"
urllib3==1.26.19 ; python_version < "3.10" # pyup: ignore
urllib3>=2.2.2
urlmatch
xmltodict
webob
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def _parse_requirements(file_path, requirements, links):
package_data={"": ["*.mako"]},
zip_safe=False,
test_suite="tests",
python_requires=">=3.9, <4",
python_requires=">=3.10, <4",
install_requires=REQUIREMENTS,
dependency_links=LINKS,
extras_require={
Expand Down
6 changes: 0 additions & 6 deletions weaver/compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,3 @@ def patch(self) -> int:
@property
def micro(self) -> int:
return self.patch

try:
from functools import cache # pylint: disable=unused-import # definition for other modules to import
except ImportError: # python<3.9 # pragma: no cover
from functools import lru_cache
cache = lru_cache(maxsize=None)
2 changes: 1 addition & 1 deletion weaver/formats.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import os
import re
import socket
from functools import cache
from typing import TYPE_CHECKING, cast, overload
from urllib.error import HTTPError, URLError
from urllib.request import urlopen
Expand All @@ -17,7 +18,6 @@
from requests.exceptions import ConnectionError

from weaver.base import Constants, classproperty
from weaver.compat import cache

if TYPE_CHECKING:
from typing import Any, AnyStr, Dict, List, Optional, Tuple, TypeAlias, TypeVar, Union
Expand Down
2 changes: 1 addition & 1 deletion weaver/processes/builtin/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import logging
import os
import sys
from functools import cache
from importlib import import_module
from string import Template
from typing import TYPE_CHECKING
Expand All @@ -12,7 +13,6 @@
from cwltool.singularity import SingularityCommandLineJob

from weaver import WEAVER_ROOT_DIR
from weaver.compat import cache
from weaver.database import get_db
from weaver.datatype import Process
from weaver.exceptions import PackageExecutionError, PackageNotFound, ProcessNotAccessible, ProcessNotFound
Expand Down
2 changes: 1 addition & 1 deletion weaver/processes/wps_package.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import tempfile
import time
import uuid
from functools import cache
from typing import TYPE_CHECKING, cast, overload
from urllib.parse import parse_qsl, urlparse

Expand Down Expand Up @@ -48,7 +49,6 @@
from pywps.validator.mode import MODE
from requests.structures import CaseInsensitiveDict

from weaver.compat import cache
from weaver.config import WeaverConfiguration, WeaverFeature, get_weaver_configuration
from weaver.database import get_db
from weaver.datatype import DockerAuthentication
Expand Down
2 changes: 1 addition & 1 deletion weaver/wps_restapi/swagger_definitions.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import re
from copy import copy
from decimal import Decimal
from functools import cache
from typing import TYPE_CHECKING

import colander
Expand All @@ -35,7 +36,6 @@
from pygeofilter.parsers import cql2_json, cql2_text, cql_json, ecql, fes, jfe

from weaver import WEAVER_SCHEMA_DIR, __meta__
from weaver.compat import cache
from weaver.config import WeaverFeature
from weaver.execute import (
ExecuteCollectionFormat,
Expand Down

0 comments on commit db0c3e3

Please sign in to comment.