Skip to content

chore: modernize Python test config and setup - #3491

Open
RyukR1 wants to merge 1 commit into
AutoMQ:mainfrom
RyukR1:fix/modernize-python-test-setup
Open

chore: modernize Python test config and setup#3491
RyukR1 wants to merge 1 commit into
AutoMQ:mainfrom
RyukR1:fix/modernize-python-test-setup

Conversation

@RyukR1

@RyukR1 RyukR1 commented Aug 4, 2026

Copy link
Copy Markdown

Description

This PR resolves configuration issues and runtime errors encountered when executing Python-based integration/unit tests on newer Python (3.12/3.13) and Setuptools (>= 72) environments.

Changes

  1. Migrate pytest Config: Renamed the deprecated [pytest] section header to [tool:pytest] in both tests/setup.cfg and tests/unit/setup.cfg to align with modern pytest standards.
  2. Ignore Legacy Warnings: Added filterwarnings = ignore::DeprecationWarning to ignore distutils.version.LooseVersion deprecation warnings caused by non-PEP440 versions (e.g., 3.9.0-SNAPSHOT).
  3. Remove Deprecated Test Command: Cleaned up the custom PyTest wrapper class in tests/setup.py that inherited from the deprecated/removed setuptools.command.test class (avoiding runtime RuntimeError on Setuptools 72+).
  4. Update Documentation: Updated the tests/README.md to guide developers to run pytest directly and corrected folder reference paths (kafka/tests/ -> tests/).

Verification

  • Checked unit tests locally: pytest executed inside the tests/ directory with 6/6 tests passing successfully.
  • Ran project checkstyle/formatting/licensing checks: ./gradlew rat checkstyleMain checkstyleTest spotlessJavaCheck completed successfully.

@CLAassistant

CLAassistant commented Aug 4, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

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