Ticket #10584 (positive_review defect)

Opened 2 years ago

Last modified 41 hours ago

fetch_packages() is defined but never used

Reported by: gbe Owned by: GeorgSWeber
Priority: minor Milestone: sage-duplicate/invalid/wontfix
Component: build Keywords:
Cc: Work issues:
Report Upstream: N/A Reviewers: Jeroen Demeyer
Authors: Geoffrey Ehrman Merged in:
Dependencies: Stopgaps:

Description

Currently sagenb/spkg_dist contains the following function:

def fetch_packages():
    # This block is here in case we ever need it again.
    # XXX Then also make sure the easy_install commands
    # XXX get written to the correct part of spkg-install!
    # XXX (We currently use a single string for the whole file.)
    print "Fetching the required packages"
    pkg_index = PackageIndex()

    tmp_dir = mkdtemp()

    required_packages = ()

    pkg_locations = []

    for pkg in required_packages:
        print "Fetching %s" % pkg
        dist = pkg_index.fetch_distribution(Requirement.parse(pkg), tmp_dir,
                                            True, True)
        pkg_locations.append(os.path.abspath(dist.location))

    for location in pkg_locations:
        shutil.copy(location, 'src')
        spkg_install_fd.write('easy_install %s\n' % os.path.basename(location))

    return [os.path.basename(location) for location in pkg_locations]

Iterating over () and [] should be fixed; however, the function is never called. Therefore, this patch simply removes the function.

Attachments

10584.patch Download (1.5 KB) - added by gbe 2 years ago.

Change History

Changed 2 years ago by gbe

comment:1 Changed 2 years ago by dimpase

  • Summary changed from fetch_packages() is never defined but never used to fetch_packages() is defined but never used

comment:2 Changed 41 hours ago by jdemeyer

  • Status changed from new to needs_review
  • Reviewers set to Jeroen Demeyer
  • Milestone set to sage-duplicate/invalid/wontfix

fetch_packages() is gone.

comment:3 Changed 41 hours ago by jdemeyer

  • Status changed from needs_review to positive_review
Note: See TracTickets for help on using tickets.