Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drops Python3.7 support #179

Merged
merged 9 commits into from
Nov 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions .github/workflows/constraints.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
pip==21.3.1
nox==2021.10.1
nox-poetry==1.0.2
poetry==1.1.11
virtualenv==20.10.0
pip==23.1.2
nox==2023.4.22
nox-poetry==1.0.3
poetry==1.6.1
2 changes: 1 addition & 1 deletion .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out the repository
uses: actions/checkout@v2.4.0
uses: actions/checkout@v4.0.0

- name: Run Labeler
uses: crazy-max/ghaction-github-labeler@v3.1.1
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out the repository
uses: actions/checkout@v2.4.0
uses: actions/checkout@v4.0.0
with:
fetch-depth: 2

- name: Set up Python
uses: actions/setup-python@v2.3.0
uses: actions/setup-python@v4.7.0
with:
python-version: "3.10"

Expand Down Expand Up @@ -57,21 +57,21 @@ jobs:

- name: Publish package on PyPI
if: steps.check-version.outputs.tag
uses: pypa/gh-action-pypi-publish@v1.4.2
uses: pypa/gh-action-pypi-publish@v1.8.10
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}

- name: Publish package on TestPyPI
if: "! steps.check-version.outputs.tag"
uses: pypa/gh-action-pypi-publish@v1.4.2
uses: pypa/gh-action-pypi-publish@v1.8.10
with:
user: __token__
password: ${{ secrets.TEST_PYPI_TOKEN }}
repository_url: https://test.pypi.org/legacy/

- name: Publish the release notes
uses: release-drafter/release-drafter@v5.15.0
uses: release-drafter/release-drafter@v5.24.0
with:
publish: ${{ steps.check-version.outputs.tag != '' }}
tag: ${{ steps.check-version.outputs.tag }}
Expand Down
24 changes: 12 additions & 12 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ jobs:
fail-fast: false
matrix:
include:
- { python: "3.10", os: "ubuntu-latest", session: "pre-commit" }
- { python: "3.10", os: "ubuntu-latest", session: "safety" }
- { python: "3.11", os: "ubuntu-latest", session: "pre-commit" }
- { python: "3.11", os: "ubuntu-latest", session: "safety" }
- { python: "3.11", os: "ubuntu-latest", session: "tests" }
- { python: "3.10", os: "ubuntu-latest", session: "tests" }
- { python: "3.9", os: "ubuntu-latest", session: "tests" }
- { python: "3.8", os: "ubuntu-latest", session: "tests" }
- { python: "3.7", os: "ubuntu-latest", session: "tests" }
- { python: "3.10", os: "ubuntu-latest", session: "xdoctest" }
- { python: "3.11", os: "ubuntu-latest", session: "xdoctest" }
- { python: "3.9", os: "ubuntu-latest", session: "docs-build" }

env:
Expand All @@ -28,10 +28,10 @@ jobs:

steps:
- name: Check out the repository
uses: actions/checkout@v2.4.0
uses: actions/checkout@v4.0.0

- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v2.3.0
uses: actions/setup-python@v4.7.0
with:
python-version: ${{ matrix.python }}

Expand Down Expand Up @@ -76,7 +76,7 @@ jobs:
print("::set-output name=result::{}".format(result))

- name: Restore pre-commit cache
uses: actions/cache@v2.1.7
uses: actions/cache@v3.3.2
if: matrix.session == 'pre-commit'
with:
path: ~/.cache/pre-commit
Expand All @@ -90,14 +90,14 @@ jobs:

- name: Upload coverage data
if: always() && matrix.session == 'tests'
uses: "actions/upload-artifact@v2.3.1"
uses: actions/upload-artifact@v3.1.3
with:
name: coverage-data
path: ".coverage.*"

- name: Upload documentation
if: matrix.session == 'docs-build'
uses: actions/upload-artifact@v2.3.1
uses: actions/upload-artifact@v3.1.3
with:
name: docs
path: docs/_build
Expand All @@ -107,10 +107,10 @@ jobs:
needs: tests
steps:
- name: Check out the repository
uses: actions/checkout@v2.4.0
uses: actions/checkout@v4.0.0

- name: Set up Python
uses: actions/setup-python@v2.3.0
uses: actions/setup-python@v4.7.0
with:
python-version: "3.10"

Expand All @@ -131,7 +131,7 @@ jobs:
nox --version

- name: Download coverage data
uses: actions/download-artifact@v2.0.10
uses: actions/download-artifact@v3.0.2
with:
name: coverage-data

Expand Down
4 changes: 4 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
Changelog
=========
`0.7.0`_ 2023-09-11
-------------------
Dropped Python3.7 support.

`0.6.0`_ 2022-02-15
-------------------
Replaced pipenv and Makefiles on Travis with this Hypermodern gubbins on
Expand Down
14 changes: 11 additions & 3 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@


package = "punq"
python_versions = ["3.10", "3.9", "3.8", "3.7", "3.6"]
python_versions = ["3.11", "3.10", "3.9", "3.8"]
LATEST = python_versions[0]
nox.needs_version = ">= 2021.6.6"

Expand All @@ -28,7 +28,7 @@
def tests(session: Session) -> None:
"""Run the test suite."""
session.install(".")
session.install("coverage[toml]", "pytest", "pygments", "expects")
session.install("coverage[toml]", "pytest", "pygments", "expects", "attrs")
try:
session.run("coverage", "run", "--parallel", "-m", "pytest", *session.posargs)
finally:
Expand Down Expand Up @@ -85,7 +85,15 @@ def safety(session: Session) -> None:
"""Scan dependencies for insecure packages."""
requirements = session.poetry.export_requirements()
session.install("safety")
session.run("safety", "check", "--full-report", f"--file={requirements}")
session.run(
"safety",
"check",
"--full-report",
f"--file={requirements}",
# sqlachemy is test only dep:
"--ignore",
"51668",
)


@session(python=LATEST)
Expand Down
Loading
Loading