Skip to content

[CI][Dev][Python] Release and merge script errors #37803

@pitrou

Description

@pitrou

Describe the bug, including details regarding any error messages, version, and platform.

The "Source Release and Merge Script" jobs have been starting to fail with Python-related errors.

See for example logs at https://github.com/apache/arrow/actions/runs/6250225828/job/16968598166#step:7:50

  /private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/d20230920-1658-v4ivhq/apache-arrow-14.0.0/python/.eggs/setuptools_scm-8.0.1-py3.8.egg/setuptools_scm/_integration/setuptools.py:31: RuntimeWarning: 
  ERROR: setuptools==56.0.0 is used in combination with setuptools_scm>=8.x
  
  Your build configuration is incomplete and previously worked by accident!
  setuptools_scm requires setuptools>=61
  
  Suggested workaround if applicable:
   - migrating from the deprecated setup_requires mechanism to pep517/518
     and using a pyproject.toml to declare build dependencies
     which are reliably pre-installed before running the build tools
  
    warnings.warn(
  ERROR setuptools_scm._integration.setuptools pyproject.toml does not contain a tool.setuptools_scm section
  Traceback (most recent call last):
    File "/private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/d20230920-1658-v4ivhq/apache-arrow-14.0.0/python/.eggs/setuptools_scm-8.0.1-py3.8.egg/setuptools_scm/_integration/pyproject_reading.py", line 53, in read_pyproject
      section = defn.get("tool", {})[tool_name]
  KeyError: 'setuptools_scm'
  
  The above exception was the direct cause of the following exception:
  
  Traceback (most recent call last):
    File "/private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/d20230920-1658-v4ivhq/apache-arrow-14.0.0/python/.eggs/setuptools_scm-8.0.1-py3.8.egg/setuptools_scm/_integration/setuptools.py", line 121, in infer_version
      config = _config.Configuration.from_file(dist_name=dist_name)
    File "/private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/d20230920-1658-v4ivhq/apache-arrow-14.0.0/python/.eggs/setuptools_scm-8.0.1-py3.8.egg/setuptools_scm/_config.py", line 128, in from_file
      pyproject_data = _read_pyproject(name, _load_toml=_load_toml)
    File "/private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/d20230920-1658-v4ivhq/apache-arrow-14.0.0/python/.eggs/setuptools_scm-8.0.1-py3.8.egg/setuptools_scm/_integration/pyproject_reading.py", line 55, in read_pyproject
      raise LookupError(f"{name} does not contain a tool.{tool_name} section") from e
  LookupError: pyproject.toml does not contain a tool.setuptools_scm section
  Traceback (most recent call last):
    File "setup.py", line 475, in <module>
      setup(
    File "/Users/runner/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/setuptools/__init__.py", line 153, in setup
      return distutils.core.setup(**attrs)
    File "/Users/runner/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/distutils/core.py", line 108, in setup
      _setup_distribution = dist = klass(attrs)
    File "/Users/runner/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/setuptools/dist.py", line 434, in __init__
      _Distribution.__init__(self, {
    File "/Users/runner/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/distutils/dist.py", line 292, in __init__
      self.finalize_options()
    File "/Users/runner/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/setuptools/dist.py", line 743, in finalize_options
      ep(self)
    File "/Users/runner/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/setuptools/dist.py", line 750, in _finalize_setup_keywords
      ep.load()(self, ep.name, value)
    File "/private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/d20230920-1658-v4ivhq/apache-arrow-14.0.0/python/.eggs/setuptools_scm-8.0.1-py3.8.egg/setuptools_scm/_integration/setuptools.py", line 102, in version_keyword
      _assign_version(dist, config)
    File "/private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/d20230920-1658-v4ivhq/apache-arrow-14.0.0/python/.eggs/setuptools_scm-8.0.1-py3.8.egg/setuptools_scm/_integration/setuptools.py", line 54, in _assign_version
      maybe_version = _get_version(config, force_write_version_files=True)
    File "/private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/d20230920-1658-v4ivhq/apache-arrow-14.0.0/python/.eggs/setuptools_scm-8.0.1-py3.8.egg/setuptools_scm/_get_version_impl.py", line 94, in _get_version
      write_version_files(config, version=version_string, scm_version=parsed_version)
    File "/private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/d20230920-1658-v4ivhq/apache-arrow-14.0.0/python/.eggs/setuptools_scm-8.0.1-py3.8.egg/setuptools_scm/_get_version_impl.py", line 63, in write_version_files
      dump_version(
    File "/private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/d20230920-1658-v4ivhq/apache-arrow-14.0.0/python/.eggs/setuptools_scm-8.0.1-py3.8.egg/setuptools_scm/_integration/dump_version.py", line 36, in dump_version
      assert not write_to.is_absolute(), f"{write_to=}"
  AssertionError: write_to=PosixPath('/private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/d20230920-1658-v4ivhq/apache-arrow-14.0.0/python/pyarrow/_generated_version.py')

Component(s)

Continuous Integration, Developer Tools, Python

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions