Skip to content

Commit 48e84aa

Browse files
committed
Drop support for python 3.8
1 parent 67c9336 commit 48e84aa

File tree

9 files changed

+14
-43
lines changed

9 files changed

+14
-43
lines changed

.github/workflows/main.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,6 @@ jobs:
1111
strategy:
1212
matrix:
1313
include:
14-
- python-version: "3.8"
15-
toxfactor: py3.8
16-
ignore-typecheck-outcome: true
17-
ignore-test-outcome: false
1814
- python-version: "3.9"
1915
toxfactor: py3.9
2016
ignore-typecheck-outcome: true

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ repos:
2020
rev: ce40a160603ab0e7d9c627ae33d7ef3906e2d2b2 # frozen: v3.19.1
2121
hooks:
2222
- id: pyupgrade
23-
args: [--py38-plus]
23+
args: [--py39-plus]
2424
- repo: https://github.com/python-poetry/poetry
2525
rev: "f03d8f98781934df7910be5b6c14756e047ef432" # frozen: 2.0.0
2626
hooks:

CHANGES.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ Changelog
44
Unreleased
55
----------
66
- Declare compatibility with python 3.13
7+
- Drop support for python 3.8. Supported versions are now: 3.9, 3.10, 3.11, 3.12, 3.13.
78
- Drop support for pytest < 7.0.0.
89

910
2.7.0

poetry.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,13 @@ classifiers = [
1818
"Topic :: Software Development :: Libraries",
1919
"Topic :: Utilities",
2020
"Programming Language :: Python :: 3",
21-
"Programming Language :: Python :: 3.8",
2221
"Programming Language :: Python :: 3.9",
2322
"Programming Language :: Python :: 3.10",
2423
"Programming Language :: Python :: 3.11",
2524
"Programming Language :: Python :: 3.12",
2625
"Programming Language :: Python :: 3.13",
2726
]
28-
requires-python = ">=3.8"
27+
requires-python = ">=3.9"
2928
dependencies = [
3029
"inflection",
3130
"factory_boy>=2.10.0",
@@ -53,7 +52,7 @@ build-backend = "poetry.core.masonry.api"
5352

5453
[tool.black]
5554
line-length = 120
56-
target-version = ["py38", "py39", "py310", "py311", "py312", "py313"]
55+
target-version = ["py39", "py310", "py311", "py312", "py313"]
5756

5857
[tool.isort]
5958
profile = "black"

pytest_factoryboy/compat.py

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
from __future__ import annotations
22

3-
import pathlib
4-
import sys
53
from collections.abc import Sequence
64
from importlib.metadata import version
75

@@ -11,24 +9,13 @@
119

1210
pytest_version = parse_version(version("pytest"))
1311

14-
__all__ = ("PostGenerationContext", "path_with_stem", "getfixturedefs")
12+
__all__ = ("PostGenerationContext", "getfixturedefs")
1513

1614
try:
1715
from factory.declarations import PostGenerationContext
1816
except ImportError: # factory_boy < 3.2.0
1917
from factory.builder import PostGenerationContext
2018

21-
if sys.version_info >= (3, 9):
22-
23-
def path_with_stem(path: pathlib.Path, stem: str) -> pathlib.Path:
24-
return path.with_stem(stem)
25-
26-
else:
27-
28-
def path_with_stem(path: pathlib.Path, stem: str) -> pathlib.Path:
29-
return path.with_name(stem + path.suffix)
30-
31-
3219
if pytest_version.release >= (8, 1):
3320

3421
def getfixturedefs(fixturemanager: FixtureManager, fixturename: str, node: Node) -> Sequence[FixtureDef] | None:

pytest_factoryboy/fixture.py

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,23 +6,11 @@
66
import functools
77
import sys
88
import warnings
9+
from collections.abc import Collection, Iterable, Iterator, Mapping
910
from dataclasses import dataclass
1011
from inspect import signature
1112
from types import MethodType
12-
from typing import (
13-
TYPE_CHECKING,
14-
Any,
15-
Callable,
16-
Collection,
17-
Generic,
18-
Iterable,
19-
Iterator,
20-
Mapping,
21-
Type,
22-
TypeVar,
23-
cast,
24-
overload,
25-
)
13+
from typing import TYPE_CHECKING, Any, Callable, Generic, TypeVar, cast, overload
2614

2715
import factory
2816
import factory.builder
@@ -39,7 +27,7 @@
3927

4028
from .plugin import Request as FactoryboyRequest
4129

42-
FactoryType: TypeAlias = Type[factory.Factory]
30+
FactoryType: TypeAlias = type[factory.Factory]
4331
F = TypeVar("F", bound=FactoryType)
4432
T = TypeVar("T")
4533
T_co = TypeVar("T_co", covariant=True)

pytest_factoryboy/fixturegen.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22

33
import functools
44
import inspect
5-
from typing import Callable, Collection, TypeVar
5+
from collections.abc import Collection
6+
from typing import Callable, TypeVar
67

78
import pytest
89
from typing_extensions import ParamSpec

tox.ini

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
[tox]
22
distshare = {homedir}/.tox/distshare
3-
envlist = py{3.8,3.9,3.10,3.11,3.12,3.13}-pytest{7.3,7.4,8.0,8.1,8.2,8.3,latest,main}
4-
py{3.8,3.9,3.10,3.11}-pytest{7.0,7.1,7.2}
3+
envlist = py{3.9,3.10,3.11,3.12,3.13}-pytest{7.3,7.4,8.0,8.1,8.2,8.3,latest,main}
4+
py{3.9,3.10,3.11}-pytest{7.0,7.1,7.2}
55
mypy
66

7-
87
[testenv]
98
parallel_show_output = true
109
commands = coverage run -m pytest {posargs:tests}

0 commit comments

Comments
 (0)