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

gh-127638: Prevent copying extended attributes of script files when creating venv #128105

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

wimglenn
Copy link
Contributor

@wimglenn wimglenn commented Dec 19, 2024

Prevent the regression in Python 3.13 on Linux when creating a venv from interpreter hosted on large xattr filesystem.

There are a few other copy2 usages in venv/__init__.py but they are all gated by conditions on os.name == 'nt' so don't affect Linux.

Instead of handling the possible error from the copy (which looks like: shutil.copy2 -> copystat -> _copyattr -> os.setxattr -> OSError: [Errno 28] No space left on device) I've opted to just remove that conditional. I don't think we want to have attrs or not based on whether new_data == data, rather we want them always there or not regardless of file content.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant