Skip to content

Commit

Permalink
Merge pull request #1035 from metno/drop-py39
Browse files Browse the repository at this point in the history
drop Python 3.9 support
closes #1034
  • Loading branch information
heikoklein authored Mar 13, 2024
2 parents f4f5c3b + bacce74 commit c145549
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 36 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
lint:
runs-on: ubuntu-latest
env:
PYTHON: 3.9
PYTHON: "3.10"
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ env.PYTHON }}
Expand All @@ -36,7 +36,7 @@ jobs:
docs:
runs-on: ubuntu-latest
env:
PYTHON: 3.9
PYTHON: "3.10"
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ env.PYTHON }}
Expand All @@ -63,7 +63,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [3.9, '3.10', '3.11']
python-version: ['3.10', '3.11']
experimental: [false]
os: [ubuntu-22.04]
include:
Expand Down Expand Up @@ -106,7 +106,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [3.9, '3.10', '3.11']
python-version: ['3.10', '3.11']
experimental: [false]
defaults:
run:
Expand Down
2 changes: 1 addition & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ build:
- proj-data
- proj-bin
tools:
python: "3.9"
python: "3.10"

python:
install:
Expand Down
10 changes: 2 additions & 8 deletions pyaerocom/colocation_auto.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,14 @@
import glob
import logging
import os
import sys
import traceback
from datetime import datetime
from importlib import metadata
from pathlib import Path
from typing import Optional

from cf_units import Unit

if sys.version_info >= (3, 10): # pragma: no cover
from importlib import metadata
else: # pragma: no cover
import importlib_metadata as metadata

import pandas as pd
from cf_units import Unit

from pyaerocom import const
from pyaerocom._lowlevel_helpers import BrowseDict, ListOfStrings, StrWithDefault, chk_make_subdir
Expand Down
7 changes: 1 addition & 6 deletions pyaerocom/io/readungridded.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,11 @@
import logging
import os
import sys
import warnings
from copy import deepcopy
from importlib import metadata
from pathlib import Path
from typing import Optional, Union

if sys.version_info >= (3, 10): # pragma: no cover
from importlib import metadata
else: # pragma: no cover
import importlib_metadata as metadata

from pyaerocom import const
from pyaerocom.combine_vardata_ungridded import combine_vardata_ungridded
from pyaerocom.exceptions import DataRetrievalError, NetworkNotImplemented, NetworkNotSupported
Expand Down
2 changes: 0 additions & 2 deletions pyaerocom_env.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ dependencies:
- openpyxl
- typer >=0.7.0
- pydantic
## python < 3.10
- importlib-metadata >=3.6
## python < 3.11
- tomli >=2.0.1
- importlib-resources >=5.10
Expand Down
15 changes: 6 additions & 9 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ authors = [{ name = "MET Norway" }]
description = "pyaerocom model evaluation software"
classifiers = [
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)",
Expand All @@ -19,7 +18,7 @@ classifiers = [
"Intended Audience :: Education",
"Topic :: Scientific/Engineering :: Atmospheric Science",
]
requires-python = ">=3.9"
requires-python = ">=3.10"
dependencies = [
"scitools-iris>=3.6.0, <3.8",
"xarray<=2022.10.0",
Expand All @@ -40,13 +39,11 @@ dependencies = [
"openpyxl",
"geojsoncontour",
"typer>=0.7.0",
# python < 3.10
'importlib-metadata>=3.6; python_version < "3.10"',
# python < 3.11
'tomli>=2.0.1; python_version < "3.11"',
'importlib-resources>=5.10; python_version < "3.11"',
# https://github.com/SciTools/cf-units/issues/218
'cf-units>=3.1; python_version >= "3.10"',
'cf-units>=3.1',
"pyaro",
"pydantic",

Expand Down Expand Up @@ -150,19 +147,19 @@ exclude_lines = [
]

[tool.black]
target-version = ['py39']
target-version = ['py310']
extend-exclude = "pyaerocom-tutorials"
line-length = 99

[tool.isort]
py_version = "39"
py_version = "310"
profile = "black"
src_paths = ["pyaerocom", "tests"]
extend_skip = ["pyaerocom-tutorials"]
line_length = 99

[tool.mypy]
python_version = "3.9"
python_version = "3.10"
warn_unused_configs = true
warn_unused_ignores = true
warn_no_return = true
Expand Down Expand Up @@ -202,7 +199,7 @@ max-line-length = 99
[tool.tox]
legacy_tox_ini = """
[tox]
envlist = py39, py310, py311, py312, format, lint, docs
envlist = py310, py311, py312, format, lint, docs
skip_missing_interpreters = True
isolated_build = True
requires =
Expand Down
7 changes: 1 addition & 6 deletions tests/plugins/test_entry_points.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
import sys

if sys.version_info >= (3, 10): # pragma: no cover
from importlib import metadata
else: # pragma: no cover
import importlib_metadata as metadata
from importlib import metadata


def test_gridded():
Expand Down

0 comments on commit c145549

Please sign in to comment.