Skip to content

Commit

Permalink
Merge pull request #7766 from madhavajay/madhava/fix_ci_cd
Browse files Browse the repository at this point in the history
Upgrade FastAPI and Starlette due to security fix
  • Loading branch information
madhavajay authored Jun 18, 2023
2 parents 9c13bd6 + 6c73525 commit cbabb21
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 37 deletions.
1 change: 0 additions & 1 deletion .github/workflows/pr-tests-stack-public.yml
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,6 @@ jobs:
with:
timeout_seconds: 1800
max_attempts: 3
retry_on: timeout
command: tox -e stack.test.integration

- name: Reboot node
Expand Down
12 changes: 12 additions & 0 deletions notebooks/api/0.8/07-domain-register-control-flow.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,18 @@
"root_client.api.endpoints"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "d871bfd5-bf77-4dee-a1af-58fbab7d57bd",
"metadata": {},
"outputs": [],
"source": [
"# race condition?\n",
"import time\n",
"time.sleep(5)"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand Down
17 changes: 8 additions & 9 deletions packages/syft/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ package_dir =
# DON'T CHANGE THE FOLLOWING LINE! IT WILL BE UPDATED BY PYSCAFFOLD!
# Add here dependencies of your project (semicolon/line-separated), e.g.
syft =
astunparse==1.6.3
bcrypt==4.0.1
forbiddenfruit==0.1.4
gevent==22.10.2
Expand All @@ -43,21 +42,21 @@ syft =
pydantic[email]==1.10.7
pymongo==4.3.3
pynacl==1.5.0
pyzmq==23.2.1
redis==4.5.4
requests==2.29.0
pyzmq==25.1.0
redis==4.5.5
requests==2.31.0
RestrictedPython==6.0
result==0.9.0
result==0.10.0
tqdm==4.65.0
typeguard==2.13.3
typing_extensions==4.5.0
typing_extensions==4.6.3
sherlock[redis,filelock]==0.4.1
uvicorn[standard]==0.21.1
fastapi==0.95.1
uvicorn[standard]==0.22.0
fastapi==0.97.0
hagrid>=0.3
matplotlib==3.7.1
dm-haiku==0.0.9
itables==1.5.2
itables==1.5.3

telemetry =
opentelemetry-api==1.14.0
Expand Down
26 changes: 1 addition & 25 deletions packages/syft/src/syft/service/code/unparse.py
Original file line number Diff line number Diff line change
@@ -1,31 +1,7 @@
# stdlib
import _ast
import ast
import sys

# third party
import astunparse # ast.unparse for python 3.8
from six.moves import cStringIO

# ast.unparse is only in >= python 3.9
# astunparse works on python 3.8 but has a bug caused by
# the ast library in python 3.8 where Constant's dont have a default .kind attribute

# this fixes the bug in ast.unparse https://github.com/IBM/lale/pull/738/files


class FixUnparser(astunparse.Unparser):
def _Constant(self, t: _ast.expr) -> None:
if not hasattr(t, "kind"):
t.kind = None

super()._Constant(t)


def unparse(tree: _ast.Module) -> str:
if sys.version_info >= (3, 9):
return ast.unparse(tree)
else:
v = cStringIO()
FixUnparser(tree, file=v)
return v.getvalue()
return ast.unparse(tree)
4 changes: 2 additions & 2 deletions packages/syft/src/syft/store/mongo_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,10 @@ class MongoStoreClientConfig(StoreClientConfig):
hostname: Optional[str] = "127.0.0.1"
port: Optional[int] = None
directConnection: bool = False
maxPoolSize: int = 100
maxPoolSize: int = 200
minPoolSize: int = 0
maxIdleTimeMS: Optional[int] = None
maxConnecting: int = 2
maxConnecting: int = 3
timeoutMS: int = 0
socketTimeoutMS: int = 0
connectTimeoutMS: int = 20000
Expand Down
8 changes: 8 additions & 0 deletions packages/syft/src/syft/util/filterwarnings.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,11 @@
".*urllib3.contrib.pyopenssl.*",
category=DeprecationWarning,
)

# UserWarning: libuv only supports millisecond timer resolution; all times less will be
# # set to 1 ms
warnings.filterwarnings(
"ignore",
".*libuv only supports millisecond timer resolution*",
category=UserWarning,
)

0 comments on commit cbabb21

Please sign in to comment.