Commit 37ebbc13 authored by Sigmanificient's avatar Sigmanificient
Browse files

python313Packages.nox: use attrs

parent fa0e9ffe
Loading
Loading
Loading
Loading
+41 −0
Original line number Diff line number Diff line
diff --git a/nox/update.py b/nox/update.py
index ea4425f..3101ab9 100644
--- a/nox/update.py
+++ b/nox/update.py
@@ -1,3 +1,4 @@
+import attrs
 import click
 import re
 import subprocess
@@ -6,15 +7,17 @@ from enum import Enum
 from bisect import bisect
 from pkg_resources import parse_version
 from pathlib import Path
-from characteristic import attributes
 from collections import defaultdict
 
 def query(*args):
     return subprocess.check_output(['nix-store', '--query'] + list(args),
                                    universal_newlines=True)
 
-@attributes(['full_name', 'path'], apply_with_init=False)
+@attrs.define(init=False)
 class NixPath:
+    full_name: str = attrs.field(default=None)
+    path: str = attrs.field(default=None)
+
     def __init__(self, path):
         self.path = path
         self.is_drv = self.path.endswith('.drv')
diff --git a/requirements.txt b/requirements.txt
index a7bfc0e..4298b69 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,4 +1,4 @@
+attrs
 click
 dogpile.cache
-characteristic
-requests
\ No newline at end of file
+requests
+6 −2
Original line number Diff line number Diff line
@@ -14,7 +14,11 @@ python3Packages.buildPythonApplication rec {
    sha256 = "1qcbhdnhdhhv7q6cqdgv0q55ic8fk18526zn2yb12x9r1s0lfp9z";
  };

  patches = [ ./nox-review-wip.patch ];
  patches = [
    ./nox-review-wip.patch
    # https://github.com/madjar/nox/pull/100
    ./move-to-attrs.patch
  ];

  build-system = with python3Packages; [
    setuptools
@@ -25,7 +29,7 @@ python3Packages.buildPythonApplication rec {
    dogpile-cache
    click
    requests
    characteristic
    attrs
    setuptools # pkg_resources is imported during runtime
  ];