From 34a4a980deb42d1a563890ba5996b58784b7f6d2 Mon Sep 17 00:00:00 2001 From: Zach Johnson Date: Mon, 27 Apr 2026 23:10:40 +0000 Subject: [PATCH] chore: bump nox and use session.run_install for uv sync --- noxfile.py | 15 +++------------ pyproject.toml | 2 +- uv.lock | 34 ++++++++++++++++++++++++++++++---- 3 files changed, 34 insertions(+), 17 deletions(-) diff --git a/noxfile.py b/noxfile.py index ccc5d71..daf8613 100644 --- a/noxfile.py +++ b/noxfile.py @@ -1,21 +1,12 @@ -import os - import nox @nox.session(reuse_venv=True, name="test-pydantic-v1") def test_pydantic_v1(session: nox.Session) -> None: - # Export uv.lock to a pip-compatible requirements file and install from it. - # `Session.run_install` would be cleaner but requires nox >= 2024.4.15; - # we're pinned to 2023.4.22 to match the previous lockfile (see FIXES.md). - requirements = os.path.join(session.create_tmp(), "requirements-dev.txt") - session.run( - "uv", "export", "--group", "dev", "--all-extras", "--frozen", - "--no-emit-project", "--output-file", requirements, + session.run_install( + "uv", "sync", "--frozen", "--group", "dev", "--all-extras", + env={"UV_PROJECT_ENVIRONMENT": session.virtualenv.location}, external=True, ) - session.install("-r", requirements) - session.install("-e", ".") session.install("pydantic<2") - session.run("pytest", "--showlocals", "--ignore=tests/functional", *session.posargs) diff --git a/pyproject.toml b/pyproject.toml index 9d3cdae..83e7b0e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -50,7 +50,7 @@ dev = [ "pytest-asyncio==1.3.0", "ruff==0.9.4", "time-machine==3.2.0", - "nox==2023.4.22", + "nox==2026.4.10", "dirty-equals==0.6.0", "importlib-metadata==7.0.0", "rich==13.7.1", diff --git a/uv.lock b/uv.lock index 7e29456..9fc76fe 100644 --- a/uv.lock +++ b/uv.lock @@ -233,6 +233,19 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/6d/c1/e419ef3723a074172b68aaa89c9f3de486ed4c2399e2dbd8113a4fdcaf9e/colorlog-6.10.1-py3-none-any.whl", hash = "sha256:2d7e8348291948af66122cff006c9f8da6255d224e7cf8e37d8de2df3bad8c9c", size = 11743, upload-time = "2025-10-16T16:14:10.512Z" }, ] +[[package]] +name = "dependency-groups" +version = "1.3.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "packaging" }, + { name = "tomli", marker = "python_full_version < '3.11'" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/62/55/f054de99871e7beb81935dea8a10b90cd5ce42122b1c3081d5282fdb3621/dependency_groups-1.3.1.tar.gz", hash = "sha256:78078301090517fd938c19f64a53ce98c32834dfe0dee6b88004a569a6adfefd", size = 10093, upload-time = "2025-05-02T00:34:29.452Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/99/c7/d1ec24fb280caa5a79b6b950db565dab30210a66259d17d5bb2b3a9f878d/dependency_groups-1.3.1-py3-none-any.whl", hash = "sha256:51aeaa0dfad72430fcfb7bcdbefbd75f3792e5919563077f30bc0d73f4493030", size = 8664, upload-time = "2025-05-02T00:34:27.085Z" }, +] + [[package]] name = "dirty-equals" version = "0.6.0" @@ -464,6 +477,15 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/16/8d/85c9701e9af72ca132a1783e2a54364a90c6da832304416a30fc11196ab2/httpx_aiohttp-0.1.12-py3-none-any.whl", hash = "sha256:5b0eac39a7f360fa7867a60bcb46bb1024eada9c01cbfecdb54dc1edb3fb7141", size = 6367, upload-time = "2025-12-12T10:12:14.018Z" }, ] +[[package]] +name = "humanize" +version = "4.15.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/ba/66/a3921783d54be8a6870ac4ccffcd15c4dc0dd7fcce51c6d63b8c63935276/humanize-4.15.0.tar.gz", hash = "sha256:1dd098483eb1c7ee8e32eb2e99ad1910baefa4b75c3aff3a82f4d78688993b10", size = 83599, upload-time = "2025-12-20T20:16:13.19Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/c5/7b/bca5613a0c3b542420cf92bd5e5fb8ebd5435ce1011a091f66bb7693285e/humanize-4.15.0-py3-none-any.whl", hash = "sha256:b1186eb9f5a9749cd9cb8565aee77919dd7c8d076161cf44d70e59e3301e1769", size = 132203, upload-time = "2025-12-20T20:16:11.67Z" }, +] + [[package]] name = "idna" version = "3.13" @@ -549,7 +571,7 @@ dev = [ { name = "dirty-equals", specifier = "==0.6.0" }, { name = "importlib-metadata", specifier = "==7.0.0" }, { name = "mypy", specifier = "==1.14.1" }, - { name = "nox", specifier = "==2023.4.22" }, + { name = "nox", specifier = "==2026.4.10" }, { name = "pyright", specifier = "==1.1.399" }, { name = "pytest", specifier = "==9.0.3" }, { name = "pytest-asyncio", specifier = "==1.3.0" }, @@ -777,17 +799,21 @@ wheels = [ [[package]] name = "nox" -version = "2023.4.22" +version = "2026.4.10" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "argcomplete" }, + { name = "attrs" }, { name = "colorlog" }, + { name = "dependency-groups" }, + { name = "humanize" }, { name = "packaging" }, + { name = "tomli", marker = "python_full_version < '3.11'" }, { name = "virtualenv" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/e7/3b/529fa8920b18b92085ed5923caee4aee112c65a7af99b34bd5a868b82e3e/nox-2023.4.22.tar.gz", hash = "sha256:46c0560b0dc609d7d967dc99e22cb463d3c4caf54a5fda735d6c11b5177e3a9f", size = 3984546, upload-time = "2023-04-23T03:13:02.285Z" } +sdist = { url = "https://files.pythonhosted.org/packages/e7/6b/e672c862a43cfca704d32359221fa3780226daa1e5db5dfc401bcc8be9c9/nox-2026.4.10.tar.gz", hash = "sha256:2d0af5374f3f37a295428c927d1b04a8182aa01762897d172446dda2f1ce9692", size = 4034839, upload-time = "2026-04-10T17:42:42.209Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/d9/c8/6e8e7412cb690fbfc993fb00e75b438e6982d2a247f29645d7daf75d013a/nox-2023.4.22-py3-none-any.whl", hash = "sha256:0b1adc619c58ab4fa57d6ab2e7823fe47a32e70202f287d78474adcc7bda1891", size = 54093, upload-time = "2023-04-23T03:12:57.08Z" }, + { url = "https://files.pythonhosted.org/packages/7f/95/4df134a100b5a9a12378d5301b934366686ef6fbdaffcd21211d5654970e/nox-2026.4.10-py3-none-any.whl", hash = "sha256:082c117627590d9b90aa21f86df89b310b07c5842539524203bcb3c719f116c1", size = 75536, upload-time = "2026-04-10T17:42:40.664Z" }, ] [[package]]