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

Misc updates #197

Merged
merged 19 commits into from
Jul 23, 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
23 changes: 11 additions & 12 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,30 +11,26 @@ jobs:
strategy:
matrix:
include:
- python-version: "3.7"
toxfactor: py37
ignore-typecheck-outcome: true
ignore-test-outcome: false
- python-version: "3.8"
toxfactor: py38
toxfactor: py3.8
ignore-typecheck-outcome: true
ignore-test-outcome: false
- python-version: "3.9"
toxfactor: py39
toxfactor: py3.9
ignore-typecheck-outcome: true
ignore-test-outcome: false
- python-version: "3.10"
toxfactor: py310
toxfactor: py3.10
ignore-typecheck-outcome: true
ignore-test-outcome: false
- python-version: "3.11"
toxfactor: py311
toxfactor: py3.11
ignore-typecheck-outcome: true
ignore-test-outcome: false
- python-version: "3.12.0-alpha.3"
toxfactor: py312
- python-version: "3.12-dev"
toxfactor: py3.12
ignore-typecheck-outcome: true
ignore-test-outcome: true
ignore-test-outcome: false

steps:
- uses: actions/checkout@v3
Expand All @@ -47,7 +43,7 @@ jobs:

- name: Install poetry
run: |
python -m pip install poetry==1.3.1
python -m pip install poetry==1.5.1
- name: Configure poetry
run: |
Expand Down Expand Up @@ -83,5 +79,8 @@ jobs:
- uses: codecov/codecov-action@v3
with:
# Explicitly using the token in order to avoid Codecov rate limit errors
# See https://community.codecov.com/t/upload-issues-unable-to-locate-build-via-github-actions-api/3954
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
verbose: true # optional (default = false)
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/psf/black
rev: 23.3.0
rev: 23.7.0
hooks:
- id: black
- repo: https://github.com/pycqa/isort
Expand All @@ -17,7 +17,7 @@ repos:
- id: check-yaml
- id: check-added-large-files
- repo: https://github.com/asottile/pyupgrade
rev: v3.3.2
rev: v3.9.0
hooks:
- id: pyupgrade
args: [--py37-plus]
args: [--py38-plus]
2 changes: 2 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ Changelog

Unreleased
----------
- Drop python 3.7 support and add support for python 3.12. Supported versions are now: 3.8, 3.9, 3.10, 3.11, 3.12. `#197 <https://github.com/pytest-dev/pytest-factoryboy/pull/197>`_
- Drop support for pytest < 6.2. We now support only pytest >= 6.2 (tested against pytest 7.4 at the time of writing). `#197 <https://github.com/pytest-dev/pytest-factoryboy/pull/197>`_

2.5.1
----------
Expand Down
364 changes: 166 additions & 198 deletions poetry.lock

Large diffs are not rendered by default.

12 changes: 5 additions & 7 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "pytest-factoryboy"
version = "2.5.1"
description = "Factory Boy support for pytest."
authors = ["Oleg Pidsadnyi <oleg.pidsadnyi@gmail.com>"]
maintainers = ["Alessio Bogon <youtux@gmail.com>"]
maintainers = ["Alessio Bogon <778703+youtux@users.noreply.github.com>"]
license = "MIT"
readme = "README.rst"
homepage = "https://pytest-factoryboy.readthedocs.io/"
Expand All @@ -20,28 +20,26 @@ classifiers = [
"Topic :: Software Development :: Libraries",
"Topic :: Utilities",
"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.11",
"Programming Language :: Python :: 3.12",
]

[tool.poetry.plugins."pytest11"]
"pytest-factoryboy" = "pytest_factoryboy.plugin"

[tool.poetry.dependencies]
python = "~=3.7"
python = ">=3.7"
inflection = "*"
factory_boy = ">=2.10.0"
pytest = ">=5.0.0"
typing_extensions = "*"

[tool.poetry.group.dev.dependencies]
mypy = "^0.991"
mypy = "^1.4.1"
tox = "^4.0.8"
packaging = "^22.0"
importlib-metadata = { version = "^5.0.0", python = "<3.8" }
coverage = {extras = ["toml"], version = "^6.5.0"}

[build-system]
Expand All @@ -50,7 +48,7 @@ build-backend = "poetry.core.masonry.api"

[tool.black]
line-length = 120
target-version = ['py37', 'py38', 'py39', 'py310', 'py311']
target-version = ['py38', 'py39', 'py310', 'py311']

[tool.isort]
profile = 'black'
Expand Down
7 changes: 1 addition & 6 deletions tests/compat.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
from __future__ import annotations

import sys
from importlib import metadata

from _pytest.pytester import RunResult
from packaging.version import Version

if sys.version_info >= (3, 8):
from importlib import metadata
else:
import importlib_metadata as metadata

PYTEST_VERSION = Version(metadata.version("pytest"))

if PYTEST_VERSION >= Version("6.0.0"):
Expand Down
25 changes: 9 additions & 16 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[tox]
distshare = {homedir}/.tox/distshare
envlist = py{37,38,39}-pytest{50,51,52,53,54,60,61,62,70,71,72,latest,main}
py{310,311,312}-pytest{62,70,71,latest,main}
envlist = py{3.8,3.9,3.10,3.11}-pytest{6.2,7.0,7.1,7.2,7.3,7.4,latest,main}
py3.12-pytest{7.3,7.4,latest,main}
mypy


Expand All @@ -11,25 +11,18 @@ commands = coverage run -m pytest {posargs:tests}
deps =
pytestlatest: pytest
pytestmain: git+https://github.com/pytest-dev/pytest.git@main
pytest72: pytest~=7.2.0
pytest71: pytest~=7.1.0
pytest70: pytest~=7.0.0
pytest62: pytest~=6.2.0
pytest61: pytest~=6.1.0
pytest60: pytest~=6.0.0
pytest54: pytest~=5.4.0
pytest53: pytest~=5.3.0
pytest52: pytest~=5.2.0
pytest51: pytest~=5.1.0
pytest50: pytest~=5.0.0
pytest7.4: pytest~=7.4.0
pytest7.3: pytest~=7.3.0
pytest7.2: pytest~=7.2.0
pytest7.1: pytest~=7.1.0
pytest7.0: pytest~=7.0.0
pytest6.2: pytest~=6.2.0

coverage[toml]

[testenv:mypy]
allowlist_externals = mypy
commands = mypy {posargs:.}
deps =
mypy~=0.991


[pytest]
addopts = -vv -l
Loading