Skip to content

Commit

Permalink
Warn about 'tool.setuptool' instead of project metadata in pyproject.…
Browse files Browse the repository at this point in the history
…toml
  • Loading branch information
abravalheri committed Jun 7, 2022
1 parent c0eae60 commit c95a9e5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion pytest.ini
Expand Up @@ -59,4 +59,4 @@ filterwarnings=
ignore:Distutils was imported before setuptools
ignore:Setuptools is replacing distutils

ignore:Support for project metadata in .pyproject.toml. is still experimental
ignore:Support for configuring .* in .pyproject.toml. is still experimental
15 changes: 8 additions & 7 deletions setuptools/config/pyprojecttoml.py
Expand Up @@ -94,12 +94,13 @@ def read_configuration(
if not asdict or not (project_table or setuptools_table):
return {} # User is not using pyproject to configure setuptools

# TODO: Remove the following once the feature stabilizes:
msg = (
"Support for project metadata in `pyproject.toml` is still experimental "
"and may be removed (or change) in future releases."
)
warnings.warn(msg, _ExperimentalProjectMetadata)
if setuptools_table:
# TODO: Remove the following once the feature stabilizes:
msg = (
"Support for configuring `[tool.setuptools]` in `pyproject.toml` is still "
"experimental and may change in future releases."
)
warnings.warn(msg, _ExperimentalConfiguration)

# There is an overall sense in the community that making include_package_data=True
# the default would be an improvement.
Expand Down Expand Up @@ -413,7 +414,7 @@ def __exit__(self, exc_type, exc_value, traceback):
return super().__exit__(exc_type, exc_value, traceback)


class _ExperimentalProjectMetadata(UserWarning):
class _ExperimentalConfiguration(UserWarning):
"""Explicitly inform users that `pyproject.toml` configuration is experimental"""


Expand Down

0 comments on commit c95a9e5

Please sign in to comment.