Skip to content

Commit

Permalink
Remove proto wheel and other minor fixes (#547)
Browse files Browse the repository at this point in the history
  • Loading branch information
cretz authored Jun 10, 2024
1 parent 58d6951 commit 927415a
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 30 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@ jobs:
uses: deadsnakes/action@v3.1.0
with:
python-version: ${{ matrix.python }}
- uses: arduino/setup-protoc@v3
with:
# TODO(cretz): Can upgrade proto when https://github.com/arduino/setup-protoc/issues/99 fixed
version: "23.x"
repo-token: ${{ secrets.GITHUB_TOKEN }}
# Using fixed Poetry version until
# https://github.com/python-poetry/poetry/issues/7611 and
# https://github.com/python-poetry/poetry/pull/7694 are fixed
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1329,6 +1329,7 @@ To build the SDK from source for use as a dependency, the following prerequisite
* [Python](https://www.python.org/) >= 3.8
* Make sure the latest version of `pip` is in use
* [Rust](https://www.rust-lang.org/)
* [Protobuf Compiler](https://protobuf.dev/)
* [poetry](https://github.com/python-poetry/poetry) (e.g. `python -m pip install poetry`)
* [poe](https://github.com/nat-n/poethepoet) (e.g. `python -m pip install poethepoet`)

Expand Down
18 changes: 1 addition & 17 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ grpcio-tools = "^1.48.0"
isort = "^5.11.5"
mypy = "^1.0.0"
mypy-protobuf = "^3.3.0"
protoc-wheel-0 = "^21.1"
psutil = "^5.9.3"
pydantic = "^1.9.1"
pydocstyle = "^6.1.1"
Expand Down Expand Up @@ -124,6 +123,7 @@ environment = { PATH = "$PATH:$HOME/.cargo/bin", CARGO_NET_GIT_FETCH_WITH_CLI =
[tool.isort]
profile = "black"
skip_gitignore = true
extend_skip = ["./temporalio/bridge/sdk-core", "./temporalio/bridge/target"]

[tool.mypy]
ignore_missing_imports = true
Expand Down
29 changes: 17 additions & 12 deletions tests/test_converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,10 +261,13 @@ class MyTypedDictNotTotal(TypedDict, total=False):
bar: MyDataClass


class MyPydanticClass(pydantic.BaseModel):
foo: str
bar: List[MyPydanticClass]
baz: Optional[UUID] = None
# TODO(cretz): Fix when https://github.com/pydantic/pydantic/pull/9612 tagged
if sys.version_info <= (3, 12, 3):

class MyPydanticClass(pydantic.BaseModel):
foo: str
bar: List[MyPydanticClass]
baz: Optional[UUID] = None


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

# Pydantic
ok(
MyPydanticClass,
MyPydanticClass(
foo="foo", bar=[MyPydanticClass(foo="baz", bar=[])], baz=uuid4()
),
)
ok(List[MyPydanticClass], [MyPydanticClass(foo="foo", bar=[])])
fail(List[MyPydanticClass], [MyPydanticClass(foo="foo", bar=[]), 5])
# TODO(cretz): Fix when https://github.com/pydantic/pydantic/pull/9612 tagged
if sys.version_info <= (3, 12, 3):
ok(
MyPydanticClass,
MyPydanticClass(
foo="foo", bar=[MyPydanticClass(foo="baz", bar=[])], baz=uuid4()
),
)
ok(List[MyPydanticClass], [MyPydanticClass(foo="foo", bar=[])])
fail(List[MyPydanticClass], [MyPydanticClass(foo="foo", bar=[]), 5])


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

0 comments on commit 927415a

Please sign in to comment.