Skip to content

fix(release): util/release_published.var() reads os.environb, which Windows lacks, so every win-64 conda build fails #2120

Closed

Description

@JarryShaw

On the first manual Conda Update run (40020510868, on c5081fbfe), all five conda-dist (windows-latest) legs fail in Build conda packages within about 3 seconds:

File "…\util\release_conda.py", line 165, in build
    label = env('PCAPKIT_CONDA_OS')
File "…\util\release_published.py", line 129, in var
    return os.environb[name.encode()]
AttributeError: module 'os' has no attribute 'environb'.

os.environb exists only where os.supports_bytes_environ is true, which is false on Windows. #2089 moved the build shell into util/release_conda.py, whose env() goes through release_published.var(). The leg is non-blocking, so the job stays green. conda build and the smoke test never ran, so bld.bat is still unexercised on a runner.

util/release_tiers.py's var() has the same bug. It only runs on ubuntu-latest, so it is latent there.

Fix: where os.supports_bytes_environ is false, read os.fsencode(os.environ[name]) and keep the Unbound behaviour. Add a Linux test that patches os.supports_bytes_environ to false and removes os.environb.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIssues reporting a defect (set by the bug report template; a default, not an assessment)ciPull requests that change CI or workflow configuration (ci: subject prefix)

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions