From 0a52ad89afcfd33f03c575f16d961a818a1ab154 Mon Sep 17 00:00:00 2001 From: Conda Bot <18747875+conda-bot@users.noreply.github.com> Date: Sun, 13 Oct 2024 02:52:26 +0000 Subject: [PATCH 1/3] =?UTF-8?q?=F0=9F=A4=96=20updated=20file(s)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/labels.yml | 2 +- .github/workflows/update.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/labels.yml b/.github/workflows/labels.yml index 6fd0935..543a4dc 100644 --- a/.github/workflows/labels.yml +++ b/.github/workflows/labels.yml @@ -23,7 +23,7 @@ jobs: GLOBAL: https://raw.githubusercontent.com/conda/infra/main/.github/global.yml LOCAL: .github/labels.yml steps: - - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + - uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0 - id: has_local uses: andstor/file-existence-action@076e0072799f4942c8bc574a82233e1e4d13e9d6 # v3.0.0 diff --git a/.github/workflows/update.yml b/.github/workflows/update.yml index 69a65ae..91224cf 100644 --- a/.github/workflows/update.yml +++ b/.github/workflows/update.yml @@ -44,7 +44,7 @@ jobs: echo REPOSITORY=$(curl --silent ${{ github.event.issue.pull_request.url }} | jq --raw-output '.head.repo.full_name') >> $GITHUB_ENV echo REF=$(curl --silent ${{ github.event.issue.pull_request.url }} | jq --raw-output '.head.ref') >> $GITHUB_ENV - - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + - uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0 with: repository: ${{ env.REPOSITORY || github.repository }} ref: ${{ env.REF || '' }} From ad14c2d40b14c19e7fc166bc9d2cbf5e347c4e62 Mon Sep 17 00:00:00 2001 From: "Uwe L. Korn" Date: Mon, 14 Oct 2024 09:41:13 +0200 Subject: [PATCH 2/3] Debug output of conda command --- conda_pack/tests/test_core.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/conda_pack/tests/test_core.py b/conda_pack/tests/test_core.py index 7f11d8c..2f1828a 100644 --- a/conda_pack/tests/test_core.py +++ b/conda_pack/tests/test_core.py @@ -414,6 +414,10 @@ def test_pack_with_conda(tmpdir, fix_dest): script_file.write('\n'.join(commands)) out = subprocess.check_output(cmd, stderr=subprocess.STDOUT).decode() + print("JSON output:") + print("------------") + print(out) + print("------------") conda_info = json.loads(out) extract_path_n = normpath(extract_path) for var in ('conda_prefix', 'sys.prefix', 'default_prefix', 'root_prefix'): From 9801e762442c067a8cd929800f3731fc9885b55e Mon Sep 17 00:00:00 2001 From: "Uwe L. Korn" Date: Mon, 14 Oct 2024 10:03:36 +0200 Subject: [PATCH 3/3] Explicitly add defaults to silence the FutureWarning breaking JSON output --- .github/workflows/main.yml | 2 ++ conda_pack/tests/test_core.py | 6 +----- testing/env_yamls/has_conda.yml | 2 +- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ea2c0ac..4fb462a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -116,6 +116,8 @@ jobs: - name: Create the test environment and run the tests run: | source $CONDA_ROOT/etc/profile.d/conda.sh + # Explicitly add defaults to silence the FutureWarning breaking JSON output + conda config --add channels defaults conda info -a mv conda-bld $CONDA_ROOT/conda-bld conda create -n cptest local::conda-pack conda-forge::pytest conda-forge::pytest-cov defaults::python=${{ matrix.pyver }} zstandard>=0.23.0 ${{ matrix.conda_deps }} diff --git a/conda_pack/tests/test_core.py b/conda_pack/tests/test_core.py index 2f1828a..9f8cb99 100644 --- a/conda_pack/tests/test_core.py +++ b/conda_pack/tests/test_core.py @@ -394,7 +394,7 @@ def test_pack_with_conda(tmpdir, fix_dest): commands = ( r"@set CONDA_PREFIX=", r"@set CONDA_SHVL=", - rf"@call {extract_path}\Scripts\activate", + rf"@call {extract_path}\Scripts\activate.bat", r"@conda info --json", r"@deactivate", ) @@ -414,10 +414,6 @@ def test_pack_with_conda(tmpdir, fix_dest): script_file.write('\n'.join(commands)) out = subprocess.check_output(cmd, stderr=subprocess.STDOUT).decode() - print("JSON output:") - print("------------") - print(out) - print("------------") conda_info = json.loads(out) extract_path_n = normpath(extract_path) for var in ('conda_prefix', 'sys.prefix', 'default_prefix', 'root_prefix'): diff --git a/testing/env_yamls/has_conda.yml b/testing/env_yamls/has_conda.yml index dd33147..d62ca6b 100644 --- a/testing/env_yamls/has_conda.yml +++ b/testing/env_yamls/has_conda.yml @@ -1,5 +1,5 @@ name: has_conda dependencies: - - conda + - conda<24.9 - toolz