From 7fd9efd11d9067f57841054f4a0b8abe8fc3d151 Mon Sep 17 00:00:00 2001 From: Alessio Bogon <778703+youtux@users.noreply.github.com> Date: Tue, 16 Sep 2025 22:00:13 +0200 Subject: [PATCH 1/5] Bump poetry to v2.2.0 --- .github/workflows/main.yml | 2 +- .pre-commit-config.yaml | 2 +- poetry.lock | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index fc4907d..d255480 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -68,7 +68,7 @@ jobs: allow-prereleases: true - name: Install poetry run: | - python -m pip install poetry==2.1.3 + python -m pip install poetry==2.2.0 - name: Configure poetry run: | poetry config virtualenvs.in-project true diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7b695d5..66b69a6 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -26,7 +26,7 @@ repos: - id: pyupgrade args: [--py39-plus] - repo: https://github.com/python-poetry/poetry - rev: "84eeadc21f92a04d46ea769e3e39d7c902e44136" # frozen: 2.1.3 + rev: "4dba0e1b041366b3f05bec89dca82e902e6386e8" # frozen: 2.2.0 hooks: - id: poetry-check args: ["--lock"] diff --git a/poetry.lock b/poetry.lock index f9e18d4..9071f1b 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 2.0.0 and should not be changed by hand. +# This file is automatically @generated by Poetry 2.2.0 and should not be changed by hand. [[package]] name = "cachetools" @@ -118,7 +118,7 @@ files = [ tomli = {version = "*", optional = true, markers = "python_full_version <= \"3.11.0a6\" and extra == \"toml\""} [package.extras] -toml = ["tomli"] +toml = ["tomli ; python_full_version <= \"3.11.0a6\""] [[package]] name = "distlib" @@ -200,7 +200,7 @@ files = [ [package.extras] docs = ["furo (>=2024.8.6)", "sphinx (>=8.1.3)", "sphinx-autodoc-typehints (>=3)"] testing = ["covdefaults (>=2.3)", "coverage (>=7.6.10)", "diff-cover (>=9.2.1)", "pytest (>=8.3.4)", "pytest-asyncio (>=0.25.2)", "pytest-cov (>=6)", "pytest-mock (>=3.14)", "pytest-timeout (>=2.3.1)", "virtualenv (>=20.28.1)"] -typing = ["typing-extensions (>=4.12.2)"] +typing = ["typing-extensions (>=4.12.2) ; python_version < \"3.11\""] [[package]] name = "inflection" @@ -523,7 +523,7 @@ platformdirs = ">=3.9.1,<5" [package.extras] docs = ["furo (>=2023.7.26)", "proselint (>=0.13)", "sphinx (>=7.1.2,!=7.3)", "sphinx-argparse (>=0.4)", "sphinxcontrib-towncrier (>=0.2.1a0)", "towncrier (>=23.6)"] -test = ["covdefaults (>=2.3)", "coverage (>=7.2.7)", "coverage-enable-subprocess (>=1)", "flaky (>=3.7)", "packaging (>=23.1)", "pytest (>=7.4)", "pytest-env (>=0.8.2)", "pytest-freezer (>=0.4.8)", "pytest-mock (>=3.11.1)", "pytest-randomly (>=3.12)", "pytest-timeout (>=2.1)", "setuptools (>=68)", "time-machine (>=2.10)"] +test = ["covdefaults (>=2.3)", "coverage (>=7.2.7)", "coverage-enable-subprocess (>=1)", "flaky (>=3.7)", "packaging (>=23.1)", "pytest (>=7.4)", "pytest-env (>=0.8.2)", "pytest-freezer (>=0.4.8) ; platform_python_implementation == \"PyPy\" or platform_python_implementation == \"GraalVM\" or platform_python_implementation == \"CPython\" and sys_platform == \"win32\" and python_version >= \"3.13\"", "pytest-mock (>=3.11.1)", "pytest-randomly (>=3.12)", "pytest-timeout (>=2.1)", "setuptools (>=68)", "time-machine (>=2.10) ; platform_python_implementation == \"CPython\""] [metadata] lock-version = "2.1" From f4417dbcbe0c9b51ac6a8e18432ea5deb826fad5 Mon Sep 17 00:00:00 2001 From: Alessio Bogon <778703+youtux@users.noreply.github.com> Date: Tue, 16 Sep 2025 22:13:50 +0200 Subject: [PATCH 2/5] Mark dev dependency group as optional and update CI to use it --- .github/workflows/main.yml | 2 +- pyproject.toml | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d255480..77f0095 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -81,7 +81,7 @@ jobs: - name: Install dev dependencies if: steps.poetry-dependencies-cache.outputs.cache-hit != 'true' run: | - poetry install + poetry install --with=dev - name: Download artifact uses: actions/download-artifact@v4 with: diff --git a/pyproject.toml b/pyproject.toml index 8d0de0d..957f69c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -44,6 +44,9 @@ repository = "https://github.com/pytest-dev/pytest-factoryboy" [tool.poetry] packages = [{include = "pytest_factoryboy", from = "src"}] +[tool.poetry.group.dev] +optional = true + [tool.poetry.group.dev.dependencies] mypy = ">=1.4.1" tox = ">=4.0.8" From 50a6756f6428e9621b93083cbc5c5dde6b353226 Mon Sep 17 00:00:00 2001 From: Alessio Bogon <778703+youtux@users.noreply.github.com> Date: Tue, 16 Sep 2025 22:13:56 +0200 Subject: [PATCH 3/5] Add `license-files` field to pyproject.toml --- poetry.lock | 2 +- pyproject.toml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/poetry.lock b/poetry.lock index 9071f1b..44da912 100644 --- a/poetry.lock +++ b/poetry.lock @@ -528,4 +528,4 @@ test = ["covdefaults (>=2.3)", "coverage (>=7.2.7)", "coverage-enable-subprocess [metadata] lock-version = "2.1" python-versions = ">=3.9" -content-hash = "798d3ffbcddef629f69cd0f996bb7e463b22f54970bc222bac7040d57d71720b" +content-hash = "f834a2f271a22edfd03aef14972d8297b1027e0c6b38a374cbae287c719c5e09" diff --git a/pyproject.toml b/pyproject.toml index 957f69c..2b2e051 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,6 +5,7 @@ description = "Factory Boy support for pytest." authors = [ { name = "Oleg Pidsadnyi", email= "oleg.pidsadnyi@gmail.com" } ] maintainers = [ { name = "Alessio Bogon", email = "778703+youtux@users.noreply.github.com" } ] license = "MIT" +license-files = [ "LICENSE.md"] readme = "README.rst" classifiers = [ From 1a34cb5488f563428fc2bf8b46786c253f169d88 Mon Sep 17 00:00:00 2001 From: Alessio Bogon <778703+youtux@users.noreply.github.com> Date: Tue, 16 Sep 2025 22:27:46 +0200 Subject: [PATCH 4/5] Update CI workflow: require recent `packaging` version to fix twine issue --- .github/workflows/main.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 77f0095..7337ec9 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -14,8 +14,9 @@ jobs: with: cache: "pip" - name: Install pypa/build - run: >- - python3 -m pip install --user build twine + # We need a recent version of `packaging`, otherwise we encounter this bug: + # https://github.com/pypa/twine/issues/1216 + run: python3 -m pip install --user build twine "packaging>=25.0" - name: Build a binary wheel and a source tarball run: python3 -m build - name: Check the distribution files with `twine` From b41b4a3a4ad192d8f065f4a4990e1f60109c160e Mon Sep 17 00:00:00 2001 From: Alessio Bogon <778703+youtux@users.noreply.github.com> Date: Tue, 16 Sep 2025 22:38:35 +0200 Subject: [PATCH 5/5] Fix spacing --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 2b2e051..98d9e64 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,7 +5,7 @@ description = "Factory Boy support for pytest." authors = [ { name = "Oleg Pidsadnyi", email= "oleg.pidsadnyi@gmail.com" } ] maintainers = [ { name = "Alessio Bogon", email = "778703+youtux@users.noreply.github.com" } ] license = "MIT" -license-files = [ "LICENSE.md"] +license-files = [ "LICENSE.md" ] readme = "README.rst" classifiers = [