setuptools deprecation warnings
Describe the bug
As of 1.37.23, setuptools outputs a bunch of deprecation warnings.
Regression Issue
- [ ] Select this option if this issue appears to be a regression.
Expected Behavior
No warnings.
Current Behavior
/usr/lib/python3.10/site-packages/setuptools/dist.py:759: SetuptoolsDeprecationWarning: License classifiers are deprecated.
!!
********************************************************************************
Please consider removing the following classifiers in favor of a SPDX license expression:
License :: OSI Approved :: Apache Software License
See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details.
********************************************************************************
!!
self._finalize_license_expression()
Then a ton of warnings resembling:
/usr/lib/python3.10/site-packages/setuptools/command/build_py.py:212: _Warning: Package 'botocore.data' is absent from the `packages` configuration.
!!
********************************************************************************
############################
# Package would be ignored #
############################
Python recognizes 'botocore.data' as an importable package[^1],
but it is absent from setuptools' `packages` configuration.
This leads to an ambiguous overall configuration. If you want to distribute this
package, please make sure that 'botocore.data' is explicitly added
to the `packages` configuration field.
Alternatively, you can also rely on setuptools' discovery methods
(for example by using `find_namespace_packages(...)`/`find_namespace:`
instead of `find_packages(...)`/`find:`).
You can read more about "package discovery" on setuptools documentation page:
- https://setuptools.pypa.io/en/latest/userguide/package_discovery.html
If you don't want 'botocore.data' to be distributed and are
already explicitly excluding 'botocore.data' via
`find_namespace_packages(...)/find_namespace` or `find_packages(...)/find`,
you can try to use `exclude_package_data`, or `include-package-data=False` in
combination with a more fine grained `package-data` configuration.
You can read more about "package data files" on setuptools documentation page:
- https://setuptools.pypa.io/en/latest/userguide/datafiles.html
[^1]: For Python, any directory (with suitable naming) can be imported,
even if it does not contain any `.py` files.
On the other hand, currently there is no concept of package data
directory, all directories are treated like packages.
********************************************************************************
!!
check.warn(importable)
/usr/lib/python3.10/site-packages/setuptools/command/build_py.py:212: _Warning: Package 'botocore.data.accessanalyzer' is absent from the `packages` configuration.
!!
********************************************************************************
############################
# Package would be ignored #
############################
Python recognizes 'botocore.data.accessanalyzer' as an importable package[^1],
but it is absent from setuptools' `packages` configuration.
This leads to an ambiguous overall configuration. If you want to distribute this
package, please make sure that 'botocore.data.accessanalyzer' is explicitly added
to the `packages` configuration field.
Alternatively, you can also rely on setuptools' discovery methods
(for example by using `find_namespace_packages(...)`/`find_namespace:`
instead of `find_packages(...)`/`find:`).
You can read more about "package discovery" on setuptools documentation page:
- https://setuptools.pypa.io/en/latest/userguide/package_discovery.html
If you don't want 'botocore.data.accessanalyzer' to be distributed and are
already explicitly excluding 'botocore.data.accessanalyzer' via
`find_namespace_packages(...)/find_namespace` or `find_packages(...)/find`,
you can try to use `exclude_package_data`, or `include-package-data=False` in
combination with a more fine grained `package-data` configuration.
You can read more about "package data files" on setuptools documentation page:
- https://setuptools.pypa.io/en/latest/userguide/datafiles.html
[^1]: For Python, any directory (with suitable naming) can be imported,
even if it does not contain any `.py` files.
On the other hand, currently there is no concept of package data
directory, all directories are treated like packages.
********************************************************************************
!!
check.warn(importable)
and so on.
Note that these are very old now, so there's a real risk that setuptools will actually break this soon.
Reproduction Steps
python -m build -w
Possible Solution
No response
Additional Information/Context
Similar issues occur in boto3 and awscli as well, but I've decided to limit to one report for now. Please let me know if you want me to submit the problem there as well.
SDK version used
1.37.23
Environment details (OS name and version, etc.)
Gentoo Linux amd64
Hi @mgorny, thanks for reaching out. The warnings are expected as there are Python warnings that we don't have control of that we need to present to users. Please let me know if you have any other questions. Thank you.
But these warnings are not indirect but directly due to the code in your setup.py, and they indicate that this setup.py will stop working in the future. I don't see specific dates in these warnings, but upstream has been both aggressively removing deprecated features lately and making intrusive changes that accidentally broke deprecated features, which makes it somewhat important to address them timely.
The license warnings for now will be addressed. The package warnings will be looked at thoroughly if it would not impact other dependencies.
This issue is now closed. Comments on closed issues are hard for our team to see. If you need more assistance, please open a new issue that references this one.
This issue is now closed. Comments on closed issues are hard for our team to see. If you need more assistance, please open a new issue that references this one.