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

Revert changes to Python code generation #1442

Closed
wants to merge 1 commit into from

Conversation

svix-jplatte
Copy link
Member

Motivation

The Python library had a pretty significant breaking change. See #1440.

Solution

Revert the Python codegen changes from #1423.

@@ -1074,7 +1074,7 @@ async def create(
with_content=False,
**options.to_dict(),
)
ret.payload = MessageOutPayload.from_dict(message_in.payload.to_dict())
ret.payload = message_in.payload
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
ret.payload = message_in.payload
ret.payload = t.Cast(message_in.payload, t.Any)

Something like this?

@@ -1,5 +1,5 @@
{% set class_name = model.class_info.name %}
{% if model.required_properties == [] and model.optional_properties == [] and False %}
{% if model.required_properties == [] and model.optional_properties == [] %}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The revert looks correct, the and False looks silly and that it'll break stuff, so no wonder if broke stuff.

@svix-jplatte
Copy link
Member Author

Superseded by #1443.

@svix-jplatte svix-jplatte deleted the jplatte/revert-python-codegen branch September 18, 2024 09:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants