mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api.git
synced 2025-03-17 20:14:39 +00:00
Update Strawberry and backport graphql-core to Nixos 21.11
This commit is contained in:
parent
bec99f29ec
commit
5be240d357
2 changed files with 61 additions and 14 deletions
24
shell.nix
24
shell.nix
|
@ -1,4 +1,4 @@
|
||||||
{ pkgs ? import <nixpkgs> {} }:
|
{ pkgs ? import <nixpkgs> { } }:
|
||||||
let
|
let
|
||||||
sp-python = pkgs.python39.withPackages (p: with p; [
|
sp-python = pkgs.python39.withPackages (p: with p; [
|
||||||
flask
|
flask
|
||||||
|
@ -23,14 +23,13 @@ let
|
||||||
black
|
black
|
||||||
(buildPythonPackage rec {
|
(buildPythonPackage rec {
|
||||||
pname = "strawberry-graphql";
|
pname = "strawberry-graphql";
|
||||||
version = "0.114.5";
|
version = "0.123.0";
|
||||||
format = "pyproject";
|
format = "pyproject";
|
||||||
patches = [
|
patches = [
|
||||||
./strawberry-graphql.patch
|
./strawberry-graphql.patch
|
||||||
];
|
];
|
||||||
propagatedBuildInputs = [
|
propagatedBuildInputs = [
|
||||||
typing-extensions
|
typing-extensions
|
||||||
graphql-core
|
|
||||||
python-multipart
|
python-multipart
|
||||||
python-dateutil
|
python-dateutil
|
||||||
flask
|
flask
|
||||||
|
@ -38,10 +37,27 @@ let
|
||||||
pygments
|
pygments
|
||||||
poetry
|
poetry
|
||||||
flask-cors
|
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 {
|
src = fetchPypi {
|
||||||
inherit pname version;
|
inherit pname version;
|
||||||
sha256 = "b6e007281cf29a66eeba66a512744853d8aa53b4ca2525befb6f350bb7b24df6";
|
sha256 = "KsmZ5Xv8tUg6yBxieAEtvoKoRG60VS+iVGV0X6oCExo=";
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
]);
|
]);
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
diff --git a/pyproject.toml b/pyproject.toml
|
diff --git a/pyproject.toml b/pyproject.toml
|
||||||
index 3283fce..89d3e8c 100644
|
index 0cbf2ef..7736e92 100644
|
||||||
--- a/pyproject.toml
|
--- a/pyproject.toml
|
||||||
+++ b/pyproject.toml
|
+++ b/pyproject.toml
|
||||||
@@ -45,7 +45,6 @@ python-multipart = "^0.0.5"
|
@@ -51,7 +51,6 @@ python-multipart = "^0.0.5"
|
||||||
sanic = {version = ">=20.12.2,<22.0.0", optional = true}
|
sanic = {version = ">=20.12.2,<22.0.0", optional = true}
|
||||||
aiohttp = {version = "^3.7.4.post0", optional = true}
|
aiohttp = {version = "^3.7.4.post0", optional = true}
|
||||||
fastapi = {version = ">=0.65.2", optional = true}
|
fastapi = {version = ">=0.65.2", optional = true}
|
||||||
|
@ -10,8 +10,38 @@ index 3283fce..89d3e8c 100644
|
||||||
|
|
||||||
[tool.poetry.dev-dependencies]
|
[tool.poetry.dev-dependencies]
|
||||||
pytest = "^7.1"
|
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
|
diff --git a/strawberry/field.py b/strawberry/field.py
|
||||||
index 4e7ee4b..06c2044 100644
|
index 80ed12a..f1bf2e9 100644
|
||||||
--- a/strawberry/field.py
|
--- a/strawberry/field.py
|
||||||
+++ b/strawberry/field.py
|
+++ b/strawberry/field.py
|
||||||
@@ -1,5 +1,6 @@
|
@@ -1,5 +1,6 @@
|
||||||
|
@ -30,24 +60,25 @@ index 4e7ee4b..06c2044 100644
|
||||||
|
|
||||||
from strawberry.annotation import StrawberryAnnotation
|
from strawberry.annotation import StrawberryAnnotation
|
||||||
diff --git a/strawberry/types/fields/resolver.py b/strawberry/types/fields/resolver.py
|
diff --git a/strawberry/types/fields/resolver.py b/strawberry/types/fields/resolver.py
|
||||||
index 0409233..f4fbe9a 100644
|
index c5b3edd..f4112ce 100644
|
||||||
--- a/strawberry/types/fields/resolver.py
|
--- a/strawberry/types/fields/resolver.py
|
||||||
+++ b/strawberry/types/fields/resolver.py
|
+++ b/strawberry/types/fields/resolver.py
|
||||||
@@ -1,13 +1,12 @@
|
@@ -1,6 +1,7 @@
|
||||||
from __future__ import annotations as _
|
from __future__ import annotations as _
|
||||||
|
|
||||||
import builtins
|
import builtins
|
||||||
+from functools import cached_property
|
+from functools import cached_property
|
||||||
import inspect
|
import inspect
|
||||||
import sys
|
import sys
|
||||||
from inspect import isasyncgenfunction, iscoroutinefunction
|
import warnings
|
||||||
from typing import Callable, Dict, Generic, List, Mapping, Optional, TypeVar, Union
|
@@ -22,7 +23,6 @@ from typing import ( # type: ignore[attr-defined]
|
||||||
|
_eval_type,
|
||||||
|
)
|
||||||
|
|
||||||
-from backports.cached_property import cached_property
|
-from backports.cached_property import cached_property
|
||||||
-
|
from typing_extensions import Annotated, Protocol, get_args, get_origin
|
||||||
|
|
||||||
from strawberry.annotation import StrawberryAnnotation
|
from strawberry.annotation import StrawberryAnnotation
|
||||||
from strawberry.arguments import StrawberryArgument
|
|
||||||
from strawberry.exceptions import MissingArgumentsAnnotationsError
|
|
||||||
diff --git a/strawberry/types/info.py b/strawberry/types/info.py
|
diff --git a/strawberry/types/info.py b/strawberry/types/info.py
|
||||||
index a172c04..475a3ee 100644
|
index a172c04..475a3ee 100644
|
||||||
--- a/strawberry/types/info.py
|
--- a/strawberry/types/info.py
|
||||||
|
|
Loading…
Add table
Reference in a new issue