[FLINK-39578][python] Include py.typed in PyFlink distribution#28068
Open
florianvazelle wants to merge 1 commit intoapache:masterfrom
Open
[FLINK-39578][python] Include py.typed in PyFlink distribution#28068florianvazelle wants to merge 1 commit intoapache:masterfrom
florianvazelle wants to merge 1 commit intoapache:masterfrom
Conversation
Collaborator
dd5af04 to
0bcd779
Compare
spuru9
reviewed
Apr 30, 2026
| include LICENSE | ||
| include NOTICE | ||
| include pyflink/README.txt | ||
| include pyflink/py.typed |
Contributor
There was a problem hiding this comment.
nit: may consider adding 'py.typed' to PACKAGE_DATA['pyflink'] in setup.py (README.txt precedent)
Add `py.typed` to the `pyflink` package and update setup.py and MANIFEST.in to ensure it is included in the built wheel. This allows type checkers (e.g. mypy) to recognize PyFlink as a typed package per PEP 561.
0bcd779 to
6ff9e70
Compare
spuru9
approved these changes
Apr 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What is the purpose of the change
This pull request ensures that the
py.typedmarker file is included in the PyFlink wheel distribution.Without this file, type checkers such as
mypytreat PyFlink as an untyped package and ignore inline type annotations. Includingpy.typedmakes PyFlink compliant with PEP 561 and enables proper static type checking for users.Brief change log
py.typedto thepyflinkpackageMANIFEST.into ensurepy.typedis packaged correctlyVerifying this change
This change is a trivial packaging fix and can be verified as follows:
Build the wheel:
Verify
py.typedis included:Install the package and run
mypyon a project importingpyflinkto confirm it is no longer treated as untyped.Same for the sdist:
Build the sdit:
Verify
py.typedis included:No additional tests are required.
Does this pull request potentially affect one of the following parts:
@Public(Evolving): noDocumentation