Skip to content

Commit a92ec30

Browse files
authored
chore(deps): upgrade dependencies (#267)
Because - the current `Ray` and `Starlette` have severe security issue which requires a upgrade. This commit - upgrade dependencies to the their latest release version.
1 parent 4bebd4c commit a92ec30

File tree

7 files changed

+357
-1167
lines changed

7 files changed

+357
-1167
lines changed

Diff for: Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ MODULES := $(wildcard $(PACKAGE)/*.py)
88
all: doctor format check test mkdocs ## Run all tasks that determine CI status
99

1010
.PHONY: dev
11-
dev: install .clean-test ## Continuously run CI tasks when files chanage
11+
dev: install .clean-test ## Continuously run CI tasks when files change
1212
poetry run sniffer
1313

1414
# SYSTEM DEPENDENCIES #########################################################
@@ -34,7 +34,7 @@ $(DEPENDENCIES): poetry.lock
3434

3535
ifndef CI
3636
poetry.lock: pyproject.toml
37-
poetry lock --no-update
37+
poetry lock
3838
@ touch $@
3939
endif
4040

Diff for: README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ Let's get started!
117117

118118
### Import packages
119119

120-
To Form a pipeine, it required a `start` operator and a `end` operator, we have helper functions to create both
120+
To Form a pipeline, it required a `start` operator and a `end` operator, we have helper functions to create both
121121

122122
```python
123123
from instill.clients import InstillClient

Diff for: docs/requirements.txt

-3
Original file line numberDiff line numberDiff line change
@@ -1,3 +0,0 @@
1-
mkdocs==1.3.1 ; python_full_version > "3.9.1" and python_version < "3.12"
2-
pygments==2.18.0 ; python_full_version > "3.9.1" and python_version < "3.12"
3-
jinja2==3.1.6 ; python_full_version > "3.9.1" and python_version < "3.12"

Diff for: instill/helpers/ray_config.py

+2-4
Original file line numberDiff line numberDiff line change
@@ -200,10 +200,9 @@ def _update_target_ongoing_requests(self, target_ongoing_requests: int):
200200
autoscaling_config=self._autoscaling_config
201201
)
202202

203-
def _update_max_concurrent_requests(self, max_concurrent_requests: int):
203+
def _update_max_concurrent_requests(self, max_ongoing_requests: int):
204204
self._deployment = self._deployment.options(
205-
max_concurrent_queries=max_concurrent_requests,
206-
max_ongoing_requests=max_concurrent_requests,
205+
max_ongoing_requests=max_ongoing_requests,
207206
)
208207

209208
def _update_upscale_delay(self, upscale_delay_s: int):
@@ -230,6 +229,5 @@ def instill_deployment(
230229
ray_actor_options=DEFAULT_RAY_ACTOR_OPTIONS,
231230
autoscaling_config=DEFAULT_AUTOSCALING_CONFIG,
232231
max_ongoing_requests=DEFAULT_MAX_ONGOING_REQUESTS,
233-
max_concurrent_queries=DEFAULT_MAX_ONGOING_REQUESTS,
234232
max_queued_requests=DEFAULT_MAX_QUEUED_REQUESTS,
235233
)

Diff for: poetry.lock

+282-1,091
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: pyproject.toml

+66-62
Original file line numberDiff line numberDiff line change
@@ -1,99 +1,59 @@
11
[tool.poetry]
22

3+
description = "python sdk for Instill AI products"
34
name = "instill-sdk"
45
version = "0.16.2"
5-
description = "python sdk for Instill AI products"
66

7-
packages = [{ include = "instill" }]
7+
packages = [{include = "instill"}]
88

9-
license = "MIT"
109
authors = ["instill-ai <[email protected]>"]
10+
license = "MIT"
1111

12-
readme = "README.md"
13-
homepage = "https://pypi.org/project/instill-sdk"
1412
documentation = "https://instill-sdk.readthedocs.io"
13+
homepage = "https://pypi.org/project/instill-sdk"
14+
readme = "README.md"
1515
repository = "https://github.com/instill-ai/python-sdk"
1616

1717
maintainers = ["Heiru Wu <[email protected]>"]
1818

19-
keywords = []
2019
classifiers = [
2120
"Development Status :: 1 - Planning",
2221
"Natural Language :: English",
2322
"Operating System :: OS Independent",
2423
"Programming Language :: Python :: 3",
2524
"Programming Language :: Python :: 3.8",
2625
]
26+
keywords = []
2727

2828
[tool.poetry.dependencies]
2929

30-
python = ">3.9.1,<3.12"
30+
fastapi = "^0.115.12"
31+
google-api-core = "^2.11.1"
32+
googleapis-common-protos = "^1.60.0"
3133
grpcio = "^1.59.0"
32-
pyyaml = "^6.0.1"
34+
jsonschema = "^4.20.0"
3335
numpy = "^1.21.0"
36+
pillow = "^10.1.0"
3437
protobuf = "^4.24.2"
35-
requests = "^2.32.3"
36-
fastapi = "^0.109.2"
37-
google-api-core = "^2.11.1"
38-
googleapis-common-protos = "^1.60.0"
3938
protoc-gen-openapiv2 = "^0.0.1"
4039
pydantic = ">=1.10.13"
41-
pillow = "^10.1.0"
42-
ray = { version = "2.21.0", extras = ["serve"] }
43-
jsonschema = "^4.20.0"
44-
types-requests = "^2.32.0.20240712"
40+
python = ">3.9.1,<3.12"
41+
pyyaml = "^6.0.1"
42+
ray = "^2.44.1"
43+
requests = "^2.32.3"
44+
starlette = "^0.46.1"
4545
types-protobuf = "^4.24.0.1"
4646
types-pyyaml = "^6.0.12.11"
47-
48-
[tool.poetry.dev-dependencies]
49-
50-
# Formatters
51-
black = "^24.3"
52-
tomli = "*" # missing 'black' dependency
53-
isort = "^5.10"
54-
55-
# Linters
56-
mypy = "^1.0"
57-
pydocstyle = "^6.1"
58-
pylint = "~2.15"
59-
wrapt = "*" # missing 'pylint' dependency
60-
61-
# Testing
62-
pytest = "^7.3"
63-
pytest-describe = "^2.0"
64-
pytest-expecter = "^3.0"
65-
pytest-random = "*"
66-
pytest-cov = "^4.1"
67-
freezegun = "*"
68-
69-
# Reports
70-
coveragespace = "^6.0"
71-
72-
# Documentation
73-
mkdocs = "~1.3"
74-
pygments = "^2.11.1"
75-
76-
# Tooling
77-
pyinstaller = "5.13.1"
78-
sniffer = "*"
79-
MacFSEvents = { version = "*", platform = "darwin" }
80-
pync = { version = "*", platform = "darwin" }
81-
ipython = "^8.10.0"
82-
ipykernel = "^6.28.0"
83-
mypy-protobuf = "^3.5.0"
84-
grpcio-tools = "^1.54.2"
85-
datamodel-code-generator = "^0.25.2"
86-
jsonref = "^1.1.0"
87-
88-
# Publish
89-
twine = "^4.0.2"
47+
types-requests = "^2.32.0.20240712"
48+
virtualenv = "^20.30.0"
49+
pkginfo = "^1.12.1.2"
50+
uvicorn = "^0.34.0"
9051

9152
[tool.poetry.scripts]
9253
instill = "instill.helpers.cli:cli"
9354

9455
[tool.black]
9556

96-
quiet = true
9757
exclude = '''
9858
(
9959
/(
@@ -115,17 +75,18 @@ exclude = '''
11575
# the root of the project
11676
)
11777
'''
78+
quiet = true
11879

11980
[tool.isort]
12081

12182
profile = "black"
12283
skip_glob = ["**/protogen/*", "**/protobufs/*"]
12384

12485
[tool.mypy]
86+
check_untyped_defs = true
12587
exclude = ['instill/resources/schema']
12688
ignore_missing_imports = true
12789
no_implicit_optional = true
128-
check_untyped_defs = true
12990

13091
cache_dir = ".cache/mypy/"
13192

@@ -150,5 +111,48 @@ markers = []
150111

151112
[build-system]
152113

153-
requires = ["poetry-core>=1.0.0"]
154114
build-backend = "poetry.core.masonry.api"
115+
requires = ["poetry-core>=1.0.0"]
116+
117+
[tool.poetry.group.dev.dependencies]
118+
119+
# Formatters
120+
black = "^24.3"
121+
isort = "^5.10"
122+
tomli = "*" # missing 'black' dependency
123+
124+
# Linters
125+
mypy = "^1.0"
126+
pydocstyle = "^6.1"
127+
pylint = "~2.15"
128+
wrapt = "*" # missing 'pylint' dependency
129+
130+
# Testing
131+
freezegun = "*"
132+
pytest = "^7.3"
133+
pytest-cov = "^4.1"
134+
pytest-describe = "^2.0"
135+
pytest-expecter = "^3.0"
136+
pytest-random = "*"
137+
138+
# Reports
139+
coveragespace = "^6.0"
140+
141+
# Documentation
142+
mkdocs = "~1.3"
143+
pygments = "^2.11.1"
144+
145+
# Tooling
146+
MacFSEvents = {version = "*", platform = "darwin"}
147+
datamodel-code-generator = "^0.25.2"
148+
grpcio-tools = "^1.54.2"
149+
ipykernel = "^6.28.0"
150+
ipython = "^8.10.0"
151+
jsonref = "^1.1.0"
152+
mypy-protobuf = "^3.5.0"
153+
pyinstaller = "5.13.1"
154+
pync = {version = "*", platform = "darwin"}
155+
sniffer = "*"
156+
157+
# Publish
158+
twine = "^4.0.2"

Diff for: scent.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
class Options:
1919
group = int(time.time()) # unique per run
2020
show_coverage = False
21-
rerun_args = None
21+
rerun_args = (None, None, None)
2222

2323
targets = [
2424
(("make", "test-unit", "DISABLE_COVERAGE=true"), "Unit Tests", True),
@@ -65,15 +65,15 @@ def run_targets(*args):
6565

6666
def call(command, title, retry):
6767
"""Run a command-line program and display the result."""
68-
if Options.rerun_args:
68+
if Options.rerun_args[0] is not None:
6969
command, title, retry = Options.rerun_args
70-
Options.rerun_args = None
70+
Options.rerun_args = (None, None, None)
7171
success = call(command, title, retry)
7272
if not success:
7373
return False
7474

7575
print("")
76-
print("$ %s" % " ".join(command))
76+
print(f"$ {' '.join(command)}")
7777
failure = subprocess.call(command)
7878

7979
if failure and retry:

0 commit comments

Comments
 (0)