Skip to content

Commit

Permalink
✨ Deprecate Python 3.7
Browse files Browse the repository at this point in the history
  • Loading branch information
juftin committed Apr 22, 2023
1 parent 317bf60 commit 0a9ea70
Show file tree
Hide file tree
Showing 12 changed files with 727 additions and 649 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.9"
python-version: "3.10"
- name: Install Dependencies
run: |
pip install --upgrade pip
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ jobs:
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Python Environment 3.9
- name: Set up Python Environment 3.10
uses: actions/setup-python@v4
with:
python-version: 3.9
python-version: "3.10"
- name: Install Python Dependencies
run: |
python -m pip install --upgrade pip wheel
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.9"
python-version: "3.10"
- name: Upgrade pip
run: |
pip install --upgrade pip
Expand Down Expand Up @@ -46,7 +46,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.9"
python-version: "3.10"
- name: Upgrade pip
run: |
pip install --upgrade pip
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.9
python-version: "3.10"
- name: Install Poetry
run: |
python -m pip install -q poetry
Expand Down Expand Up @@ -44,7 +44,7 @@ jobs:
- name: Set up Python Environment
uses: actions/setup-python@v2
with:
python-version: "3.9"
python-version: "3.10"
- name: Install Dependencies
run: |
pip install --upgrade pip wheel setuptools
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ jobs:
fail-fast: true
matrix:
include:
- { name: Python 3.11, python: "3.11", tox: py311 }
- { name: Python 3.10, python: "3.10", tox: py310 }
- { name: Python 3.9, python: "3.9", tox: py39 }
- { name: Python 3.8, python: "3.8", tox: py38 }
- { name: Python 3.7, python: "3.7", tox: py37 }
env:
CAMPLY_LOG_HANDLER: PYTHON
steps:
Expand Down
15 changes: 2 additions & 13 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,24 +1,13 @@
FROM python:3.9-slim as python-base
FROM python:3.10-slim

FROM python-base as builder

ENV POETRY_VERSION=1.3.1
RUN python -m pip install --upgrade pip wheel
RUN python -m pip install poetry==${POETRY_VERSION}

COPY poetry.lock /tmp/camply/poetry.lock
COPY pyproject.toml /tmp/camply/pyproject.toml
COPY README.md /tmp/camply/README.md
COPY camply/ /tmp/camply/camply/

RUN cd /tmp/camply/ && poetry export -f requirements.txt --ansi --without-hashes --extras all -o /tmp/camply/requirements.txt

FROM python-base as final

MAINTAINER Justin Flannery <juftin@juftin.com>
LABEL description="camply, the campsite finder"

COPY --from=builder /tmp/camply/ /tmp/camply/
COPY requirements/prod.txt /tmp/camply/requirements.txt

RUN python -m pip install -r /tmp/camply/requirements.txt && \
python -m pip install /tmp/camply --no-dependencies && \
Expand Down
2 changes: 1 addition & 1 deletion docs/dependencies.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Dependencies

`camply` is compatible with any Python version >= `3.6`. Here are the current dependencies:
`camply` is compatible with any Python version >= `3.8.1`. Here are the current dependencies:

- [click](https://docs.python-requests.org/en/master/)
- The `click` package is used to leverage it's simple Command Line Interface
Expand Down
1,158 changes: 573 additions & 585 deletions poetry.lock

Large diffs are not rendered by default.

49 changes: 24 additions & 25 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ classifiers = [
"Development Status :: 5 - Production/Stable",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10"
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11"
]
description = "camply, the campsite finder 🏕"
documentation = "https://juftin.github.io/camply"
Expand All @@ -25,42 +25,41 @@ repository = "https://github.com/juftin/camply"
version = "0.17.0"

[tool.poetry.dependencies]
PyYAML = ">=5.1,<7.0"
click = ">=8.0.1"
fake-useragent = "^1.1.1"
pandas = "~1.3"
pydantic = ">=1.2,<2.0"
python = ">=3.7.1,<4.0"
python-dotenv = ">=0.10.4"
pytz = ">=2019.1"
click = "^8.1.3"
fake-useragent = "^1.1.3"
pandas = "^1.5.3"
pydantic = "^1.10.7"
python = ">=3.8.1,<4.0"
python-dotenv = "^1.0.0"
pytz = "^2023.2"
pyyaml = "^6.0"
ratelimit = "^2.2.1"
requests = ">=2.26.0"
rich = ">=10.0.0"
requests = "^2.28.2"
rich = "^13.3.2"
rich-click = "^1.6.1"
tenacity = ">=5.1.0"
twilio = {version = ">=7.14.0", optional = true}
tenacity = "^8.2.2"
twilio = {version = "^7.17.0", optional = true}

[tool.poetry.extras]
all = ["twilio"]
twilio = ["twilio"]

[tool.poetry.group.dev.dependencies]
coverage = {extras = ["toml"], version = ">=6.2"}
flake8 = ">=3.0.0"
coverage = {extras = ["toml"], version = "^7.2.2"}
flake8 = "^6.0.0"
mkdocs = "^1.4.2"
mkdocs-click = "^0.8.0"
mkdocs-gen-files = "^0.4.0"
mkdocs-literate-nav = "^0.5.0"
mkdocs-material = "^8.5.10"
mkdocs-section-index = "^0.3.4"
mkdocstrings = {extras = ["python"], version = "^0.19.0"}
mypy = "^0.971"
pytest = ">=5.2"
mkdocs-literate-nav = "^0.6.0"
mkdocs-material = "^9.1.4"
mkdocstrings = {extras = ["python"], version = "^0.20.0"}
mypy = "^1.1.1"
pytest = "^7.2.2"
pytest-cov = "^4.0.0"
pytest-vcr = "^1.0.2"
pytest-xdist = "^3.1.0"
ruff = "0.0.252"
tox = "^3.25.1"
pytest-xdist = "^3.2.1"
ruff = "^0.0.259"
tox = "^4.4.7"

[tool.poetry.scripts]
camply = "camply.cli:cli"
Expand Down
80 changes: 80 additions & 0 deletions requirements/dev.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
attrs==22.2.0 ; python_full_version >= "3.8.1" and python_version < "4.0"
cachetools==5.3.0 ; python_full_version >= "3.8.1" and python_version < "4.0"
certifi==2022.12.7 ; python_full_version >= "3.8.1" and python_version < "4"
chardet==5.1.0 ; python_full_version >= "3.8.1" and python_version < "4.0"
charset-normalizer==3.1.0 ; python_full_version >= "3.8.1" and python_version < "4"
click==8.1.3 ; python_full_version >= "3.8.1" and python_version < "4.0"
colorama==0.4.6 ; python_full_version >= "3.8.1" and python_version < "4.0"
coverage[toml]==7.2.2 ; python_full_version >= "3.8.1" and python_version < "4.0"
distlib==0.3.6 ; python_full_version >= "3.8.1" and python_version < "4.0"
exceptiongroup==1.1.1 ; python_full_version >= "3.8.1" and python_version < "3.11"
execnet==1.9.0 ; python_full_version >= "3.8.1" and python_version < "4.0"
fake-useragent==1.1.3 ; python_full_version >= "3.8.1" and python_version < "4.0"
filelock==3.10.4 ; python_full_version >= "3.8.1" and python_version < "4.0"
flake8==6.0.0 ; python_full_version >= "3.8.1" and python_version < "4.0"
ghp-import==2.1.0 ; python_full_version >= "3.8.1" and python_version < "4.0"
griffe==0.25.5 ; python_full_version >= "3.8.1" and python_version < "4.0"
idna==3.4 ; python_full_version >= "3.8.1" and python_version < "4"
importlib-metadata==6.1.0 ; python_full_version >= "3.8.1" and python_version < "3.10"
importlib-resources==5.12.0 ; python_full_version >= "3.8.1" and python_version < "3.10"
iniconfig==2.0.0 ; python_full_version >= "3.8.1" and python_version < "4.0"
jinja2==3.1.2 ; python_full_version >= "3.8.1" and python_version < "4.0"
markdown-it-py==2.2.0 ; python_full_version >= "3.8.1" and python_version < "4.0"
markdown==3.3.7 ; python_full_version >= "3.8.1" and python_version < "4.0"
markupsafe==2.1.2 ; python_full_version >= "3.8.1" and python_version < "4.0"
mccabe==0.7.0 ; python_full_version >= "3.8.1" and python_version < "4.0"
mdurl==0.1.2 ; python_full_version >= "3.8.1" and python_version < "4.0"
mergedeep==1.3.4 ; python_full_version >= "3.8.1" and python_version < "4.0"
mkdocs-autorefs==0.4.1 ; python_full_version >= "3.8.1" and python_version < "4.0"
mkdocs-click==0.8.0 ; python_full_version >= "3.8.1" and python_version < "4.0"
mkdocs-gen-files==0.4.0 ; python_full_version >= "3.8.1" and python_version < "4.0"
mkdocs-literate-nav==0.6.0 ; python_full_version >= "3.8.1" and python_version < "4.0"
mkdocs-material-extensions==1.1.1 ; python_full_version >= "3.8.1" and python_version < "4.0"
mkdocs-material==9.1.4 ; python_full_version >= "3.8.1" and python_version < "4.0"
mkdocs==1.4.2 ; python_full_version >= "3.8.1" and python_version < "4.0"
mkdocstrings-python==0.8.3 ; python_full_version >= "3.8.1" and python_version < "4.0"
mkdocstrings==0.20.0 ; python_full_version >= "3.8.1" and python_version < "4.0"
mkdocstrings[python]==0.20.0 ; python_full_version >= "3.8.1" and python_version < "4.0"
multidict==6.0.4 ; python_full_version >= "3.8.1" and python_version < "4.0"
mypy-extensions==1.0.0 ; python_full_version >= "3.8.1" and python_version < "4.0"
mypy==1.1.1 ; python_full_version >= "3.8.1" and python_version < "4.0"
numpy==1.24.2 ; python_version < "4.0" and python_full_version >= "3.8.1"
packaging==23.0 ; python_full_version >= "3.8.1" and python_version < "4.0"
pandas==1.5.3 ; python_full_version >= "3.8.1" and python_version < "4.0"
platformdirs==3.1.1 ; python_full_version >= "3.8.1" and python_version < "4.0"
pluggy==1.0.0 ; python_full_version >= "3.8.1" and python_version < "4.0"
pycodestyle==2.10.0 ; python_full_version >= "3.8.1" and python_version < "4.0"
pydantic==1.10.7 ; python_full_version >= "3.8.1" and python_version < "4.0"
pyflakes==3.0.1 ; python_full_version >= "3.8.1" and python_version < "4.0"
pygments==2.14.0 ; python_full_version >= "3.8.1" and python_version < "4.0"
pyjwt==2.6.0 ; python_full_version >= "3.8.1" and python_version < "4.0"
pymdown-extensions==9.10 ; python_full_version >= "3.8.1" and python_version < "4.0"
pyproject-api==1.5.1 ; python_full_version >= "3.8.1" and python_version < "4.0"
pytest-cov==4.0.0 ; python_full_version >= "3.8.1" and python_version < "4.0"
pytest-vcr==1.0.2 ; python_full_version >= "3.8.1" and python_version < "4.0"
pytest-xdist==3.2.1 ; python_full_version >= "3.8.1" and python_version < "4.0"
pytest==7.2.2 ; python_full_version >= "3.8.1" and python_version < "4.0"
python-dateutil==2.8.2 ; python_full_version >= "3.8.1" and python_version < "4.0"
python-dotenv==1.0.0 ; python_full_version >= "3.8.1" and python_version < "4.0"
pytz==2023.2 ; python_full_version >= "3.8.1" and python_version < "4.0"
pyyaml-env-tag==0.1 ; python_full_version >= "3.8.1" and python_version < "4.0"
pyyaml==6.0 ; python_full_version >= "3.8.1" and python_version < "4.0"
ratelimit==2.2.1 ; python_full_version >= "3.8.1" and python_version < "4.0"
regex==2023.3.23 ; python_full_version >= "3.8.1" and python_version < "4.0"
requests==2.28.2 ; python_full_version >= "3.8.1" and python_version < "4"
rich-click==1.6.1 ; python_full_version >= "3.8.1" and python_version < "4.0"
rich==13.3.2 ; python_full_version >= "3.8.1" and python_version < "4.0"
ruff==0.0.259 ; python_full_version >= "3.8.1" and python_version < "4.0"
six==1.16.0 ; python_full_version >= "3.8.1" and python_version < "4.0"
tenacity==8.2.2 ; python_full_version >= "3.8.1" and python_version < "4.0"
tomli==2.0.1 ; python_full_version >= "3.8.1" and python_full_version <= "3.11.0a6"
tox==4.4.7 ; python_full_version >= "3.8.1" and python_version < "4.0"
twilio==7.17.0 ; python_full_version >= "3.8.1" and python_version < "4.0"
typing-extensions==4.5.0 ; python_full_version >= "3.8.1" and python_version < "4.0"
urllib3==1.26.15 ; python_full_version >= "3.8.1" and python_version < "4"
vcrpy==4.2.1 ; python_full_version >= "3.8.1" and python_version < "4.0"
virtualenv==20.21.0 ; python_full_version >= "3.8.1" and python_version < "4.0"
watchdog==3.0.0 ; python_full_version >= "3.8.1" and python_version < "4.0"
wrapt==1.15.0 ; python_full_version >= "3.8.1" and python_version < "4.0"
yarl==1.8.2 ; python_full_version >= "3.8.1" and python_version < "4.0"
zipp==3.15.0 ; python_full_version >= "3.8.1" and python_version < "3.10"
28 changes: 28 additions & 0 deletions requirements/prod.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
certifi==2022.12.7 ; python_full_version >= "3.8.1" and python_version < "4"
charset-normalizer==3.1.0 ; python_full_version >= "3.8.1" and python_version < "4"
click==8.1.3 ; python_full_version >= "3.8.1" and python_version < "4.0"
colorama==0.4.6 ; python_full_version >= "3.8.1" and python_version < "4.0" and platform_system == "Windows"
fake-useragent==1.1.3 ; python_full_version >= "3.8.1" and python_version < "4.0"
idna==3.4 ; python_full_version >= "3.8.1" and python_version < "4"
importlib-resources==5.12.0 ; python_full_version >= "3.8.1" and python_version < "3.10"
markdown-it-py==2.2.0 ; python_full_version >= "3.8.1" and python_version < "4.0"
mdurl==0.1.2 ; python_full_version >= "3.8.1" and python_version < "4.0"
numpy==1.24.2 ; python_version < "4.0" and python_full_version >= "3.8.1"
pandas==1.5.3 ; python_full_version >= "3.8.1" and python_version < "4.0"
pydantic==1.10.7 ; python_full_version >= "3.8.1" and python_version < "4.0"
pygments==2.14.0 ; python_full_version >= "3.8.1" and python_version < "4.0"
pyjwt==2.6.0 ; python_full_version >= "3.8.1" and python_version < "4.0"
python-dateutil==2.8.2 ; python_full_version >= "3.8.1" and python_version < "4.0"
python-dotenv==1.0.0 ; python_full_version >= "3.8.1" and python_version < "4.0"
pytz==2023.2 ; python_full_version >= "3.8.1" and python_version < "4.0"
pyyaml==6.0 ; python_full_version >= "3.8.1" and python_version < "4.0"
ratelimit==2.2.1 ; python_full_version >= "3.8.1" and python_version < "4.0"
requests==2.28.2 ; python_full_version >= "3.8.1" and python_version < "4"
rich-click==1.6.1 ; python_full_version >= "3.8.1" and python_version < "4.0"
rich==13.3.2 ; python_full_version >= "3.8.1" and python_version < "4.0"
six==1.16.0 ; python_full_version >= "3.8.1" and python_version < "4.0"
tenacity==8.2.2 ; python_full_version >= "3.8.1" and python_version < "4.0"
twilio==7.17.0 ; python_full_version >= "3.8.1" and python_version < "4.0"
typing-extensions==4.5.0 ; python_full_version >= "3.8.1" and python_version < "4.0"
urllib3==1.26.15 ; python_full_version >= "3.8.1" and python_version < "4"
zipp==3.15.0 ; python_full_version >= "3.8.1" and python_version < "3.10"
28 changes: 11 additions & 17 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,7 @@ isolated_build = true
[testenv]
changedir = {toxinidir}
deps =
pytest>=5.2
coverage[toml]>=6.2
flake8>=3.0.0
mypy>=0.971
pytest-vcr~=1.0.2
pytest-cov~=4.0.0
pytest-xdist~=3.1.0
-r requirements/dev.txt
setenv =
PUSHOVER_PUSH_USER = {env:PUSHOVER_PUSH_USER:placeholder}
PUSHOVER_PUSH_TOKEN = {env:PUSHOVER_PUSH_TOKEN:placeholder}
Expand All @@ -31,14 +25,6 @@ log_format = "%(asctime)s [%(levelname)8s]: %(message)s [%(name)s]"

[testenv:lint]
changedir = {toxinidir}
skip_install = true
deps =
flake8
flake8-bugbear
flake8-docstrings
flake8-typing-imports
pep8-naming
ruff==0.0.252
commands =
flake8 camply/ tests/
ruff {toxinidir}
Expand Down Expand Up @@ -75,8 +61,6 @@ per-file-ignores =

[testenv:mypy]
changedir = {toxinidir}
deps =
mypy
commands =
mypy \
--config-file {toxinidir}/tox.ini \
Expand All @@ -99,3 +83,13 @@ ignore_missing_imports = True

[mypy-camply.utils.camply_cli]
ignore_errors = True

[testenv:requirements]
changedir = {toxinidir}
allowlist_externals =
poetry
skip_install = true
deps =
commands =
poetry export -f requirements.txt --without-hashes --extras all -o requirements/prod.txt
poetry export -f requirements.txt --without-hashes --extras all --with dev -o requirements/dev.txt

0 comments on commit 0a9ea70

Please sign in to comment.