Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add workaround to prevent crash on Windows when the SSLKEYLOGFILE environment variable is set #89

Merged
merged 5 commits into from
Aug 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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'
Expand All @@ -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"
19 changes: 19 additions & 0 deletions news/89-openssl-applink
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
### Enhancements

* <news item>

### Bug fixes

* Add workaround to prevent crash on Windows when the `SSLKEYLOGFILE` environment variable is set. (#86 via #89).

### Deprecations

* <news item>

### Docs

* <news item>

### Other

* <news item>
6 changes: 6 additions & 0 deletions src/entry_point.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@
from multiprocessing import freeze_support
from pathlib import Path

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"]


def _create_dummy_executor(*args, **kwargs):
"use this for debugging, because ProcessPoolExecutor isn't pdb/ipdb friendly"
Expand Down
Loading