Skip to content

[FLINK-37775][python] Manage python development/test dependencies in pyproject.yaml #26642

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

autophagy
Copy link
Contributor

What is the purpose of the change

Currently, development and testing dependencies for pyflink are scattered in a couple of locations. The dev dependencies are in dev/dev-requirements.txt, and the testing dependencies are scattered around the dev/lint-python.sh script. PEP 735 introduced support for dependency groups in pyproject.toml which, unlike [optional-dependencies] which are included in the distribution of the package, dependency groups are useful for defining named groups of dependencies for internal project use. Currently the latest versions of pip, uv, etc support this with pip install --group <group-name>.

This PR moves these dependencies into pyproject.toml and updates the docs, scripts, tests etc to use them.

Note: I'm unsure if moving the dev dependencies into here is the right thing to do, since people are still very used to pip install -r requirements.txt. I'd be open to keeping them in the requirements.txt file - but I do think keeping the testing dependencies in pyproject.toml instead of hardcoded in the lint-python.sh script is nicer.

Brief change log

  • *Moved PyFlink's development and testing dependencies into pyproject.toml.

Verifying this change

This change is already covered by existing tests, such as the PyFlink integration and e2e tests.

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

  • Dependencies (does it add or upgrade a dependency): (no)
  • 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)

@flinkbot
Copy link
Collaborator

flinkbot commented Jun 5, 2025

CI report:

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

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