Skip to content

Fix unit tests under Windows #592

@gmaze

Description

@gmaze

To prepare for the next release, we need to fix unit tests under Windows.

These tests have been isolated to: https://github.com/euroargodev/argopy/actions/workflows/pytests-windows.yml

There's been systematic failure at the Argopy installation step with:
python -m pip install --no-deps --verbose -e .

Here is the error:

Error stack
Using pip 25.1.1 from C:\Users\runneradmin\micromamba\envs\argopy-tests\Lib\site-packages\pip (python 3.11)
Obtaining file:///D:/a/argopy/argopy
  Installing build dependencies: started
  Running command pip subprocess to install build dependencies
  Using pip 25.1.1 from C:\Users\runneradmin\micromamba\envs\argopy-tests\Lib\site-packages\pip (python 3.11)
  Collecting setuptools>=42
    Obtaining dependency information for setuptools>=42 from https://files.pythonhosted.org/packages/e1/c6/76dc613121b793286a3f91621d7b75a2b493e0390ddca50f11993eadf192/setuptools-82.0.0-py3-none-any.whl.metadata
    Downloading setuptools-82.0.0-py3-none-any.whl.metadata (6.6 kB)
  Collecting wheel
    Obtaining dependency information for wheel from https://files.pythonhosted.org/packages/87/22/b76d483683216dde3d67cba61fb2444be8d5be289bf628c13fc0fd90e5f9/wheel-0.46.3-py3-none-any.whl.metadata
    Downloading wheel-0.46.3-py3-none-any.whl.metadata (2.4 kB)
  Collecting packaging>=24.0 (from wheel)
    Obtaining dependency information for packaging>=24.0 from https://files.pythonhosted.org/packages/b7/b9/c538f279a4e237a006a2c98387d081e9eb060d203d8ed34467cc0f0b9b53/packaging-26.0-py3-none-any.whl.metadata
    Downloading packaging-26.0-py3-none-any.whl.metadata (3.3 kB)
  Downloading setuptools-82.0.0-py3-none-any.whl (1.0 MB)
     ---------------------------------------- 1.0/1.0 MB 23.9 MB/s eta 0:00:00
  Downloading wheel-0.46.3-py3-none-any.whl (30 kB)
  Downloading packaging-26.0-py3-none-any.whl (74 kB)
  Installing collected packages: setuptools, packaging, wheel
    Creating C:\Users\runneradmin\AppData\Local\Temp\pip-build-env-_nchm7fo\overlay\Scripts

  Successfully installed packaging-26.0 setuptools-82.0.0 wheel-0.46.3
  Installing build dependencies: finished with status 'done'
  Checking if build backend supports build_editable: started
  Running command Checking if build backend supports build_editable
  Checking if build backend supports build_editable: finished with status 'done'
  Getting requirements to build editable: started
  Running command Getting requirements to build editable
  Traceback (most recent call last):
    File "C:\Users\runneradmin\micromamba\envs\argopy-tests\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 389, in <module>
      main()
    File "C:\Users\runneradmin\micromamba\envs\argopy-tests\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 373, in main
      json_out["return_val"] = hook(**hook_input["kwargs"])
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "C:\Users\runneradmin\micromamba\envs\argopy-tests\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 157, in get_requires_for_build_editable
      return hook(config_settings)
             ^^^^^^^^^^^^^^^^^^^^^
    File "C:\Users\runneradmin\AppData\Local\Temp\pip-build-env-_nchm7fo\overlay\Lib\site-packages\setuptools\build_meta.py", line 481, in get_requires_for_build_editable
      return self.get_requires_for_build_wheel(config_settings)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "C:\Users\runneradmin\AppData\Local\Temp\pip-build-env-_nchm7fo\overlay\Lib\site-packages\setuptools\build_meta.py", line 333, in get_requires_for_build_wheel
      return self._get_build_requires(config_settings, requirements=[])
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "C:\Users\runneradmin\AppData\Local\Temp\pip-build-env-_nchm7fo\overlay\Lib\site-packages\setuptools\build_meta.py", line 301, in _get_build_requires
      self.run_setup()
    File "C:\Users\runneradmin\AppData\Local\Temp\pip-build-env-_nchm7fo\overlay\Lib\site-packages\setuptools\build_meta.py", line 317, in run_setup
      exec(code, locals())
    File "<string>", line 6, in <module>
    File "C:\Users\runneradmin\micromamba\envs\argopy-tests\Lib\encodings\cp1252.py", line 23, in decode
      return codecs.charmap_decode(input,self.errors,decoding_table)[0]
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  UnicodeDecodeError: 'charmap' codec can't decode byte 0x90 in position 1401: character maps to <undefined>
  error: subprocess-exited-with-error
  
  Getting requirements to build editable did not run successfully.
  exit code: 1
  
  See above for output.
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  full command: 'C:\Users\runneradmin\micromamba\envs\argopy-tests\python.exe' 'C:\Users\runneradmin\micromamba\envs\argopy-tests\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py' get_requires_for_build_editable 'C:\Users\RUNNER~1\AppData\Local\Temp\tmpms61dsr8'
  cwd: D:\a\argopy\argopy
  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

See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.
Error: Process completed with exit code 1.

Metadata

Metadata

Labels

CIContinuous Integration toolsnext-releaseStrongly needed for the next release

Type

No type

Projects

Status

In Progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions