Skip to content

Commit

Permalink
Merge pull request #547 from pyinat/drop-37
Browse files Browse the repository at this point in the history
Drop support for python 3.7
  • Loading branch information
JWCook authored Jan 29, 2024
2 parents 613209c + 7d5a878 commit a7ec69b
Show file tree
Hide file tree
Showing 10 changed files with 706 additions and 768 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12']
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']

steps:
- uses: actions/checkout@v4
Expand All @@ -28,7 +28,6 @@ jobs:
python-version: ${{ matrix.python-version }}
- uses: snok/[email protected]
with:
version: '1.5.1' # For python 3.7 compatibility
virtualenvs-in-project: true

# Cache packages per python version, and reuse until lockfile changes
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ jobs:
python-version: ${{ env.LATEST_PY_VERSION }}
- uses: snok/[email protected]
with:
version: '1.5.1' # For python 3.7 compatibility
virtualenvs-in-project: true

- name: Set pre-release version
Expand Down
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ repos:
- id: mixed-line-ending
- id: trailing-whitespace
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.7
rev: v0.1.14
hooks:
- id: ruff
args: [ --fix ]
- id: ruff-format
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.6.1
rev: v1.8.0
hooks:
- id: mypy
additional_dependencies: [attrs, types-python-dateutil, types-requests, types-ujson]
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2022 Nicolas Noé, Jordan Cook
Copyright (c) 2024 Jordan Cook

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
3 changes: 1 addition & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,9 @@
NOTEBOOK_DIR_COPY = join(DOCS_DIR, 'examples')

# General information about the project.
copyright = '2022, Nicolas Noé, Jordan Cook'
exclude_patterns = ['_build', f'{MODULE_DOCS_DIR}/pyinaturalist.rst']
master_doc = 'index'
needs_sphinx = '4.0'
needs_sphinx = '5.0'
project = 'pyinaturalist'
source_suffix = ['.rst', '.md']
templates_path = ['_templates']
Expand Down
5 changes: 3 additions & 2 deletions docs/user_guide/general.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,15 @@ See {ref}`contributing` for details on setup for local development.
:::{dropdown} Python version compatibility
:icon: info

pyinaturalist currently requires **python 3.7+**. If you need to use an older version
pyinaturalist currently requires **python 3.8+**. If you need to use an older version
of python, here are the last compatible versions of pyinaturalist:

* **python 2.7:** pyinaturalist 0.1
* **python 3.4:** pyinaturalist 0.10
* **python 3.5:** pyinaturalist 0.11
* **python 3.6:** pyinaturalist 0.16
* **python 3.7:** still supported, but expected to be dropped in a future release
* **python 3.7:** pyinaturalist 0.19
* **python 3.8:** supported, but expected to be dropped in v1.0
:::

## Imports
Expand Down
2 changes: 1 addition & 1 deletion noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
]


@session(python=['3.7', '3.8', '3.9', '3.10', '3.11', '3.12'])
@session(python=['3.8', '3.9', '3.10', '3.11', '3.12'])
def test(session):
"""Run tests for a specific python version"""
test_paths = session.posargs or ['test']
Expand Down
1,408 changes: 677 additions & 731 deletions poetry.lock

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions pyinaturalist/models/lazy_property.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from functools import update_wrapper
from inspect import signature
from typing import Callable, Dict, List, Optional, Type
from typing import Any, Callable, Dict, List, Optional, Type

from attr import Attribute, Factory

Expand Down Expand Up @@ -66,7 +66,7 @@ def __init__(
update_wrapper(self, converter)
self.converter = converter
self.converter_kwargs = converter_kwargs
self.default = None
self.default: Any = None
self.type = type
self.__doc__ = doc
self.__set_name__(None, name)
Expand Down
42 changes: 18 additions & 24 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[tool.poetry]
name = "pyinaturalist"
version = "0.19.0"
version = "0.20.0"
description = "iNaturalist API client for python"
authors = ["Jordan Cook <[email protected]>"]
authors = ["Jordan Cook"]
license = "MIT"
readme = "README.md"
homepage = "https://github.com/pyinat/pyinaturalist"
Expand Down Expand Up @@ -40,7 +40,7 @@ packages = [
]

[tool.poetry.dependencies]
python = "^3.7"
python = "^3.8"
attrs = ">=21.2"
keyring = ">=22.3"
platformdirs = ">=2.6"
Expand All @@ -51,30 +51,24 @@ requests-cache = ">=1.1"
requests-ratelimiter = ">=0.3.2"
rich = ">=10.9"

# Workaround for package conflicts on python 3.7; required for rich
markdown-it-py = [
{python="3.7", version="2.2"},
{python=">=3.8", version=">=3.0"},
]

# Optional dependencies
ujson = {optional=true, version=">5.0"}

# Documentation dependencies needed for Readthedocs builds
furo = {optional=true, python=">=3.8", version="^2023.7"}
ipython = {optional=true, python=">=3.8", version="^8.12"}
linkify-it-py = {optional=true, python=">=3.8", version="^2.0"}
matplotlib = {optional=true, python=">=3.8", version=">=3.7"}
myst-parser = {optional=true, python=">=3.8", version=">=1.0"}
nbsphinx = {optional=true, python=">=3.8", version="^0.9"}
pillow = {optional=true, python=">=3.8", version=">=10.1"}
sphinx = {optional=true, python=">=3.8", version="^6.2"}
sphinx-automodapi = {optional=true, python=">=3.8", version="^0.15"}
sphinx-autodoc-typehints = {optional=true, python=">=3.8", version="1.20"}
sphinx-copybutton = {optional=true, python=">=3.8", version=">=0.5"}
sphinx-design = {optional=true, python=">=3.8", version=">=0.5"}
sphinxcontrib-apidoc = {optional=true, python=">=3.8", version="^0.3"}
sphinxext-opengraph = {optional=true, python=">=3.8", version=">=0.9"}
furo = {optional=true, version="^2023.7"}
ipython = {optional=true, version="^8.12"}
linkify-it-py = {optional=true, version="^2.0"}
matplotlib = {optional=true, version=">=3.7"}
myst-parser = {optional=true, version=">=1.0"}
nbsphinx = {optional=true, version="^0.9"}
pillow = {optional=true, version=">=10.1"}
sphinx = {optional=true, version="^6.2"}
sphinx-automodapi = {optional=true, version="^0.15"}
sphinx-autodoc-typehints = {optional=true, version="1.20"}
sphinx-copybutton = {optional=true, version=">=0.5"}
sphinx-design = {optional=true, version=">=0.5"}
sphinxcontrib-apidoc = {optional=true, version="^0.3"}
sphinxext-opengraph = {optional=true, version=">=0.9"}

[tool.poetry.dev-dependencies]
coverage = ">=7.2"
Expand All @@ -87,7 +81,7 @@ pytest-asyncio = ">=0.21"
pytest-cov = ">=3.0"
pytest-xdist = ">=2.2"
requests-mock = "^1.8"
sphinx-autobuild = {python=">=3.8", version=">=2021.3"}
sphinx-autobuild = ">=2021.3"

[tool.poetry.extras]
all = ["ujson"]
Expand Down

0 comments on commit a7ec69b

Please sign in to comment.