Skip to content

Commit f22337d

Browse files
committed
Prevent copying extended attributes of script files when creating a venv.
1 parent c14db20 commit f22337d

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

Lib/venv/__init__.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -587,12 +587,9 @@ def skip_file(f):
587587
logger.warning('unable to copy script %r, '
588588
'may be binary: %s', srcfile, e)
589589
continue
590-
if new_data == data:
591-
shutil.copy2(srcfile, dstfile)
592-
else:
593-
with open(dstfile, 'wb') as f:
594-
f.write(new_data)
595-
shutil.copymode(srcfile, dstfile)
590+
with open(dstfile, 'wb') as f:
591+
f.write(new_data)
592+
shutil.copymode(srcfile, dstfile)
596593

597594
def upgrade_dependencies(self, context):
598595
logger.debug(
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Prevent copying extended attributes of script files when creating a venv.

0 commit comments

Comments
 (0)