Skip to content

msys2 / mingw tests failing with SSL certificate issue #384

@Avasam

Description

@Avasam

This is the full error from CI logs:

Obtaining file:///D:/a/distutils/distutils
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Checking if build backend supports build_editable: started
  Checking if build backend supports build_editable: finished with status 'done'
  Getting requirements to build editable: started
  Getting requirements to build editable: finished with status 'error'
  error: subprocess-exited-with-error
  
  Getting requirements to build editable did not run successfully.
  exit code: 1
  
  [88 lines of output]
  D:/a/_temp/msys64/tmp/pip-build-env-ezc5lgag/overlay/lib/python3.12/site-packages/setuptools_scm/git.py:202: UserWarning: "D:/a/distutils/distutils" is shallow and may cause errors
    warnings.warn(f'"{wd.path}" is shallow and may cause errors')
  Traceback (most recent call last):
    File "D:/a/_temp/msys64/ucrt64/lib/python3.12/urllib/request.py", line 1344, in do_open
      h.request(req.get_method(), req.selector, req.data, headers,
    File "D:/a/_temp/msys64/ucrt64/lib/python3.12/http/client.py", line 1338, in request
      self._send_request(method, url, body, headers, encode_chunked)
    File "D:/a/_temp/msys64/ucrt64/lib/python3.12/http/client.py", line 1384, in _send_request
      self.endheaders(body, encode_chunked=encode_chunked)
    File "D:/a/_temp/msys64/ucrt64/lib/python3.12/http/client.py", line 1333, in endheaders
      self._send_output(message_body, encode_chunked=encode_chunked)
    File "D:/a/_temp/msys64/ucrt64/lib/python3.12/http/client.py", line 1093, in _send_output
      self.send(msg)
    File "D:/a/_temp/msys64/ucrt64/lib/python3.12/http/client.py", line 1037, in send
      self.connect()
    File "D:/a/_temp/msys64/ucrt64/lib/python3.12/http/client.py", line 1479, in connect
      self.sock = self._context.wrap_socket(self.sock,
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "D:/a/_temp/msys64/ucrt64/lib/python3.12/ssl.py", line 455, in wrap_socket
      return self.sslsocket_class._create(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "D:/a/_temp/msys64/ucrt64/lib/python3.12/ssl.py", line 1041, in _create
      self.do_handshake()
    File "D:/a/_temp/msys64/ucrt64/lib/python3.12/ssl.py", line 1319, in do_handshake
      self._sslobj.do_handshake()
  ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1010)
  
  During handling of the above exception, another exception occurred:
  
  Traceback (most recent call last):
    File "D:/a/_temp/msys64/tmp/venv/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 389, in <module>
      main()
    File "D:/a/_temp/msys64/tmp/venv/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 373, in main
      json_out["return_val"] = hook(**hook_input["kwargs"])
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "D:/a/_temp/msys64/tmp/venv/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 157, in get_requires_for_build_editable
      return hook(config_settings)
             ^^^^^^^^^^^^^^^^^^^^^
    File "D:/a/_temp/msys64/tmp/pip-build-env-ezc5lgag/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 473, in get_requires_for_build_editable
      return self.get_requires_for_build_wheel(config_settings)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "D:/a/_temp/msys64/tmp/pip-build-env-ezc5lgag/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 331, in get_requires_for_build_wheel
      return self._get_build_requires(config_settings, requirements=[])
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "D:/a/_temp/msys64/tmp/pip-build-env-ezc5lgag/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 301, in _get_build_requires
      self.run_setup()
    File "D:/a/_temp/msys64/tmp/pip-build-env-ezc5lgag/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 317, in run_setup
      exec(code, locals())
    File "<string>", line 1, in <module>
    File "D:/a/_temp/msys64/tmp/pip-build-env-ezc5lgag/overlay/lib/python3.12/site-packages/setuptools/__init__.py", line 115, in setup
      return distutils.core.setup(**attrs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "D:/a/_temp/msys64/tmp/pip-build-env-ezc5lgag/overlay/lib/python3.12/site-packages/setuptools/_distutils/core.py", line 160, in setup
      dist.parse_config_files()
    File "D:/a/_temp/msys64/tmp/venv/lib/python3.12/site-packages/_virtualenv.py", line 22, in parse_config_files
      result = old_parse_config_files(self, *args, **kwargs)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "D:/a/_temp/msys64/tmp/pip-build-env-ezc5lgag/overlay/lib/python3.12/site-packages/setuptools/dist.py", line 756, in parse_config_files
      pyprojecttoml.apply_configuration(self, filename, ignore_option_errors)
    File "D:/a/_temp/msys64/tmp/pip-build-env-ezc5lgag/overlay/lib/python3.12/site-packages/setuptools/config/pyprojecttoml.py", line 73, in apply_configuration
      return _apply(dist, config, filepath)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "D:/a/_temp/msys64/tmp/pip-build-env-ezc5lgag/overlay/lib/python3.12/site-packages/setuptools/config/_apply_pyprojecttoml.py", line 62, in apply
      dist._finalize_license_files()
    File "D:/a/_temp/msys64/tmp/pip-build-env-ezc5lgag/overlay/lib/python3.12/site-packages/coherent/licensed/setuptools.py", line 41, in _finalize_license_files
      license.write_text(resolve(dist.metadata.license_expression))
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "D:/a/_temp/msys64/tmp/pip-build-env-ezc5lgag/overlay/lib/python3.12/site-packages/coherent/licensed/__init__.py", line 19, in resolve
      with urllib.request.urlopen(url) as response:
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "D:/a/_temp/msys64/ucrt64/lib/python3.12/urllib/request.py", line 215, in urlopen
      return opener.open(url, data, timeout)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "D:/a/_temp/msys64/ucrt64/lib/python3.12/urllib/request.py", line 515, in open
      response = self._open(req, data)
                 ^^^^^^^^^^^^^^^^^^^^^
    File "D:/a/_temp/msys64/ucrt64/lib/python3.12/urllib/request.py", line 532, in _open
      result = self._call_chain(self.handle_open, protocol, protocol +
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "D:/a/_temp/msys64/ucrt64/lib/python3.12/urllib/request.py", line 492, in _call_chain
      result = func(*args)
               ^^^^^^^^^^^
    File "D:/a/_temp/msys64/ucrt64/lib/python3.12/urllib/request.py", line 1392, in https_open
      return self.do_open(http.client.HTTPSConnection, req,
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "D:/a/_temp/msys64/ucrt64/lib/python3.12/urllib/request.py", line 1347, in do_open
      raise URLError(err)
  urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1010)>
  [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

Thankfully, these tests are isolated and don't cause other jobs to abort early, so PRs can still be validated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions