Skip to content

Fixed subtypes and union types generation, new enums added #1213

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

Merged
merged 2 commits into from
Jul 11, 2023

Conversation

JrooTJunior
Copy link
Member

Description

Fixed nested subtypes serialization (like InputMedia, ChatMember and others).
In due to pydantic v2 has more strictly type parsing previously generated code makes invalid schema, where subtypes without specifying union of all subtypes generates empty object

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@JrooTJunior JrooTJunior added bug Something is wrong with the framework breaking This breaks backwards-compatibility labels Jul 11, 2023
@JrooTJunior JrooTJunior added this to the 3.0 milestone Jul 11, 2023
@github-actions github-actions bot added the 3.x Issue or PR for stable 3.x version label Jul 11, 2023
@github-actions
Copy link

github-actions bot commented Jul 11, 2023

✔️ Changelog found.

Thank you for adding a description of the changes

@codecov
Copy link

codecov bot commented Jul 11, 2023

Codecov Report

Merging #1213 (88e6e67) into dev-3.x (a7b92bb) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##           dev-3.x     #1213   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          361       363    +2     
  Lines         8973      8953   -20     
=========================================
- Hits          8973      8953   -20     
Flag Coverage Δ
unittests 100.00% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
aiogram/client/bot.py 100.00% <ø> (ø)
aiogram/types/chat_member.py 100.00% <ø> (ø)
aiogram/types/message.py 100.00% <ø> (ø)
aiogram/client/context_controller.py 100.00% <100.00%> (ø)
aiogram/enums/__init__.py 100.00% <100.00%> (ø)
aiogram/enums/encrypted_passport_element.py 100.00% <100.00%> (ø)
aiogram/enums/passport_element_error_type.py 100.00% <100.00%> (ø)
aiogram/filters/chat_member_updated.py 100.00% <100.00%> (ø)
aiogram/methods/answer_web_app_query.py 100.00% <100.00%> (ø)
aiogram/methods/delete_my_commands.py 100.00% <100.00%> (ø)
... and 32 more

@JrooTJunior JrooTJunior merged commit 31c11c3 into dev-3.x Jul 11, 2023
@JrooTJunior JrooTJunior deleted the fixed-subtypes branch August 14, 2023 20:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.x Issue or PR for stable 3.x version breaking This breaks backwards-compatibility bug Something is wrong with the framework
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant