Skip to content

Commit c3b1876

Browse files
committed
Minor fixes
1 parent 630f722 commit c3b1876

File tree

4 files changed

+24
-12
lines changed

4 files changed

+24
-12
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,11 @@ jobs:
5252
uses: deadsnakes/[email protected]
5353
with:
5454
python-version: ${{ matrix.python }}
55+
- uses: arduino/setup-protoc@v3
56+
with:
57+
# TODO(cretz): Can upgrade proto when https://github.com/arduino/setup-protoc/issues/99 fixed
58+
version: "23.x"
59+
repo-token: ${{ secrets.GITHUB_TOKEN }}
5560
# Using fixed Poetry version until
5661
# https://github.com/python-poetry/poetry/issues/7611 and
5762
# https://github.com/python-poetry/poetry/pull/7694 are fixed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1329,6 +1329,7 @@ To build the SDK from source for use as a dependency, the following prerequisite
13291329
* [Python](https://www.python.org/) >= 3.8
13301330
* Make sure the latest version of `pip` is in use
13311331
* [Rust](https://www.rust-lang.org/)
1332+
* [Protobuf Compiler](https://protobuf.dev/)
13321333
* [poetry](https://github.com/python-poetry/poetry) (e.g. `python -m pip install poetry`)
13331334
* [poe](https://github.com/nat-n/poethepoet) (e.g. `python -m pip install poethepoet`)
13341335

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ environment = { PATH = "$PATH:$HOME/.cargo/bin", CARGO_NET_GIT_FETCH_WITH_CLI =
123123
[tool.isort]
124124
profile = "black"
125125
skip_gitignore = true
126+
extend_skip = ["./temporalio/bridge/sdk-core", "./temporalio/bridge/target"]
126127

127128
[tool.mypy]
128129
ignore_missing_imports = true

tests/test_converter.py

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -261,10 +261,13 @@ class MyTypedDictNotTotal(TypedDict, total=False):
261261
bar: MyDataClass
262262

263263

264-
class MyPydanticClass(pydantic.BaseModel):
265-
foo: str
266-
bar: List[MyPydanticClass]
267-
baz: Optional[UUID] = None
264+
# TODO(cretz): Fix when https://github.com/pydantic/pydantic/pull/9612 tagged
265+
if sys.version_info <= (3, 12, 3):
266+
267+
class MyPydanticClass(pydantic.BaseModel):
268+
foo: str
269+
bar: List[MyPydanticClass]
270+
baz: Optional[UUID] = None
268271

269272

270273
def test_json_type_hints():
@@ -401,14 +404,16 @@ def fail(hint: Any, value: Any) -> None:
401404
ok(tuple[int, str], (1, "2"))
402405

403406
# Pydantic
404-
ok(
405-
MyPydanticClass,
406-
MyPydanticClass(
407-
foo="foo", bar=[MyPydanticClass(foo="baz", bar=[])], baz=uuid4()
408-
),
409-
)
410-
ok(List[MyPydanticClass], [MyPydanticClass(foo="foo", bar=[])])
411-
fail(List[MyPydanticClass], [MyPydanticClass(foo="foo", bar=[]), 5])
407+
# TODO(cretz): Fix when https://github.com/pydantic/pydantic/pull/9612 tagged
408+
if sys.version_info <= (3, 12, 3):
409+
ok(
410+
MyPydanticClass,
411+
MyPydanticClass(
412+
foo="foo", bar=[MyPydanticClass(foo="baz", bar=[])], baz=uuid4()
413+
),
414+
)
415+
ok(List[MyPydanticClass], [MyPydanticClass(foo="foo", bar=[])])
416+
fail(List[MyPydanticClass], [MyPydanticClass(foo="foo", bar=[]), 5])
412417

413418

414419
# This is an example of appending the stack to every Temporal failure error

0 commit comments

Comments
 (0)