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-133951: Remove lib64->lib symlink in venv creation by Cycloctane · Pull Request #137139 · python/cpython

Conversation

@Cycloctane

@Cycloctane Cycloctane commented Jul 27, 2025 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor

venv creates a lib64->lib symlink on posix platforms (except osx) to make purelib and platlib always share the same directory in all dists (#65396). This can cause problems on filesystems without symlink support. It is also not necessary anymore because venv now creates lib paths in venv directory based on sysconfig. Others should also use sysconfig to get the correct lib paths.

  • Issue: creating venv Python3.13 on CIFS mounted drive fails ENODATA #133951

Sorry, something went wrong.

Uh oh!

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

All reactions
Cycloctane added 2 commits July 27, 2025 15:30
@Cycloctane
Remove lib64->lib symlink in venv directory
b25f602
@Cycloctane
fix test
f13b10f
@Cycloctane
Cycloctane requested review from FFY00 and vsajip as code owners July 27, 2025 07:49
@python-cla-bot

python-cla-bot Bot commented Jul 27, 2025 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown

All commit authors signed the Contributor License Agreement.

CLA signed

All reactions

Sorry, something went wrong.

Uh oh!

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

@bedevere-app bedevere-app Bot added the awaiting review label Jul 27, 2025
@bedevere-app

bedevere-app Bot commented Jul 27, 2025

Copy link
Copy Markdown

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

All reactions

Sorry, something went wrong.

Uh oh!

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

@bedevere-app bedevere-app Bot mentioned this pull request Jul 27, 2025
creating venv Python3.13 on CIFS mounted drive fails ENODATA #133951
Closed
@Cycloctane
remove unused import
de3165e
@bedevere-app

bedevere-app Bot commented Jul 27, 2025

Copy link
Copy Markdown

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

All reactions

Sorry, something went wrong.

Uh oh!

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

@picnixz

picnixz commented Jul 27, 2025

Copy link
Copy Markdown
Member

More generally, could it cause issues with platforms that are configured with --with-platlibdir=lib64? On OpenSUSE I need to explicitly specify this when doing ./configure, otherwise Python won't be correctly installed.

It is also not necessary anymore because venv now creates lib paths in venv directory based on sysconfig.

Is there a possibility that this could somehow conflict with legacy venvs? or with some weird sysconfig? If this is causing issues on platforms without symlink support why not just checking if that platform supports symlinks and, if not, do nothing?

All reactions

Sorry, something went wrong.

Uh oh!

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

@Cycloctane

Cycloctane commented Jul 27, 2025

Copy link
Copy Markdown
Contributor Author

could it cause issues with platforms that are configured with --with-platlibdir=lib64?

The difference on these platforms is that platlib and purelib modules will be installed into separated directory (lib64/ and lib/) as defined in posix_venv installation scheme. This is also virtualenv's current behavior.

Is there a possibility that this could somehow conflict with legacy venvs?

I think this only affects venv creation. Legacy venvs should still be able to run.

If this is causing issues on platforms without symlink support why not just checking if that platform supports symlinks and, if not, do nothing?

In my understanding this symlink is not needed in anyway. Other paths created by venv are all looked up from venv scheme sysconfig except this symlink which is hard-coded and created even unnecessary. So I remove it for consistency.

All reactions

Sorry, something went wrong.

Uh oh!

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

@Cycloctane
add news
23fed55
FFY00
FFY00 approved these changes Aug 28, 2025
View reviewed changes

@FFY00 FFY00 left a comment •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR!

There's a possibility it would break user code when users are hardcoding the path, or not using the venv scheme. Though, the code is already fundamentally broken in both those situations, so I agree with this change.

That said, if possible, I'd like @vsajip to also have a look before merging.

@Cycloctane, please ping me in 1~2 weeks if the PR hasn't moved.

Sorry, something went wrong.

Uh oh!

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

All reactions
@bedevere-app bedevere-app Bot added awaiting merge and removed awaiting review labels Aug 28, 2025
vsajip
vsajip approved these changes Aug 28, 2025
View reviewed changes

@vsajip vsajip left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm OK with this change, though of course there might be a backwards compatibility issue for someone; but I guess we can deal with it if and when it happens.

Sorry, something went wrong.

Uh oh!

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

All reactions
@Cycloctane
Cycloctane requested a review from FFY00 September 10, 2025 09:43
@Cycloctane

Cycloctane commented Sep 19, 2025 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor Author

please ping me in 1~2 weeks if the PR hasn't moved.

@FFY00 :)

FFY00 reacted with heart emoji
All reactions
  • ❤️ 1 reaction

Sorry, something went wrong.

Uh oh!

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

@FFY00

FFY00 commented Oct 4, 2025

Copy link
Copy Markdown
Member

@Cycloctane, sorry for the delay!

Cycloctane reacted with rocket emoji
All reactions
  • 🚀 1 reaction

Sorry, something went wrong.

Uh oh!

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

@FFY00
FFY00 merged commit a7a4855 into python:main Oct 4, 2025
@bedevere-app bedevere-app Bot removed the awaiting merge label Oct 4, 2025
@picnixz picnixz mentioned this pull request Oct 5, 2025
test_peg_generator failures on some buildbots #139604
Closed
StanFromIreland added a commit to StanFromIreland/cpython that referenced this pull request Oct 5, 2025
@StanFromIreland
Revert "pythongh-133951: Remove lib64->lib symlink in venv creation (p…
512dc82
…ython#137139)"

This reverts commit a7a4855.
@Cycloctane Cycloctane mentioned this pull request Oct 5, 2025
gh-133951: Fix purelib packages not found in test_peg_generator TestCParser #139607
Merged
danigm pushed a commit to openSUSE-Python/cpython that referenced this pull request Oct 7, 2025
@Cycloctane @danigm
pythongh-133951: Remove lib64->lib symlink in venv creation (python#1…
d6295e8
…37139)

* Remove lib64->lib symlink in venv directory

* fix test

* remove unused import

* add news
@StanFromIreland StanFromIreland mentioned this pull request Jan 20, 2026
Possible missing symlink to lib64 in user path schema on Linux Fedora 43, Python 3.14.2 #143989
Open
@gaborbernat gaborbernat mentioned this pull request Jun 5, 2026
python -m venv --copies attempts to create a symlink regardless of if it's supported by the filesystem #98975
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@vsajip vsajip vsajip approved these changes
@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

None yet

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.

4 participants

@Cycloctane @picnixz @FFY00 @vsajip
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.