Compare commits
130 Commits
Author | SHA1 | Date |
---|---|---|
![]() |
fbde801039 | |
![]() |
266824b42b | |
![]() |
191fe9f8cc | |
![]() |
fe70a2f6c1 | |
![]() |
32da6dc3a8 | |
![]() |
76e6d6e364 | |
![]() |
e4eb9712c7 | |
![]() |
3ef98423d0 | |
![]() |
87bb582ce8 | |
![]() |
be3f2050ef | |
![]() |
cf129ff7c5 | |
![]() |
38823311dd | |
![]() |
147e0767dc | |
![]() |
0a9460784d | |
![]() |
6fbced15e6 | |
![]() |
53937812a4 | |
![]() |
1a216a0b1f | |
![]() |
31c30f7ae1 | |
![]() |
4124e24cae | |
![]() |
fc5ad2152e | |
![]() |
fd1a33dbcc | |
![]() |
065350c5f0 | |
![]() |
3138d44308 | |
![]() |
49242b5a83 | |
![]() |
5fb0a1e0e6 | |
![]() |
e56e1994cd | |
![]() |
d9e797d274 | |
![]() |
c05124866d | |
![]() |
02ade5b29d | |
![]() |
f2638dcce1 | |
![]() |
2b461ebc9e | |
![]() |
f8da2059e1 | |
![]() |
9f22b308ee | |
![]() |
000fc0f057 | |
![]() |
2415382acd | |
![]() |
767501b854 | |
![]() |
0301d04de6 | |
![]() |
8b7e91dcfd | |
![]() |
4f74abf105 | |
![]() |
f991c626f8 | |
![]() |
47384698a0 | |
![]() |
0970931614 | |
![]() |
bb7641fdf4 | |
![]() |
36e1855b9c | |
![]() |
cb033ca27c | |
![]() |
6e1d75fc5c | |
![]() |
0e038f0a22 | |
![]() |
7c8ede8425 | |
![]() |
402ca26c0d | |
![]() |
e58ec2081f | |
![]() |
18033d0665 | |
![]() |
f818c88461 | |
![]() |
11adf9e612 | |
![]() |
1d8d66fb9e | |
![]() |
3f04e8aae6 | |
![]() |
1fc90c36ef | |
![]() |
2abf4b360f | |
![]() |
1a38af595e | |
![]() |
8b1d08f3aa | |
![]() |
0a2fa826db | |
![]() |
766117da01 | |
![]() |
e1fad3cc74 | |
![]() |
c526c197c3 | |
![]() |
9f7bc2a89f | |
![]() |
932febd3dc | |
![]() |
e4651e28e7 | |
![]() |
654d17f7d6 | |
![]() |
117a99ff4d | |
![]() |
24b20043a1 | |
![]() |
1a3b6c8782 | |
![]() |
b900c7d1c0 | |
|
0a1fe41eda | |
|
f66a038a4f | |
|
24ca661cb0 | |
|
1f9ffc7cc8 | |
|
d7627c26cc | |
|
0e5ee12011 | |
|
42b6c576d7 | |
|
8998b9af78 | |
|
3b51e2d4ee | |
|
df1d3a3086 | |
|
a9e53a9270 | |
![]() |
548f31511e | |
![]() |
e67d3d831d | |
![]() |
7fb8f34ec9 | |
|
5473f2e633 | |
|
216966a8da | |
|
356698caf5 | |
|
014ab10fd0 | |
|
fbc3dbac17 | |
|
e37726e311 | |
|
b675f484f8 | |
|
36fcb57c9e | |
|
fd676eccce | |
|
2951c66aad | |
|
a8e32f1cfc | |
|
1512e5b4ea | |
|
1fb5ea5520 | |
|
8683b8f500 | |
|
9cb3c5dce5 | |
|
8ddf6710bf | |
|
60f04266fd | |
|
edf86fd05b | |
|
c37dfc8ab5 | |
|
423ff97688 | |
|
b8b1b9ebe3 | |
|
d0a4f8f30f | |
|
d49ca7c42e | |
|
7d36295dce | |
|
762719f1f1 | |
|
c4e439d45e | |
|
ddf07797fd | |
|
b792f7f02e | |
|
4ac14b3bef | |
|
621cd5610a | |
|
c828c99a2c | |
|
023270f94f | |
|
cf701f1668 | |
|
d7c0b43c0e | |
|
74a057efd6 | |
|
32be5a4d13 | |
|
2461867cb9 | |
|
438fe51d3c | |
|
d6f22a039f | |
|
3dc0ece017 | |
|
935a862001 | |
|
6bfde54dce | |
|
e07b0c1707 | |
|
cd14e50d0f | |
|
45499a501e |
38
default.nix
38
default.nix
|
@ -1,7 +1,41 @@
|
|||
let
|
||||
pkgs = import <nixpkgs> {};
|
||||
pkgs = import <nixpkgs> { };
|
||||
in
|
||||
|
||||
self: super: rec {
|
||||
selfprivacy-api = super.callPackage ./pkgs/selfprivacy-api {};
|
||||
python39 = super.python39.override {
|
||||
packageOverrides = python-self: python-super: {
|
||||
strawberry_graphql = python-super.buildPythonPackage rec {
|
||||
pname = "strawberry-graphql";
|
||||
version = "0.123.0";
|
||||
format = "pyproject";
|
||||
patches = [
|
||||
./strawberry-graphql.patch
|
||||
];
|
||||
propagatedBuildInputs = with self.python39Packages; [
|
||||
typing-extensions
|
||||
graphql-core
|
||||
python-multipart
|
||||
python-dateutil
|
||||
flask
|
||||
pydantic
|
||||
pygments
|
||||
poetry
|
||||
];
|
||||
src = python-super.fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "sha256-KsmZ5Xv8tUg6yBxieAEtvoKoRG60VS+iVGV0X6oCExo=";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
pythonPackages = python39.pkgs;
|
||||
selfprivacy-api = super.callPackage ./pkgs/selfprivacy-api {
|
||||
nixpkgs = pkgs;
|
||||
pythonPkgs = pythonPackages;
|
||||
};
|
||||
selfprivacy-graphql-api = super.callPackage ./pkgs/selfprivacy-graphql-api {
|
||||
nixpkgs = pkgs;
|
||||
pythonPkgs = pythonPackages;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -6,8 +6,10 @@ let
|
|||
|
||||
selfprivacy-api =
|
||||
{ buildPythonPackage
|
||||
, fetchPypi
|
||||
, flask
|
||||
, flask-restful
|
||||
, flask-cors
|
||||
, setuptools
|
||||
, portalocker
|
||||
, flask-swagger
|
||||
|
@ -19,17 +21,22 @@ let
|
|||
, huey
|
||||
, gevent
|
||||
, mnemonic
|
||||
, pydantic
|
||||
, strawberry_graphql
|
||||
, psutil
|
||||
}:
|
||||
buildPythonPackage rec {
|
||||
pythonPkgs.buildPythonPackage rec {
|
||||
pname = "selfprivacy-api";
|
||||
version = "1.2.6";
|
||||
src = builtins.fetchGit {
|
||||
url = "https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api.git";
|
||||
rev = "401dff23fb9223e8a0a4bd3ee942c61e471a07ab";
|
||||
rev = "9132b70e709b19ddc393859ce23f8a5c342fa4e8";
|
||||
ref = "test-branch";
|
||||
};
|
||||
propagatedBuildInputs = [
|
||||
flask
|
||||
flask-restful
|
||||
flask-cors
|
||||
setuptools
|
||||
portalocker
|
||||
flask-swagger
|
||||
|
@ -41,6 +48,9 @@ let
|
|||
huey
|
||||
gevent
|
||||
mnemonic
|
||||
pydantic
|
||||
strawberry_graphql
|
||||
psutil
|
||||
];
|
||||
meta = {
|
||||
description = ''
|
||||
|
|
|
@ -0,0 +1,62 @@
|
|||
{ nixpkgs ? import <nixpkgs> { }, pythonPkgs ? nixpkgs.pkgs.python39Packages }:
|
||||
|
||||
let
|
||||
inherit (nixpkgs) pkgs;
|
||||
inherit pythonPkgs;
|
||||
|
||||
selfprivacy-graphql-api =
|
||||
{ buildPythonPackage
|
||||
, fetchPypi
|
||||
, setuptools
|
||||
, portalocker
|
||||
, pytz
|
||||
, pytest
|
||||
, pytest-mock
|
||||
, pytest-datadir
|
||||
, huey
|
||||
, gevent
|
||||
, mnemonic
|
||||
, pydantic
|
||||
, typing-extensions
|
||||
, strawberry_graphql
|
||||
, psutil
|
||||
, fastapi
|
||||
, uvicorn
|
||||
}:
|
||||
pythonPkgs.buildPythonApplication rec {
|
||||
pname = "selfprivacy-graphql-api";
|
||||
version = "2.0.0";
|
||||
src = builtins.fetchGit {
|
||||
url = "https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api.git";
|
||||
rev = "15a900d009720eea660d2c41f4122722661d1903";
|
||||
ref = "fastapi";
|
||||
};
|
||||
propagatedBuildInputs = [
|
||||
setuptools
|
||||
portalocker
|
||||
pytz
|
||||
pytest
|
||||
pytest-mock
|
||||
pytest-datadir
|
||||
huey
|
||||
gevent
|
||||
mnemonic
|
||||
pydantic
|
||||
typing-extensions
|
||||
strawberry_graphql
|
||||
psutil
|
||||
fastapi
|
||||
uvicorn
|
||||
];
|
||||
meta = {
|
||||
description = ''
|
||||
SelfPrivacy Server Management API
|
||||
'';
|
||||
};
|
||||
passthru = {
|
||||
pythonPath = pythonPkgs.makePythonPath propagatedBuildInputs;
|
||||
};
|
||||
};
|
||||
drv = pythonPkgs.callPackage selfprivacy-graphql-api { };
|
||||
in
|
||||
drv
|
|
@ -0,0 +1,96 @@
|
|||
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 New Issue