Skip to content

wrong version of attrs installed [AttributeError: module 'attrs.validators' has no attribute 'or_'] #977

@fruch

Description

@fruch

Current Behavior

cd pytest-argus-reporter
  python -m pip install uv nox
  nox
  shell: /usr/bin/bash -e {0}
  env:
    UV_PYTHON: [3](https://github.com/scylladb/argus/actions/runs/15420941851/job/43396749092?pr=676#step:7:3).12
    UV_CACHE_DIR: /home/runner/work/_temp/setup-uv-cache
Defaulting to user installation because normal site-packages is not writeable
Collecting uv
  Downloading uv-0.7.9-py3-none-manylinux_2_17_x86_6[4](https://github.com/scylladb/argus/actions/runs/15420941851/job/43396749092?pr=676#step:7:4).manylinux2014_x86_64.whl.metadata (11 kB)
Collecting nox
  Downloading nox-202[5](https://github.com/scylladb/argus/actions/runs/15420941851/job/43396749092?pr=676#step:7:5).5.1-py3-none-any.whl.metadata (4.7 kB)
Requirement already satisfied: argcomplete<4,>=1.9.4 in /usr/local/lib/python3.12/dist-packages (from nox) (3.[6](https://github.com/scylladb/argus/actions/runs/15420941851/job/43396749092?pr=676#step:7:6).2)
Requirement already satisfied: attrs>=23.1 in /usr/lib/python3/dist-packages (from nox) (23.2.0)
Collecting colorlog<[7](https://github.com/scylladb/argus/actions/runs/15420941851/job/43396749092?pr=676#step:7:7),>=2.6.1 (from nox)
  Downloading colorlog-6.9.0-py3-none-any.whl.metadata (10 kB)
Collecting dependency-groups>=1.1 (from nox)
  Downloading dependency_groups-1.3.1-py3-none-any.whl.metadata (2.3 kB)
Requirement already satisfied: packaging>=20.9 in /usr/lib/python3/dist-packages (from nox) (24.0)
Collecting virtualenv>=20.14.1 (from nox)
  Downloading virtualenv-20.31.2-py3-none-any.whl.metadata (4.5 kB)
Collecting distlib<1,>=0.3.7 (from virtualenv>=20.14.1->nox)
  Downloading distlib-0.3.9-py2.py3-none-any.whl.metadata (5.2 kB)
Collecting filelock<4,>=3.12.2 (from virtualenv>=20.14.1->nox)
  Downloading filelock-3.1[8](https://github.com/scylladb/argus/actions/runs/15420941851/job/43396749092?pr=676#step:7:8).0-py3-none-any.whl.metadata (2.9 kB)
Requirement already satisfied: platformdirs<5,>=3.[9](https://github.com/scylladb/argus/actions/runs/15420941851/job/43396749092?pr=676#step:7:10).1 in /usr/local/lib/python3.12/dist-packages (from virtualenv>=20.14.1->nox) (4.3.8)
Downloading uv-0.7.9-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (17.4 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 17.4/17.4 MB 160.1 MB/s eta 0:00:00
Downloading nox-2025.5.1-py3-none-any.whl (71 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 71.8/71.8 kB 26.0 MB/s eta 0:00:00
Downloading colorlog-6.9.0-py3-none-any.whl ([11](https://github.com/scylladb/argus/actions/runs/15420941851/job/43396749092?pr=676#step:7:12) kB)
Downloading dependency_groups-1.3.1-py3-none-any.whl (8.7 kB)
Downloading virtualenv-20.31.2-py3-none-any.whl (6.1 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 6.1/6.1 MB 183.5 MB/s eta 0:00:00
Downloading distlib-0.3.9-py2.py3-none-any.whl (468 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 469.0/469.0 kB 99.0 MB/s eta 0:00:00
Downloading filelock-3.18.0-py3-none-any.whl (16 kB)
Installing collected packages: distlib, uv, filelock, dependency-groups, colorlog, virtualenv, nox
Successfully installed colorlog-6.9.0 dependency-groups-1.3.1 distlib-0.3.9 filelock-3.18.0 nox-2025.5.1 uv-0.7.9 virtualenv-20.31.2
Traceback (most recent call last):
  File "/home/runner/.local/bin/nox", line 5, in <module>
    from nox.__main__ import main
  File "/home/runner/.local/lib/python3.[12](https://github.com/scylladb/argus/actions/runs/15420941851/job/43396749092?pr=676#step:7:13)/site-packages/nox/__init__.py", line 20, in <module>
    from nox._cli import main
  File "/home/runner/.local/lib/python3.12/site-packages/nox/_cli.py", line 33, in <module>
    from nox import _options, tasks, workflow
  File "/home/runner/.local/lib/python3.12/site-packages/nox/_options.py", line 28, in <module>
    from nox import _option_set
  File "/home/runner/.local/lib/python3.12/site-packages/nox/_option_set.py", line 51, in <module>
    av_opt_path = av.optional(av.or_(av.instance_of(str), av.instance_of(os.PathLike)))
                              ^^^^^^
AttributeError: module 'attrs.validators' has no attribute 'or_'

Expected Behavior

it should pick newer attrs package to match what is used.

Steps To Reproduce

No response

Environment

- OS:Ubuntu
- Python: 3.12
- Nox: 2025.5.1

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions