Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dependencies #9359

Open
wants to merge 32 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
b45488e
Update .pre-commit-config.yaml
Smartappli Nov 27, 2024
2c366aa
Update .pre-commit-config.yaml
Smartappli Nov 27, 2024
09ca18a
Update zmq_queue_test.py
Smartappli Dec 1, 2024
9cb10de
Update user_test.py
Smartappli Dec 1, 2024
915bc3f
Update user_stash_test.py
Smartappli Dec 1, 2024
2863e48
Update numpy_functions_test.py
Smartappli Dec 1, 2024
dafdde1
Update mixed_policy_test.py
Smartappli Dec 1, 2024
8ccba0b
Update table.py
Smartappli Dec 1, 2024
a305fdb
Update api.py
Smartappli Dec 1, 2024
2c1cada
Update json_serde.py
Smartappli Dec 1, 2024
ebf5e8f
Update lib_service_registry.py
Smartappli Dec 1, 2024
9217f98
Update action_types.py
Smartappli Dec 1, 2024
8823b6e
Update policy.py
Smartappli Dec 1, 2024
75ad37f
Update request.py
Smartappli Dec 1, 2024
9d750a1
Update api.py
Smartappli Dec 1, 2024
39c4561
Update request.py
Smartappli Dec 1, 2024
c876d60
Update dataset.py
Smartappli Dec 1, 2024
ad939c6
Update syft_object.py
Smartappli Dec 1, 2024
822110b
Update dataset_service_test.py
Smartappli Dec 1, 2024
2a243b5
Update settings_service_test.py
Smartappli Dec 1, 2024
5871bf0
Update setup.cfg
Smartappli Dec 1, 2024
e2ff31c
Update setup.cfg
Smartappli Dec 1, 2024
01a0111
Update setup.cfg
Smartappli Dec 1, 2024
8d9ca65
Update .pre-commit-config.yaml
Smartappli Dec 1, 2024
224a842
Update setup.cfg
Smartappli Dec 1, 2024
18ed0b2
Update requirements.txt
Smartappli Dec 3, 2024
f7bb3b1
Update requirements.txt
Smartappli Dec 3, 2024
4ecb83c
Update .pre-commit-config.yaml
Smartappli Dec 12, 2024
8783fcb
Update setup.cfg
Smartappli Dec 12, 2024
b0d20ff
Update setup.cfg
Smartappli Dec 12, 2024
d69b0b1
Update requirements.txt
Smartappli Dec 12, 2024
310cb44
Update requirements.txt
Smartappli Dec 12, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
rev: v5.0.0
hooks:
- id: check-ast
always_run: true
Expand Down Expand Up @@ -80,7 +80,7 @@ repos:

- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: "v0.4.7"
rev: "v0.8.3"
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix, --show-fixes]
Expand Down
4 changes: 2 additions & 2 deletions packages/grid/enclave/attestation/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
fastapi==0.110.0
fastapi==0.115.6
loguru==0.7.2
uvicorn[standard]==0.27.1
uvicorn[standard]==0.32.1
4 changes: 2 additions & 2 deletions packages/grid/seaweedfs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
fastapi==0.110.0
fastapi==0.115.6
pyyaml==6.0.1
supervisor==4.2.5
uvicorn==0.27.1
uvicorn==0.32.1
30 changes: 15 additions & 15 deletions packages/syft/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ package_dir =

syft =
setuptools
bcrypt==4.1.2
bcrypt==4.2.1
boto3==1.34.56
forbiddenfruit==0.1.4
packaging>=23.0
Expand All @@ -39,13 +39,13 @@ syft =
pyzmq>=23.2.1,<=25.1.1
requests==2.32.3
RestrictedPython==7.0
tqdm==4.66.4
tqdm==4.67.1
typeguard==4.1.5
typing_extensions==4.12.0
typing_extensions==4.12.2
sherlock[filelock]==0.4.1
uvicorn[standard]==0.30.0
uvicorn[standard]==0.32.1
markdown==3.5.2
fastapi==0.111.0
fastapi==0.115.6
psutil==6.0.0
itables==1.7.1
argon2-cffi==23.1.0
Expand All @@ -69,8 +69,8 @@ syft =
psycopg[pool]==3.1.19
ipython<8.27.0
dynaconf==3.2.6
sqlalchemy==2.0.32
psycopg2-binary==2.9.9
sqlalchemy==2.0.36
psycopg2-binary==2.9.10

install_requires =
%(syft)s
Expand All @@ -87,23 +87,23 @@ exclude =

[options.extras_require]
data_science =
transformers==4.41.2
opendp==0.9.2
evaluate==0.4.2
transformers==4.47.0
opendp==0.11.1
evaluate==0.4.3
recordlinkage==0.16
# backend.dockerfile installs torch separately, so update the version over there as well!
torch==2.2.2

dev =
%(test_plugins)s
%(telemetry)s
bandit==1.7.8
debugpy==1.8.2
importlib-metadata==7.1.0
bandit==1.8.0
debugpy==1.8.9
importlib-metadata==8.4.0
isort==5.13.2
mypy==1.10.0
pre-commit==3.7.1
ruff==0.4.7
pre-commit==4.0.1
ruff==0.8.3
safety>=2.4.0b2
aiosmtpd==1.4.6

Expand Down
2 changes: 1 addition & 1 deletion packages/syft/src/syft/client/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -1364,7 +1364,7 @@ def validate_callable_args_and_kwargs(
_check_type(value, t)
except ValueError:
# TODO: fix this properly
if not (t == type(Any)):
if t is not type(Any):
_type_str = getattr(t, "__name__", str(t))
raise SyftException(
public_message=f"`{key}` must be of type `{_type_str}` not `{type(value).__name__}`"
Expand Down
2 changes: 1 addition & 1 deletion packages/syft/src/syft/serde/json_serde.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ def _is_serializable_mapping(annotation: Any) -> bool:
- the key type is str
- the value type is serializable and not a Union
"""
if get_origin(annotation) != dict:
if get_origin(annotation) is not dict:
return False

args = get_args(annotation)
Expand Down
2 changes: 1 addition & 1 deletion packages/syft/src/syft/serde/lib_service_registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ def flatten(self) -> list[Self]:
def isfunction(obj: Callable) -> bool:
return (
inspect.isfunction(obj)
or type(obj) == numpy.ufunc
or type(obj) is numpy.ufunc
or isinstance(obj, BuiltinFunctionType)
)

Expand Down
2 changes: 1 addition & 1 deletion packages/syft/src/syft/service/action/action_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def action_type_for_type(obj_or_type: Any) -> type:
"""
if isinstance(obj_or_type, ActionDataEmpty):
obj_or_type = obj_or_type.syft_internal_type
if type(obj_or_type) != type:
if type(obj_or_type) is not type:
obj_or_type = type(obj_or_type)

if obj_or_type not in action_types:
Expand Down
2 changes: 1 addition & 1 deletion packages/syft/src/syft/service/dataset/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ def _is_action_data_empty(obj: Any) -> bool:


def check_mock(data: Any, mock: Any) -> bool:
if type(data) == type(mock):
if type(data) is type(mock):
return True

return _is_action_data_empty(mock) or _is_action_data_empty(data)
Expand Down
2 changes: 1 addition & 1 deletion packages/syft/src/syft/service/policy/policy.py
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ def is_owned(
def is_met(
self, context: AuthedServiceContext, action_object: ActionObject
) -> bool:
return type(action_object.syft_action_data) == self.type and self.is_owned(
return type(action_object.syft_action_data) is self.type and self.is_owned(
context, action_object
)

Expand Down
2 changes: 1 addition & 1 deletion packages/syft/src/syft/service/request/request.py
Original file line number Diff line number Diff line change
Expand Up @@ -974,7 +974,7 @@ def _deposit_result_l2(
f"accept_by_depositing_result can only be run on {UserCodeStatusCollection} not "
f"{user_code_status_change.linked_obj.object_type}"
)
if not type(user_code_status_change) == UserCodeStatusChange:
if type(user_code_status_change) is not UserCodeStatusChange:
raise TypeError(
f"accept_by_depositing_result can only be run on {UserCodeStatusChange} not "
f"{type(user_code_status_change)}"
Expand Down
2 changes: 1 addition & 1 deletion packages/syft/src/syft/types/syft_object.py
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ def refresh(self) -> None:
new_object = api.services.migration._get_object(
uid=self.id, object_type=type(self)
)
if type(new_object) == type(self):
if type(new_object) is type(self):
self.__dict__.update(new_object.__dict__)
except Exception as _:
return
Expand Down
6 changes: 3 additions & 3 deletions packages/syft/src/syft/util/table.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@


def _syft_in_mro(self: Any, item: Any) -> bool:
if hasattr(type(item), "mro") and type(item) != type:
if hasattr(type(item), "mro") and type(item) is not type:
# if unbound method, supply self
if hasattr(type(item).mro, "__self__"):
mro = type(item).mro()
else:
mro = type(item).mro(type(item)) # type: ignore

elif hasattr(item, "mro") and type(item) != type:
elif hasattr(item, "mro") and type(item) is not type:
mro = item.mro()
else:
mro = str(self) # type: ignore
Expand Down Expand Up @@ -98,7 +98,7 @@ def _create_table_rows(
if id_ is not None and include_id:
cols["id"].append({"value": str(id_), "type": "clipboard"})

if type(item) == type:
if type(item) is type:
t = full_name_with_qualname(item)
else:
try:
Expand Down
2 changes: 1 addition & 1 deletion packages/syft/tests/syft/policy/mixed_policy_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def test_constant(worker) -> None:
constant = create_constant.to_policy_rule("test")

assert constant.val == 2
assert constant.klass == int
assert constant.klass is int

create_constant = CreatePolicyRuleConstant(
val=root_client.api.services.test.test_query
Expand Down
2 changes: 1 addition & 1 deletion packages/syft/tests/syft/serde/numpy_functions_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def test_numpy_functions(func, func_arguments, request):

except Exception as e:
assert (
e == AttributeError
e is AttributeError
), f"Can not evaluate {func}({func_arguments}) with {e}"
print(e)
else:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -302,10 +302,10 @@ def test_upload_dataset_with_assets_of_different_data_types(
res = root_datasite_client.upload_dataset(dataset)
assert isinstance(res, SyftSuccess)
assert len(root_datasite_client.api.services.dataset.get_all()) == 1
assert type(root_datasite_client.datasets[0].assets[0].data) == type(
assert type(root_datasite_client.datasets[0].assets[0].data) is type(
different_data_types
)
assert type(root_datasite_client.datasets[0].assets[0].mock) == type(
assert type(root_datasite_client.datasets[0].assets[0].mock) is type(
different_data_types
)

Expand Down
2 changes: 1 addition & 1 deletion packages/syft/tests/syft/settings/settings_service_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ def get_mock_client(faker, root_client, role):
password=password,
password_verify=password,
)
assert type(result) == UserView
assert type(result) is UserView

guest_client = root_client.guest()
return guest_client.login(email=email, password=password)
Expand Down
8 changes: 4 additions & 4 deletions packages/syft/tests/syft/users/user_stash_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def test_userstash_get_by_uid(
assert result.is_err()

exc = result.err()
assert type(exc) == NotFoundException
assert type(exc) is NotFoundException
assert exc.public_message


Expand All @@ -98,7 +98,7 @@ def test_userstash_get_by_email(

exc = result.err()
assert result.is_err()
assert type(exc) == NotFoundException
assert type(exc) is NotFoundException
assert "not found" in exc.public_message


Expand Down Expand Up @@ -130,7 +130,7 @@ def test_userstash_get_by_signing_key(

exc = result.err()
assert result.is_err()
assert type(exc) == NotFoundException
assert type(exc) is NotFoundException
assert exc.public_message


Expand Down Expand Up @@ -161,7 +161,7 @@ def test_userstash_get_by_verify_key(
)
searched_user = result.err()
assert result.is_err()
assert type(searched_user) == NotFoundException
assert type(searched_user) is NotFoundException
assert searched_user.public_message


Expand Down
2 changes: 1 addition & 1 deletion packages/syft/tests/syft/users/user_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ def test_guest_user_update_to_root_email_failed(

def test_user_view_set_password(worker: Worker, root_client: DatasiteClient) -> None:
change_ok = root_client.account.set_password("123", confirm=False)
assert type(change_ok) == SyftSuccess
assert type(change_ok) is SyftSuccess
assert "Successfully" in change_ok.message

email = root_client.account.email
Expand Down
2 changes: 1 addition & 1 deletion packages/syft/tests/syft/zmq_queue_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,4 +275,4 @@ def test_zmq_client_serde():

deser = syft.deserialize(bytes_data, from_bytes=True)

assert type(deser) == type(client)
assert type(deser) is type(client)
Loading