Repository navigation
fix(release): read the environment without os.environb where Windows lacks it (#2120) - #2122
Conversation
|
GOOD TO GO at
|
|
Coverage: 91.54% (unit tier, Python 3.15,
Per-file detail: the |
|
Ready to merge at
This closes #2120. It conflicts with #2127 in one docstring of |
|
use |
|
Will do. The |
|
use directives in Sphinx docs only. use |
|
Noted. The roles go only where Sphinx renders: |
f4f24e3 to
3ce5b48
Compare
|
GOOD TO GO at
I'll post the ready note when CI finishes on the new head. |
…lacks it (#2120) util/release_published.py and util/release_tiers.py read each variable from os.environb, which exists only where os.supports_bytes_environ holds, so release_conda.py build died on the win-64 conda leg at its first variable. Both now read through a new util/_actions.py getenvb, which falls back to os.fsencode(os.environ[name]); an unset variable is still Unbound. Tested on an emulated Windows os module in tests/project/test_conda_windows_leg_2060.py.
3ce5b48 to
8777e5e
Compare
|
Rebased
|
|
GOOD TO GO at |
|
Ready to merge at
This closes #2120. Once it lands, #2060 phase 2 needs one Conda Update run on |
make pylint,make mypy,make isort)make testpasses, and a test case covers the changeWhat is the purpose of your pull request?
fix— bug fixesDescription of your pull request and other information
Closes #2120.
release_published.var()andrelease_tiers.var()reados.environb, which does not exist whereos.supports_bytes_environis false, as on Windows. Everyconda-dist (windows-latest)leg of Conda Update run 40020510868 therefore died at the first line ofrelease_conda.py build, beforeconda buildran.util/_actions.getenvb(name)readsos.environbwhere it exists andos.fsencode(os.environ[name])otherwise. Bothvar()s call it inside their existingexcept KeyError, so an unset variable still gives<name>: unbound variableand exits 1.release_conda.py,release_published.py,_actions.py,leg_summary.pyorconda_vendor.py. Not verified: thatsubprocessfindsconda.exeon PATH underbash -el; the next run will show it.TestTheEnvironmentWithoutEnvironbintest_conda_windows_leg_2060removesos.environband setssupports_bytes_environ = False. It checks the helper and bothvar()s, thatrelease_conda.main(['build'])gets past the env reads to theconda buildcall, and that an unset variable still fails the same way. With the fix reverted, 6 checks fail with the CI'sAttributeError. The conda, release-script, helper and release-gates tests pass.