GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-149879: Fix test_venv on Cygwin by vstinner · Pull Request #150426 · python/cpython

Conversation

@vstinner

@vstinner vstinner commented May 25, 2026 •
edited by bedevere-app Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

venv now uses symlinks by default on Cygwin.

Fix test_zippath_from_non_installed_posix(): copy also the cygpython DLL.

  • Issue: Enhance Cygwin support #149879

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@vstinner
pythongh-149879: Fix test_venv on Cygwin
6a5ca98
venv now uses symlinks by default on Cygwin.

Fix test_zippath_from_non_installed_posix(): copy also the cygpython
DLL.
@vstinner vstinner added the skip news label May 25, 2026
@bedevere-app bedevere-app Bot mentioned this pull request May 25, 2026
Enhance Cygwin support #149879
Closed
@vstinner vstinner mentioned this pull request May 25, 2026
gh-149879: Skip test_venv on Cygwin #150418
Closed
@vstinner
vstinner marked this pull request as ready for review May 25, 2026 20:39
@vstinner
vstinner requested review from FFY00 and vsajip as code owners May 25, 2026 20:39
@bedevere-app bedevere-app Bot added the awaiting core review label May 25, 2026
@vstinner

vstinner commented May 25, 2026

Copy link
Copy Markdown
Member Author

@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.')
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@vstinner

vstinner commented May 25, 2026

Copy link
Copy Markdown
Member Author

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
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@vstinner

vstinner commented May 26, 2026

Copy link
Copy Markdown
Member Author

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@vstinner vstinner closed this May 26, 2026
@vstinner vstinner mentioned this pull request May 26, 2026
gh-149879: Fix test_venv on Cygwin #150483
Merged
@vstinner
vstinner deleted the venv_cygwin branch July 10, 2026 20:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@vsajip vsajip Awaiting requested review from vsajip vsajip is a code owner
@FFY00 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

Labels

awaiting core review skip news

Projects

None yet

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.

1 participant

@vstinner
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.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.