mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api.git
synced 2024-11-26 05:51:29 +00:00
chore: Update dev nix shell
This commit is contained in:
parent
6845085a83
commit
13a2d8faca
48
shell.nix
48
shell.nix
|
@ -1,6 +1,6 @@
|
||||||
{ pkgs ? import <nixpkgs> { } }:
|
{ pkgs ? import <nixos-22.11> { } }:
|
||||||
let
|
let
|
||||||
sp-python = pkgs.python39.withPackages (p: with p; [
|
sp-python = pkgs.python310.withPackages (p: with p; [
|
||||||
setuptools
|
setuptools
|
||||||
portalocker
|
portalocker
|
||||||
pytz
|
pytz
|
||||||
|
@ -19,45 +19,7 @@ let
|
||||||
fastapi
|
fastapi
|
||||||
uvicorn
|
uvicorn
|
||||||
redis
|
redis
|
||||||
(buildPythonPackage rec {
|
strawberry-graphql
|
||||||
pname = "strawberry-graphql";
|
|
||||||
version = "0.123.0";
|
|
||||||
format = "pyproject";
|
|
||||||
patches = [
|
|
||||||
./strawberry-graphql.patch
|
|
||||||
];
|
|
||||||
propagatedBuildInputs = [
|
|
||||||
typing-extensions
|
|
||||||
python-multipart
|
|
||||||
python-dateutil
|
|
||||||
# flask
|
|
||||||
pydantic
|
|
||||||
pygments
|
|
||||||
poetry
|
|
||||||
# flask-cors
|
|
||||||
(buildPythonPackage rec {
|
|
||||||
pname = "graphql-core";
|
|
||||||
version = "3.2.0";
|
|
||||||
format = "setuptools";
|
|
||||||
src = fetchPypi {
|
|
||||||
inherit pname version;
|
|
||||||
sha256 = "sha256-huKgvgCL/eGe94OI3opyWh2UKpGQykMcJKYIN5c4A84=";
|
|
||||||
};
|
|
||||||
checkInputs = [
|
|
||||||
pytest-asyncio
|
|
||||||
pytest-benchmark
|
|
||||||
pytestCheckHook
|
|
||||||
];
|
|
||||||
pythonImportsCheck = [
|
|
||||||
"graphql"
|
|
||||||
];
|
|
||||||
})
|
|
||||||
];
|
|
||||||
src = fetchPypi {
|
|
||||||
inherit pname version;
|
|
||||||
sha256 = "KsmZ5Xv8tUg6yBxieAEtvoKoRG60VS+iVGV0X6oCExo=";
|
|
||||||
};
|
|
||||||
})
|
|
||||||
]);
|
]);
|
||||||
in
|
in
|
||||||
pkgs.mkShell {
|
pkgs.mkShell {
|
||||||
|
@ -65,6 +27,7 @@ pkgs.mkShell {
|
||||||
sp-python
|
sp-python
|
||||||
pkgs.black
|
pkgs.black
|
||||||
pkgs.redis
|
pkgs.redis
|
||||||
|
pkgs.restic
|
||||||
];
|
];
|
||||||
shellHook = ''
|
shellHook = ''
|
||||||
PYTHONPATH=${sp-python}/${sp-python.sitePackages}
|
PYTHONPATH=${sp-python}/${sp-python.sitePackages}
|
||||||
|
@ -72,8 +35,7 @@ pkgs.mkShell {
|
||||||
# for example. printenv <Name> will not fetch the value of an attribute.
|
# for example. printenv <Name> will not fetch the value of an attribute.
|
||||||
export USE_REDIS_PORT=6379
|
export USE_REDIS_PORT=6379
|
||||||
pkill redis-server
|
pkill redis-server
|
||||||
sleep 2
|
redis-server --bind 127.0.0.1 --port $USE_REDIS_PORT >/dev/null &
|
||||||
setsid redis-server --bind 127.0.0.1 --port $USE_REDIS_PORT >/dev/null 2>/dev/null &
|
|
||||||
# maybe set more env-vars
|
# maybe set more env-vars
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,96 +0,0 @@
|
||||||
diff --git a/pyproject.toml b/pyproject.toml
|
|
||||||
index 0cbf2ef..7736e92 100644
|
|
||||||
--- a/pyproject.toml
|
|
||||||
+++ b/pyproject.toml
|
|
||||||
@@ -51,7 +51,6 @@ python-multipart = "^0.0.5"
|
|
||||||
sanic = {version = ">=20.12.2,<22.0.0", optional = true}
|
|
||||||
aiohttp = {version = "^3.7.4.post0", optional = true}
|
|
||||||
fastapi = {version = ">=0.65.2", optional = true}
|
|
||||||
-"backports.cached-property" = "^1.0.1"
|
|
||||||
|
|
||||||
[tool.poetry.dev-dependencies]
|
|
||||||
pytest = "^7.1"
|
|
||||||
diff --git a/strawberry/directive.py b/strawberry/directive.py
|
|
||||||
index 491e390..26ba345 100644
|
|
||||||
--- a/strawberry/directive.py
|
|
||||||
+++ b/strawberry/directive.py
|
|
||||||
@@ -1,10 +1,10 @@
|
|
||||||
from __future__ import annotations
|
|
||||||
|
|
||||||
import dataclasses
|
|
||||||
+from functools import cached_property
|
|
||||||
import inspect
|
|
||||||
from typing import Any, Callable, List, Optional, TypeVar
|
|
||||||
|
|
||||||
-from backports.cached_property import cached_property
|
|
||||||
from typing_extensions import Annotated
|
|
||||||
|
|
||||||
from graphql import DirectiveLocation
|
|
||||||
diff --git a/strawberry/extensions/tracing/datadog.py b/strawberry/extensions/tracing/datadog.py
|
|
||||||
index 01fba20..7c06950 100644
|
|
||||||
--- a/strawberry/extensions/tracing/datadog.py
|
|
||||||
+++ b/strawberry/extensions/tracing/datadog.py
|
|
||||||
@@ -1,8 +1,8 @@
|
|
||||||
import hashlib
|
|
||||||
+from functools import cached_property
|
|
||||||
from inspect import isawaitable
|
|
||||||
from typing import Optional
|
|
||||||
|
|
||||||
-from backports.cached_property import cached_property
|
|
||||||
from ddtrace import tracer
|
|
||||||
|
|
||||||
from strawberry.extensions import Extension
|
|
||||||
diff --git a/strawberry/field.py b/strawberry/field.py
|
|
||||||
index 80ed12a..f1bf2e9 100644
|
|
||||||
--- a/strawberry/field.py
|
|
||||||
+++ b/strawberry/field.py
|
|
||||||
@@ -1,5 +1,6 @@
|
|
||||||
import builtins
|
|
||||||
import dataclasses
|
|
||||||
+from functools import cached_property
|
|
||||||
import inspect
|
|
||||||
import sys
|
|
||||||
from typing import (
|
|
||||||
@@ -18,7 +19,6 @@ from typing import (
|
|
||||||
overload,
|
|
||||||
)
|
|
||||||
|
|
||||||
-from backports.cached_property import cached_property
|
|
||||||
from typing_extensions import Literal
|
|
||||||
|
|
||||||
from strawberry.annotation import StrawberryAnnotation
|
|
||||||
diff --git a/strawberry/types/fields/resolver.py b/strawberry/types/fields/resolver.py
|
|
||||||
index c5b3edd..f4112ce 100644
|
|
||||||
--- a/strawberry/types/fields/resolver.py
|
|
||||||
+++ b/strawberry/types/fields/resolver.py
|
|
||||||
@@ -1,6 +1,7 @@
|
|
||||||
from __future__ import annotations as _
|
|
||||||
|
|
||||||
import builtins
|
|
||||||
+from functools import cached_property
|
|
||||||
import inspect
|
|
||||||
import sys
|
|
||||||
import warnings
|
|
||||||
@@ -22,7 +23,6 @@ from typing import ( # type: ignore[attr-defined]
|
|
||||||
_eval_type,
|
|
||||||
)
|
|
||||||
|
|
||||||
-from backports.cached_property import cached_property
|
|
||||||
from typing_extensions import Annotated, Protocol, get_args, get_origin
|
|
||||||
|
|
||||||
from strawberry.annotation import StrawberryAnnotation
|
|
||||||
diff --git a/strawberry/types/info.py b/strawberry/types/info.py
|
|
||||||
index a172c04..475a3ee 100644
|
|
||||||
--- a/strawberry/types/info.py
|
|
||||||
+++ b/strawberry/types/info.py
|
|
||||||
@@ -1,9 +1,8 @@
|
|
||||||
import dataclasses
|
|
||||||
+from functools import cached_property
|
|
||||||
import warnings
|
|
||||||
from typing import TYPE_CHECKING, Any, Dict, Generic, List, Optional, TypeVar, Union
|
|
||||||
|
|
||||||
-from backports.cached_property import cached_property
|
|
||||||
-
|
|
||||||
from graphql import GraphQLResolveInfo, OperationDefinitionNode
|
|
||||||
from graphql.language import FieldNode
|
|
||||||
from graphql.pyutils.path import Path
|
|
Loading…
Reference in a new issue