Commits on Source 4

  • Paul Wise's avatar
    Python 3: switch from cmp functions to key functions for sorting versions · de0fd830
    Paul Wise authored
    cmp functions have been removed in Python 3 and are slower.
    
    Use debian.debian_support.Version wrapper class for key functions
    as apt_pkg doesn't appear to have an appropriate class.
    
    Thanks-to: Stuart Prescott <stuart@debian.org>
    
    Traceback (most recent call last):
      File "bin/compare-source-package-list", line 1186, in <module>
        files, patches, links, new = process_sources(source_entries, lists_dir)
      File "bin/compare-source-package-list", line 1164, in process_sources
        actions = check_source_package(source_entry, srcpkg)
      File "bin/compare-source-package-list", line 1113, in check_source_package
        derived_from = find_derived_from(tmp_dir, name, version, dsc_name, dsc_sha1, parts_unmodified)
      File "bin/compare-source-package-list", line 885, in find_derived_from
        possibly_derived_from.sort(cmp=lambda a,b: apt_version_cmp(b[1],a[1]))
    TypeError: 'cmp' is an invalid keyword argument for this function
    
    Traceback (most recent call last):
      File "bin/compare-source-package-list", line 1245, in <module>
        data.sort(cmp=lambda a,b: cmp(a[0],b[0]) or apt_version_cmp(a[1],b[1]) or cmp(a[2],b[2]) or apt_version_cmp(a[3],b[3]))
    TypeError: 'cmp' is an invalid keyword argument for this function
    
    Traceback (most recent call last):
      File "bin/compare-source-package-list", line 1266, in <module>
        data.sort(cmp=lambda a,b: cmp(a[0],b[0]) or apt_version_cmp(a[1],b[1]) or cmp(a[2],b[2]))
    TypeError: 'cmp' is an invalid keyword argument for this function
    de0fd830
  • Paul Wise's avatar
    Python 3: correct uses of bytes and UTF-8 encoding · 0b16d108
    Paul Wise authored
    Prevents crashes from incompatible types.
    Prevents printing Python bytes literals in logs.
    0b16d108
  • Paul Wise's avatar
    Python 3: switch to /usr/bin/python3 · bde4ce05
    Paul Wise authored
    The code now works with python3.
    bde4ce05
  • Paul Wise's avatar
    Python 3: drop use of the subprocess_setup preexec_fn · d778b448
    Paul Wise authored
    The default is now to restore default signal handlers in sub-processes.
    d778b448
Loading
Loading