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

[FLINK-37192] [pyflink] Replace deprecated avro-python3 with avro #26008

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mina-asham
Copy link

@mina-asham mina-asham commented Jan 17, 2025

What is the purpose of the change

Replace deprecated avro-python3 with avro

  • avro-python3 was deprecated and replaced by avro, the first hasn't had a release since March 17, 2021 while the second has had multiple fixes and updated, latest is August 5, 2024
  • Both libraries are the exact same (i.e. avro-python3 was just renamed to avro and had multiple updates since), but the problem is that they overlap in package name, so using PyFlink with any updated library that relies on avro fails starting the pipeline even if the pipeline doesn't actually do any avro encoding/decoding
  • This updates the library to the latest one, and fixes a few imports, other than that the library's functionality is exactly the same

Brief change log

  • Replace avro-python3 (deprecated since 2021) with avro in PyFlink

Verifying this change

This change is already covered by existing tests, such as all the existing avro tests

Does this pull request potentially affect one of the following parts:

  • Dependencies (does it add or upgrade a dependency): yes
  • The public API, i.e., is any changed class annotated with @Public(Evolving): no
  • The serializers: no
  • The runtime per-record code paths (performance sensitive): no
  • Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn, ZooKeeper: no
  • The S3 file system connector: no

Documentation

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

@mina-asham mina-asham force-pushed the minaasham/upgrade-replace-avro-python3 branch from 7c11f44 to 8c67bb7 Compare January 17, 2025 14:13
@flinkbot
Copy link
Collaborator

flinkbot commented Jan 17, 2025

CI report:

Bot commands The @flinkbot bot supports the following commands:
  • @flinkbot run azure re-run the last Azure build

@dianfu
Copy link
Contributor

dianfu commented Jan 21, 2025

@mina-asham Thanks for the PR! LGTM overall. Could you create a JIRA ticket and also rebase the PR to fix the code conflict of file setup.py?

@mina-asham mina-asham force-pushed the minaasham/upgrade-replace-avro-python3 branch 2 times, most recently from 8d2543b to 84398d2 Compare January 21, 2025 09:26
@mina-asham
Copy link
Author

mina-asham commented Jan 21, 2025

@dianfu thanks for reviewing!

Could you create a JIRA ticket

I am still waiting on my JIRA account being created, is it possible to help get this approved? I applied last Thursday (16th of Jan)
Update: Account was just created, created the issue here: https://issues.apache.org/jira/browse/FLINK-37192 and update the PR

also rebase the PR to fix the code conflict of file setup.py?

✅ Done

- avro-python3 was deprecated and replaced by avro, the first hasn't had a release since March 17, 2021 while the second has had multiple fixes and updated, latest is August 5, 2024
- Both libraries are the exact same (i.e. `avro-python3` was just renamed to `avro` and had multiple updates since), but the problem is that they overlap in package name, so using PyFlink with any updated library that relies on `avro` fails starting the pipeline even if the pipeline doesn't actually do any avro encoding/decoding
- This updates the library to the latest one, and fixes a few imports, other than that the library's functionality is exactly the same
@mina-asham mina-asham force-pushed the minaasham/upgrade-replace-avro-python3 branch from 84398d2 to 6239582 Compare January 21, 2025 12:35
@mina-asham mina-asham changed the title [FLINK-TODO] [pyflink] Replace deprecated avro-python3 with avro [FLINK-37192] [pyflink] Replace deprecated avro-python3 with avro Jan 21, 2025
@mina-asham
Copy link
Author

@flinkbot run azure

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants