Skip to content
Permalink
Browse files

2to3: add fixes

  • Loading branch information
jef-n committed Mar 20, 2016
1 parent b5c4d28 commit fb9d60d7c69c6e4ee62d09a49eb03003e0d653d2
Showing with 125 additions and 1 deletion.
  1. +76 −0 scripts/addfix.pl
  2. +1 −0 scripts/qgis_fixes/fix_absolute_import.py
  3. +1 −0 scripts/qgis_fixes/fix_apply.py
  4. +1 −0 scripts/qgis_fixes/fix_basestring.py
  5. +1 −0 scripts/qgis_fixes/fix_cmp.py
  6. +1 −0 scripts/qgis_fixes/fix_division.py
  7. +1 −0 scripts/qgis_fixes/fix_except.py
  8. +1 −0 scripts/qgis_fixes/fix_exec.py
  9. +1 −0 scripts/qgis_fixes/fix_execfile.py
  10. +1 −0 scripts/qgis_fixes/fix_exitfunc.py
  11. +1 −0 scripts/qgis_fixes/fix_filter.py
  12. +1 −0 scripts/qgis_fixes/fix_funcattrs.py
  13. +1 −0 scripts/qgis_fixes/fix_future_builtins.py
  14. +1 −0 scripts/qgis_fixes/fix_future_standard_library.py
  15. +1 −0 scripts/qgis_fixes/fix_future_standard_library_urllib.py
  16. +1 −0 scripts/qgis_fixes/fix_getcwdu.py
  17. +1 −0 scripts/qgis_fixes/fix_has_key.py
  18. +1 −0 scripts/qgis_fixes/fix_idioms.py
  19. +0 −1 scripts/qgis_fixes/fix_imports.py
  20. +1 −0 scripts/qgis_fixes/fix_input.py
  21. +1 −0 scripts/qgis_fixes/fix_intern.py
  22. +1 −0 scripts/qgis_fixes/fix_isinstance.py
  23. +1 −0 scripts/qgis_fixes/fix_itertools.py
  24. +1 −0 scripts/qgis_fixes/fix_itertools_imports.py
  25. +1 −0 scripts/qgis_fixes/fix_long.py
  26. +1 −0 scripts/qgis_fixes/fix_map.py
  27. +1 −0 scripts/qgis_fixes/fix_metaclass.py
  28. +1 −0 scripts/qgis_fixes/fix_methodattrs.py
  29. +1 −0 scripts/qgis_fixes/fix_ne.py
  30. +1 −0 scripts/qgis_fixes/fix_newstyle.py
  31. +1 −0 scripts/qgis_fixes/fix_next_call.py
  32. +1 −0 scripts/qgis_fixes/fix_nonzero.py
  33. +1 −0 scripts/qgis_fixes/fix_numliterals.py
  34. +1 −0 scripts/qgis_fixes/fix_object.py
  35. +1 −0 scripts/qgis_fixes/fix_operator.py
  36. +1 −0 scripts/qgis_fixes/fix_paren.py
  37. +1 −0 scripts/qgis_fixes/fix_print_with_import.py
  38. +1 −0 scripts/qgis_fixes/fix_raise.py
  39. +1 −0 scripts/qgis_fixes/fix_raw_input.py
  40. +1 −0 scripts/qgis_fixes/fix_reduce.py
  41. +1 −0 scripts/qgis_fixes/fix_renames.py
  42. +1 −0 scripts/qgis_fixes/fix_repr.py
  43. +1 −0 scripts/qgis_fixes/fix_standarderror.py
  44. +1 −0 scripts/qgis_fixes/fix_sys_exc.py
  45. +1 −0 scripts/qgis_fixes/fix_throw.py
  46. +1 −0 scripts/qgis_fixes/fix_tuple_params.py
  47. +1 −0 scripts/qgis_fixes/fix_types.py
  48. +1 −0 scripts/qgis_fixes/fix_ws_comma.py
  49. +1 −0 scripts/qgis_fixes/fix_xrange_with_import.py
  50. +1 −0 scripts/qgis_fixes/fix_xreadlines.py
  51. +1 −0 scripts/qgis_fixes/fix_zip.py
@@ -0,0 +1,76 @@
#!/usr/bin/perl
use strict;
use warnings;

for my $fix (qw/
lib2to3.fixes.fix_apply
lib2to3.fixes.fix_basestring
lib2to3.fixes.fix_dict
lib2to3.fixes.fix_except
lib2to3.fixes.fix_exec
lib2to3.fixes.fix_exitfunc
lib2to3.fixes.fix_filter
lib2to3.fixes.fix_funcattrs
lib2to3.fixes.fix_getcwdu
lib2to3.fixes.fix_has_key
lib2to3.fixes.fix_idioms
lib2to3.fixes.fix_input
lib2to3.fixes.fix_intern
lib2to3.fixes.fix_isinstance
lib2to3.fixes.fix_itertools
lib2to3.fixes.fix_itertools_imports
lib2to3.fixes.fix_long
lib2to3.fixes.fix_map
lib2to3.fixes.fix_methodattrs
lib2to3.fixes.fix_ne
lib2to3.fixes.fix_nonzero
lib2to3.fixes.fix_numliterals
lib2to3.fixes.fix_operator
lib2to3.fixes.fix_paren
lib2to3.fixes.fix_raw_input
lib2to3.fixes.fix_reduce
lib2to3.fixes.fix_renames
lib2to3.fixes.fix_repr
lib2to3.fixes.fix_standarderror
lib2to3.fixes.fix_sys_exc
lib2to3.fixes.fix_throw
lib2to3.fixes.fix_tuple_params
lib2to3.fixes.fix_types
lib2to3.fixes.fix_ws_comma
lib2to3.fixes.fix_xreadlines
lib2to3.fixes.fix_zip
libfuturize.fixes.fix_absolute_import
libfuturize.fixes.fix_cmp
libfuturize.fixes.fix_execfile
libfuturize.fixes.fix_future_builtins
libfuturize.fixes.fix_future_standard_library
libfuturize.fixes.fix_future_standard_library_urllib
libfuturize.fixes.fix_metaclass
libfuturize.fixes.fix_next_call
libfuturize.fixes.fix_object
libfuturize.fixes.fix_print_with_import
libfuturize.fixes.fix_raise
libfuturize.fixes.fix_xrange_with_import
libpasteurize.fixes.fix_division
libpasteurize.fixes.fix_newstyle
/) {
my($f) = $fix =~ /\.(fix_.*)$/;
next if -f "scripts/qgis_fixes/$f.py";

my $p = $fix;
$p =~ s#\.#/#g;

open F, "/usr/lib/python2.7/$p.py" or open F, "/usr/lib/python2.7/dist-packages/$p.py" or die "$p not found";
my $c;
while(<F>) {
last if ($c) = /^class (Fix[^(:]+)[(:]/;
}
close F;

print "$p.py => scripts/qgis_fixes/$f.py\n";
open F, ">scripts/qgis_fixes/$f.py";
print F "from $fix import $c\n";
close F;
}
@@ -0,0 +1 @@
from libfuturize.fixes.fix_absolute_import import FixAbsoluteImport
@@ -0,0 +1 @@
from lib2to3.fixes.fix_apply import FixApply
@@ -0,0 +1 @@
from lib2to3.fixes.fix_basestring import FixBasestring
@@ -0,0 +1 @@
from libfuturize.fixes.fix_cmp import FixCmp
@@ -0,0 +1 @@
from libpasteurize.fixes.fix_division import FixDivision
@@ -0,0 +1 @@
from lib2to3.fixes.fix_except import FixExcept
@@ -0,0 +1 @@
from lib2to3.fixes.fix_exec import FixExec
@@ -0,0 +1 @@
from libfuturize.fixes.fix_execfile import FixExecfile
@@ -0,0 +1 @@
from lib2to3.fixes.fix_exitfunc import FixExitfunc
@@ -0,0 +1 @@
from lib2to3.fixes.fix_filter import FixFilter
@@ -0,0 +1 @@
from lib2to3.fixes.fix_funcattrs import FixFuncattrs
@@ -0,0 +1 @@
from libfuturize.fixes.fix_future_builtins import FixFutureBuiltins
@@ -0,0 +1 @@
from libfuturize.fixes.fix_future_standard_library import FixFutureStandardLibrary
@@ -0,0 +1 @@
from libfuturize.fixes.fix_future_standard_library_urllib import FixFutureStandardLibraryUrllib
@@ -0,0 +1 @@
from lib2to3.fixes.fix_getcwdu import FixGetcwdu
@@ -0,0 +1 @@
from lib2to3.fixes.fix_has_key import FixHasKey
@@ -0,0 +1 @@
from lib2to3.fixes.fix_idioms import FixIdioms

This file was deleted.

@@ -0,0 +1 @@
from lib2to3.fixes.fix_input import FixInput
@@ -0,0 +1 @@
from lib2to3.fixes.fix_intern import FixIntern
@@ -0,0 +1 @@
from lib2to3.fixes.fix_isinstance import FixIsinstance
@@ -0,0 +1 @@
from lib2to3.fixes.fix_itertools import FixItertools
@@ -0,0 +1 @@
from lib2to3.fixes.fix_itertools_imports import FixItertoolsImports
@@ -0,0 +1 @@
from lib2to3.fixes.fix_long import FixLong
@@ -0,0 +1 @@
from lib2to3.fixes.fix_map import FixMap
@@ -0,0 +1 @@
from libfuturize.fixes.fix_metaclass import FixMetaclass
@@ -0,0 +1 @@
from lib2to3.fixes.fix_methodattrs import FixMethodattrs
@@ -0,0 +1 @@
from lib2to3.fixes.fix_ne import FixNe
@@ -0,0 +1 @@
from libpasteurize.fixes.fix_newstyle import FixNewstyle
@@ -0,0 +1 @@
from libfuturize.fixes.fix_next_call import FixNextCall
@@ -0,0 +1 @@
from lib2to3.fixes.fix_nonzero import FixNonzero
@@ -0,0 +1 @@
from lib2to3.fixes.fix_numliterals import FixNumliterals
@@ -0,0 +1 @@
from libfuturize.fixes.fix_object import FixObject
@@ -0,0 +1 @@
from lib2to3.fixes.fix_operator import FixOperator
@@ -0,0 +1 @@
from lib2to3.fixes.fix_paren import FixParen
@@ -0,0 +1 @@
from libfuturize.fixes.fix_print_with_import import FixPrintWithImport
@@ -0,0 +1 @@
from libfuturize.fixes.fix_raise import FixRaise
@@ -0,0 +1 @@
from lib2to3.fixes.fix_raw_input import FixRawInput
@@ -0,0 +1 @@
from lib2to3.fixes.fix_reduce import FixReduce
@@ -0,0 +1 @@
from lib2to3.fixes.fix_renames import FixRenames
@@ -0,0 +1 @@
from lib2to3.fixes.fix_repr import FixRepr
@@ -0,0 +1 @@
from lib2to3.fixes.fix_standarderror import FixStandarderror
@@ -0,0 +1 @@
from lib2to3.fixes.fix_sys_exc import FixSysExc
@@ -0,0 +1 @@
from lib2to3.fixes.fix_throw import FixThrow
@@ -0,0 +1 @@
from lib2to3.fixes.fix_tuple_params import FixTupleParams
@@ -0,0 +1 @@
from lib2to3.fixes.fix_types import FixTypes
@@ -0,0 +1 @@
from lib2to3.fixes.fix_ws_comma import FixWsComma
@@ -0,0 +1 @@
from libfuturize.fixes.fix_xrange_with_import import FixXrangeWithImport
@@ -0,0 +1 @@
from lib2to3.fixes.fix_xreadlines import FixXreadlines
@@ -0,0 +1 @@
from lib2to3.fixes.fix_zip import FixZip

0 comments on commit fb9d60d

Please sign in to comment.
You can’t perform that action at this time.