From d88ceb6a8e82f2bd15f5fb64725274d44fce769d Mon Sep 17 00:00:00 2001 From: jaimergp Date: Fri, 9 Aug 2024 00:22:55 +0200 Subject: [PATCH 1/5] add a workaround for SSLKEYLOGFILE --- src/entry_point.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/entry_point.py b/src/entry_point.py index a48332c..fd5005f 100755 --- a/src/entry_point.py +++ b/src/entry_point.py @@ -12,6 +12,11 @@ from multiprocessing import freeze_support from pathlib import Path +if "SSLKEYLOGFILE" in os.environ: + # This causes a crash with requests 2.32+ + # See https://github.com/conda/conda-standalone/issues/86 + del os.environ["SSLKEYLOGFILE"] + def _create_dummy_executor(*args, **kwargs): "use this for debugging, because ProcessPoolExecutor isn't pdb/ipdb friendly" From b97d47ffb2e88e51e438fd8eb5e827e4ad36be30 Mon Sep 17 00:00:00 2001 From: jaimergp Date: Fri, 9 Aug 2024 00:26:36 +0200 Subject: [PATCH 2/5] only windows --- src/entry_point.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/entry_point.py b/src/entry_point.py index fd5005f..86328ca 100755 --- a/src/entry_point.py +++ b/src/entry_point.py @@ -12,8 +12,9 @@ from multiprocessing import freeze_support from pathlib import Path -if "SSLKEYLOGFILE" in os.environ: - # This causes a crash with requests 2.32+ +if os.name == "nt" and "SSLKEYLOGFILE" in os.environ: + # This causes a crash with requests 2.32+ on Windows + # Root cause is 'urllib3.util.ssl_.create_urllib3_context()' # See https://github.com/conda/conda-standalone/issues/86 del os.environ["SSLKEYLOGFILE"] From 92dae8e686d195ce8bc1b1ce085ef0f251e9aad5 Mon Sep 17 00:00:00 2001 From: jaimergp Date: Fri, 9 Aug 2024 00:47:32 +0200 Subject: [PATCH 3/5] Add GHA artifacts --- .github/workflows/tests.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 092bc30..45db59c 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -35,6 +35,8 @@ jobs: subdir: osx-arm64 - os: windows-latest subdir: win-64 + env: + PYTHONUNBUFFERED: "1" steps: - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - uses: conda-incubator/setup-miniconda@v3 @@ -53,6 +55,12 @@ jobs: CONDA_BLD_PATH: ${{ runner.temp }}/bld run: conda build recipe --override-channels -c conda-forge + - uses: actions/upload-artifact@v4 + if: github.event_name == 'pull_request' + with: + name: conda-standalone-${{ matrix.subdir }} + path: ${{ runner.temp }}/bld/${{ matrix.subdir }}/conda-standalone-*.* + - name: Upload package to anaconda.org shell: bash -el {0} if: github.event_name == 'push' && github.ref == 'refs/heads/main' @@ -72,7 +80,7 @@ jobs: --label="${ANACONDA_ORG_LABEL}" \ ${CONDA_BLD_PATH}/${{ matrix.subdir }}/conda-standalone-*.* echo "Uploaded the following files:" - basename -a ${CONDA_BLD_PATH}/pkgs/${{ matrix.subdir }}/conda-standalone-*.* + basename -a ${CONDA_BLD_PATH}/${{ matrix.subdir }}/conda-standalone-*.* echo "Use this command to try out the build:" echo " conda install -c ${ANACONDA_ORG_CHANNEL}/label/${ANACONDA_ORG_LABEL} conda-standalone" From eeca7bb3a47b272d7a38e00c637460b269779cb0 Mon Sep 17 00:00:00 2001 From: jaimergp Date: Fri, 9 Aug 2024 00:56:24 +0200 Subject: [PATCH 4/5] add news --- news/89-openssl-applink | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 news/89-openssl-applink diff --git a/news/89-openssl-applink b/news/89-openssl-applink new file mode 100644 index 0000000..b7cf17a --- /dev/null +++ b/news/89-openssl-applink @@ -0,0 +1,19 @@ +### Enhancements + +* + +### Bug fixes + +* Add workaround to prevent crash on Windows when the `SSLKEYLOGFILE` environment variable is set. (#86 via #89). + +### Deprecations + +* + +### Docs + +* + +### Other + +* From e8da210dc1688e4e77f134eb8b02b6c15bf46743 Mon Sep 17 00:00:00 2001 From: jaimergp Date: Fri, 9 Aug 2024 00:56:44 +0200 Subject: [PATCH 5/5] pre-commit --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 45db59c..79d1580 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -60,7 +60,7 @@ jobs: with: name: conda-standalone-${{ matrix.subdir }} path: ${{ runner.temp }}/bld/${{ matrix.subdir }}/conda-standalone-*.* - + - name: Upload package to anaconda.org shell: bash -el {0} if: github.event_name == 'push' && github.ref == 'refs/heads/main'