FrankYang0529 opened a new pull request, #17740:
URL: https://github.com/apache/kafka/pull/17740
* The `[pytest]` is deprecated in `setup.cfg`. Change it to `[tool:pytest]`.
* The `python3 setup.py develop` is deprecated. Change it to `python -m pip
install --editable .`. [0]
* The `setuptools.command.test` is deprecated. Change it to `Command`.
```
SetuptoolsDeprecationWarning: The test command is disabled and references to
it are deprecated.
!!
********************************************************************************
Please remove any references to `setuptools.command.test` in all
supported versions of the affected package.
By 2024-Nov-15, you need to update your project and remove
deprecated calls
or your builds will no longer be supported.
********************************************************************************
!!
```
* The `tests_require` option is deprecated. Move `pytest` and `mock`
packages to `install_requires`.
```
from setuptools.command.test import test as TestCommand
apache/kafka/tests/venv/lib/python3.10/site-packages/setuptools/_distutils/dist.py:261:
UserWarning: Unknown distribution option: 'tests_require'
warnings.warn(msg)
```
### Test steps to check result:
```
> cd kafka/tests
> virtualenv -p python3 venv
> . ./venv/bin/activate
> python -m pip install --editable .
> python3 setup.py test
running test
[]
==================================================================================
test session starts
==================================================================================
platform linux -- Python 3.10.13, pytest-8.3.3, pluggy-1.5.0
rootdir: /home/frankyang/Project/apache/kafka/tests
configfile: setup.cfg
testpaths: unit
plugins: typeguard-4.3.0
collected 6 items
unit/directory_layout/check_project_paths.py .....
[ 83%]
unit/version/check_version.py .
[100%]
===================================================================================
warnings summary
====================================================================================
kafkatest/version.py:44: 71 warnings
unit/directory_layout/check_project_paths.py: 1 warning
/home/frankyang/Project/apache/kafka/tests/kafkatest/version.py:44:
DeprecationWarning: distutils Version classes are deprecated. Use
packaging.version instead.
LooseVersion.__init__(self, version_string)
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
============================================================================
6 passed, 72 warnings in 0.02s
=============================================================================
```
[0]
https://packaging.python.org/en/latest/discussions/setup-py-deprecated/#is-setup-py-deprecated
### Committer Checklist (excluded from commit message)
- [ ] Verify design and implementation
- [ ] Verify test coverage and CI build status
- [ ] Verify documentation (including upgrade notes)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]