Skip to content

Commit 0383979

Browse files
authored
Fix modified libraries not being upgraded (#1734)
This commit removes checks to prevent modified libraries from being upgraded. Originally intended to prevent accidental data loss of in-development libraries the safe guard may prevent updates in production environments unintentionally. It is not clear which mechanism modifies files on disk, but users have been reporting untouched libraries from not upgrading for this reason, repetitively.
1 parent 72f911b commit 0383979

File tree

1 file changed

+0
-16
lines changed

1 file changed

+0
-16
lines changed

package_control/package_manager.py

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1238,22 +1238,6 @@ def install_library(self, lib):
12381238
)
12391239
return True
12401240

1241-
_, modified_ris = installed_library.dist_info.verify_files(missing_ok=True)
1242-
modified_paths = {mri.absolute_path for mri in modified_ris}
1243-
if modified_paths:
1244-
console_write(
1245-
'''
1246-
Unable to upgrade library "%s" for Python %s because files on disk have been modified:
1247-
%s
1248-
''',
1249-
(
1250-
lib.name,
1251-
lib.python_version,
1252-
'\n '.join(sorted(map(sys_path.shortpath, modified_paths), key=lambda s: s.lower()))
1253-
)
1254-
)
1255-
return False
1256-
12571241
lib_path = sys_path.lib_paths()[lib.python_version]
12581242
tmp_dir = sys_path.longpath(tempfile.mkdtemp(''))
12591243
tmp_library_dir = os.path.join(tmp_dir, lib.name)

0 commit comments

Comments
 (0)