Skip to content

AVRO-3760: [python] Fix resolution of future enum with default symbol - #2250

Merged
RyanSkraba merged 3 commits into
apache:mainfrom
aiven-anton:fix/avro-3760-broken-future-enums
Aug 5, 2026
Merged

AVRO-3760: [python] Fix resolution of future enum with default symbol#2250
RyanSkraba merged 3 commits into
apache:mainfrom
aiven-anton:fix/avro-3760-broken-future-enums

Conversation

@aiven-anton

Copy link
Copy Markdown
Contributor

What is the purpose of the change

Parsing an enum should resolve to the default symbol when the symbol is not known to the reader. This raised a SchemaResolutionError. The patch adds handling of default symbols, see AVRO-3760.

Verifying this change

The change adds tests that verifies that the behavior is now in line with the spec, but retains the current behavior when there is no default symbol.

Documentation

  • Does this pull request introduce a new feature? no
  • If yes, how is the feature documented? not applicable

@aiven-anton
aiven-anton force-pushed the fix/avro-3760-broken-future-enums branch from f1d0f77 to ac077a0 Compare May 24, 2023 15:29
@aiven-anton aiven-anton changed the title AVRO-3760: Fix resolution of future enum with default symbol AVRO-3760: [python] Fix resolution of future enum with default symbol May 24, 2023
@aiven-anton
aiven-anton force-pushed the fix/avro-3760-broken-future-enums branch from ac077a0 to 6915637 Compare May 24, 2023 20:11
Comment thread lang/py/avro/io.py
Sequence,
Union,
)
from typing import IO, Generator, Iterable, List, Mapping, Optional, Sequence, Union

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The Deque import was unused.

@aiven-anton
aiven-anton force-pushed the fix/avro-3760-broken-future-enums branch from 6915637 to 8fa32e7 Compare May 26, 2023 08:09
Comment thread lang/py/avro/io.py
Comment thread lang/py/avro/schema.py Outdated
@RyanSkraba RyanSkraba added the branch-1.12 (temporary) To prioritize for 1.12.2 label Aug 4, 2026
@RyanSkraba
RyanSkraba merged commit 958846d into apache:main Aug 5, 2026
22 checks passed
RyanSkraba added a commit that referenced this pull request Aug 5, 2026
…#2250)

* AVRO-3760: [python] Fix resolution of future enum with default symbol

* Change error from review

---------

Co-authored-by: Ryan Skraba <ryan@skraba.com>
@RyanSkraba RyanSkraba removed the branch-1.12 (temporary) To prioritize for 1.12.2 label Aug 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants