GeezerVison is showing github.com — gh-149879: Fix test_venv on Cygwin by vstinner · Pull Request #150426 · python/cpython
Conversation
vstinner
commented
May 25, 2026
•
edited by bedevere-app
Bot
Loading
Uh oh!
There was an error while loading. Please reload this page.
venv now uses symlinks by default on Cygwin.
Fix test_zippath_from_non_installed_posix(): copy also the cygpython DLL.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
venv now uses symlinks by default on Cygwin.
Fix test_zippath_from_non_installed_posix(): copy also the cygpython
DLL.
|
@vsajip @FFY00: Are you ok with this change? It uses symlinks by default on Cygwin when using the Python API (venv module). The python -m venv command line interface already uses symlinks by default on Unix:
if os.name == 'nt':
use_symlinks = False
else:
use_symlinks = True
group = parser.add_mutually_exclusive_group()
group.add_argument('--symlinks', default=use_symlinks,
action='store_true', dest='symlinks',
help='Try to use symlinks rather than copies, '
'when symlinks are not the default for '
'the platform.')
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
venv created with --copies doesn't work on Cygwin:
vstinner@win ~/cpython
$ ./python.exe -m venv ../env --without-pip --copies
vstinner@win ~/cpython
$ cd ../
vstinner@win ~
$ env/bin/python.exe -V
C:/cygwin64/home/vstinner/env/bin/python.exe: error while loading shared libraries: cygpython3.16d.dll: cannot open shared object file: No such file or directory
venv created with symlinks just works well:
vstinner@win ~/cpython
$ ./python.exe -m venv ../env --without-pip
vstinner@win ~/cpython
$ cd ..
vstinner@win ~
$ env/bin/python.exe -V
Python 3.16.0a0
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
With this change, venv cannot be used in copy mode: running the venv python programs fails to locate the libpython DLL.
I wrote a different approach, copy the libpython DLL in the venv: PR gh-150483.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Reviewers
vsajip
Awaiting requested review from vsajip
vsajip is a code owner
FFY00
Awaiting requested review from FFY00
FFY00 is a code owner
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.