Skip to content

Commit 7c57116

Browse files
authored
Merge pull request #4245 from branfosj/fetch
remove deprecated fetch_extension_sources
2 parents e70d27b + 99b1e4d commit 7c57116

File tree

4 files changed

+3
-38
lines changed

4 files changed

+3
-38
lines changed

easybuild/framework/easyblock.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -533,14 +533,6 @@ def fetch_patches(self, patch_specs=None, extension=False, checksums=None):
533533
else:
534534
self.log.info("Added patches: %s", self.patches)
535535

536-
def fetch_extension_sources(self, skip_checksums=False):
537-
"""
538-
Fetch source and patch files for extensions (DEPRECATED, use collect_exts_file_info instead).
539-
"""
540-
depr_msg = "EasyBlock.fetch_extension_sources is deprecated, use EasyBlock.collect_exts_file_info instead"
541-
self.log.deprecated(depr_msg, '5.0')
542-
return self.collect_exts_file_info(fetch_files=True, verify_checksums=not skip_checksums)
543-
544536
def collect_exts_file_info(self, fetch_files=True, verify_checksums=True):
545537
"""
546538
Collect information on source and patch files for extensions.

easybuild/framework/easyconfig/easyconfig.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -776,7 +776,7 @@ def count_files(self):
776776
for ext in self['exts_list']:
777777
if isinstance(ext, tuple) and len(ext) >= 3:
778778
ext_opts = ext[2]
779-
# check for 'sources' first, since that's also considered first by EasyBlock.fetch_extension_sources
779+
# check for 'sources' first, since that's also considered first by EasyBlock.collect_exts_file_info
780780
if 'sources' in ext_opts:
781781
cnt += len(ext_opts['sources'])
782782
elif 'source_tmpl' in ext_opts:

test/framework/easyblock.py

Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -2443,13 +2443,6 @@ def test_checksum_step(self):
24432443
error_msg = "Checksum verification for extension source bar-0.0.tar.gz failed"
24442444
self.assertErrorRegex(EasyBuildError, error_msg, eb.collect_exts_file_info)
24452445

2446-
# also check with deprecated fetch_extension_sources method
2447-
self.allow_deprecated_behaviour()
2448-
self.mock_stderr(True)
2449-
self.assertErrorRegex(EasyBuildError, error_msg, eb.fetch_extension_sources)
2450-
self.mock_stderr(False)
2451-
self.disallow_deprecated_behaviour()
2452-
24532446
# create test easyconfig from which checksums have been stripped
24542447
test_ec = os.path.join(self.test_prefix, 'test.eb')
24552448
ectxt = read_file(toy_ec)
@@ -2497,17 +2490,10 @@ def test_checksum_step(self):
24972490
error_msg = "Checksum verification for .*/toy-0.0.tar.gz using .* failed"
24982491
self.assertErrorRegex(EasyBuildError, error_msg, eb.checksum_step)
24992492

2500-
# also check verification of checksums for extensions, which is part of fetch_extension_sources
2493+
# also check verification of checksums for extensions, which is part of collect_exts_file_info
25012494
error_msg = "Checksum verification for extension source bar-0.0.tar.gz failed"
25022495
self.assertErrorRegex(EasyBuildError, error_msg, eb.collect_exts_file_info)
25032496

2504-
# also check with deprecated fetch_extension_sources method
2505-
self.allow_deprecated_behaviour()
2506-
self.mock_stderr(True)
2507-
self.assertErrorRegex(EasyBuildError, error_msg, eb.fetch_extension_sources)
2508-
self.mock_stderr(False)
2509-
self.disallow_deprecated_behaviour()
2510-
25112497
# if --ignore-checksums is enabled, faulty checksums are reported but otherwise ignored (no error)
25122498
build_options = {
25132499
'ignore_checksums': True,
@@ -2534,19 +2520,6 @@ def test_checksum_step(self):
25342520
self.assertEqual(stdout, '')
25352521
self.assertEqual(stderr.strip(), "WARNING: Ignoring failing checksum verification for bar-0.0.tar.gz")
25362522

2537-
# also check with deprecated fetch_extension_sources method
2538-
self.allow_deprecated_behaviour()
2539-
self.mock_stderr(True)
2540-
self.mock_stdout(True)
2541-
eb.fetch_extension_sources()
2542-
stderr = self.get_stderr()
2543-
stdout = self.get_stdout()
2544-
self.mock_stderr(False)
2545-
self.mock_stdout(False)
2546-
self.assertEqual(stdout, '')
2547-
self.assertTrue(stderr.strip().endswith("WARNING: Ignoring failing checksum verification for bar-0.0.tar.gz"))
2548-
self.disallow_deprecated_behaviour()
2549-
25502523
def test_check_checksums(self):
25512524
"""Test for check_checksums_for and check_checksums methods."""
25522525
testdir = os.path.abspath(os.path.dirname(__file__))

test/framework/easyconfig.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4710,7 +4710,7 @@ def test_count_files(self):
47104710
' ("test-ext-one", "0.0", {',
47114711
' "sources": ["test-ext-one-0.0-part1.tgz", "test-ext-one-0.0-part2.zip"],',
47124712
# if both 'sources' and 'source_tmpl' are specified, 'source_tmpl' is ignored,
4713-
# see EasyBlock.fetch_extension_sources, so it should be too when counting files
4713+
# see EasyBlock.collect_exts_file_info, so it should be too when counting files
47144714
' "source_tmpl": "test-ext-one-%(version)s.tar.gz",',
47154715
' }),',
47164716
' ("test-ext-two", "0.0", {',

0 commit comments

Comments
 (0)