Skip to content
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

[self-tests] few tests fail against setuptools 68.0.0 #866

Closed
stanislavlevin opened this issue Jun 22, 2023 · 0 comments · Fixed by #867
Closed

[self-tests] few tests fail against setuptools 68.0.0 #866

stanislavlevin opened this issue Jun 22, 2023 · 0 comments · Fixed by #867

Comments

@stanislavlevin
Copy link
Contributor

setuptools_scm tests suite fails againt setuptools 68.0.0 with:

FAILED testing/test_integration.py::test_pyproject_support_with_git[pyproject.project]
FAILED testing/test_integration.py::test_pretend_version_named_pyproject_integration[pyproject.project]
    Traceback (most recent call last):
      File "/usr/src/tmp/pytest-of-builder/pytest-0/test_pyproject_support_with_gi3/wd/setup.py", line 1, in <module>
        __import__('setuptools').setup()
      File "/usr/lib64/python3/site-packages/setuptools/__init__.py", line 107, in setup
        return distutils.core.setup(**attrs)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/usr/lib64/python3/site-packages/setuptools/_distutils/core.py", line 159, in setup
        dist.parse_config_files()
      File "/usr/lib64/python3/site-packages/setuptools/dist.py", line 899, in parse_config_files
        pyprojecttoml.apply_configuration(self, filename, ignore_option_errors)
      File "/usr/lib64/python3/site-packages/setuptools/config/pyprojecttoml.py", line 66, in apply_configuration
        config = read_configuration(filepath, True, ignore_option_errors, dist)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/usr/lib64/python3/site-packages/setuptools/config/pyprojecttoml.py", line 128, in read_configuration
        validate(subset, filepath)
      File "/usr/lib64/python3/site-packages/setuptools/config/pyprojecttoml.py", line 55, in validate
        raise ValueError(f"{error}\n{summary}") from None
    ValueError: invalid pyproject.toml config: `project`.
    configuration error: `project` must contain ['version'] properties

setuptools 68.0.0 introduced many breaking changes https://setuptools.pypa.io/en/stable/history.html#v68-0-0

one of them:

pypa/setuptools#3948: Removed support for invalid pyproject.toml files. During the implementation of PEP 621, it was identified that some users were producing invalid files. As a transitional measure, the validation was relaxed for a few use cases. The grace period, however, came to an end.

pyproject.toml used in the test:

[project]
name='setuptools_scm_example'
[tool.setuptools_scm]

while according to today's specification https://packaging.python.org/en/latest/specifications/declaring-project-metadata/#specification

The only keys required to be statically defined are:

  • name

The keys which are required but may be specified either statically or listed as dynamic are:

  • version
stanislavlevin added a commit to stanislavlevin/setuptools_scm that referenced this issue Jun 22, 2023
According to today's specification
https://packaging.python.org/en/latest/specifications/declaring-project-metadata/#specification

> The only keys required to be statically defined are:
  -  name
  The keys which are required but may be specified either
  statically or listed as dynamic are:
  - version

Fixes: pypa#866
Signed-off-by: Stanislav Levin <slev@altlinux.org>
RonnyPfannschmidt pushed a commit that referenced this issue Jun 22, 2023
According to today's specification
https://packaging.python.org/en/latest/specifications/declaring-project-metadata/#specification

> The only keys required to be statically defined are:
  -  name
  The keys which are required but may be specified either
  statically or listed as dynamic are:
  - version

Fixes: #866

Signed-off-by: Stanislav Levin <slev@altlinux.org>
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 a pull request may close this issue.

1 participant