kr.motd.maven.sphinx.dist.libfuturize.main$py.class Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sphinx-maven-plugin Show documentation
Show all versions of sphinx-maven-plugin Show documentation
Maven plugin that creates the site with Sphinx
???? 1? f$0 R(Lorg/python/core/PyFrame;Lorg/python/core/ThreadState;)Lorg/python/core/PyObject; __doc__ ?
futurize: automatic conversion to clean 2/3 code using ``python-future``
======================================================================
Like Armin Ronacher's modernize.py, ``futurize`` attempts to produce clean
standard Python 3 code that runs on both Py2 and Py3.
One pass
--------
Use it like this on Python 2 code:
$ futurize --verbose mypython2script.py
This will attempt to port the code to standard Py3 code that also
provides Py2 compatibility with the help of the right imports from
``future``.
To write changes to the files, use the -w flag.
Two stages
----------
The ``futurize`` script can also be called in two separate stages. First:
$ futurize --stage1 mypython2script.py
This produces more modern Python 2 code that is not yet compatible with Python
3. The tests should still run and the diff should be uncontroversial to apply to
most Python projects that are willing to drop support for Python 2.5 and lower.
After this, the recommended approach is to explicitly mark all strings that must
be byte-strings with a b'' prefix and all text (unicode) strings with a u''
prefix, and then invoke the second stage of Python 2 to 2/3 conversion with::
$ futurize --stage2 mypython2script.py
Stage 2 adds a dependency on ``future``. It converts most remaining Python
2-specific code to Python 3 code and adds appropriate imports from ``future``
to restore Py2 support.
The command above leaves all unadorned string literals as native strings
(byte-strings on Py2, unicode strings on Py3). If instead you would like all
unadorned string literals to be promoted to unicode, you can also pass this
flag:
$ futurize --stage2 --unicode-literals mypython2script.py
This adds the declaration ``from __future__ import unicode_literals`` to the
top of each file, which implicitly declares all unadorned string literals to be
unicode strings (``unicode`` on Py2).
All imports
-----------
The --all-imports option forces adding all ``__future__`` imports,
``builtins`` imports, and standard library aliases, even if they don't
seem necessary for the current state of each module. (This can simplify
testing, and can reduce the need to think about Py2 compatibility when editing
the code further.)
org/python/core/PyString fromInterned .(Ljava/lang/String;)Lorg/python/core/PyString;
org/python/core/PyFrame
setglobal /(Ljava/lang/String;Lorg/python/core/PyObject;)V
setline (I)V
__future__ java/lang/String absolute_import print_function unicode_literals org/python/core/imp !
importFrom \(Ljava/lang/String;[Ljava/lang/String;Lorg/python/core/PyFrame;I)[Lorg/python/core/PyObject; # $
" % setlocal '
( future.utils * importOne H(Ljava/lang/String;Lorg/python/core/PyFrame;I)Lorg/python/core/PyObject; , -
" . future 0 __version__ 2 sys 4 logging 6 optparse 8 os : lib2to3.main < main > warn @ StdoutRefactoringTool B lib2to3 D refactor F libfuturize.fixes H lib2to3_fix_names_stage1 J lib2to3_fix_names_stage2 L libfuturize_fix_names_stage1 N libfuturize_fix_names_stage2 P org/python/core/PyUnicode R /(Ljava/lang/String;)Lorg/python/core/PyUnicode; T
S U fixer_pkg W org/python/core/PyObject Y None [ getname .(Ljava/lang/String;)Lorg/python/core/PyObject; ] ^
_ org/python/core/PyFunction a f_globals Lorg/python/core/PyObject; c d e main$1 ?Main program.
Args:
fixer_pkg: the name of a package where the fixers are located.
args: optional; a list of command line arguments. If omitted,
sys.argv[1:] is used.
Returns a suggested exit status (0, 1, 2).
h getglobal j ^
k OptionParser m __getattr__ o ^
Z p futurize [options] file|dir ... r usage t __call__ g(Lorg/python/core/ThreadState;[Lorg/python/core/PyObject;[Ljava/lang/String;)Lorg/python/core/PyObject; v w
Z x (ILorg/python/core/PyObject;)V ' z
{ getlocal (I)Lorg/python/core/PyObject; } ~
add_option ? -V ? --version ?
store_true ? %Report the version number of futurize ? action ? help ? -a ?
--all-imports ? 4Add all __future__ and future imports to each module ? -1 ? --stage1 ? ZModernize Python 2 code only; no compatibility with Python 3 (or dependency on ``future``) ? -2 ? --stage2 ? ^Take modernized (stage1) code and add a dependency on ``future`` to provide Py3 compatibility. ? -0 ?
--both-stages ? Apply both stages 1 and 2 ? -u ? --unicode-literals ? {Add ``from __future__ import unicode_literals`` to implicitly convert all unadorned string literals '' into unicode strings ? -f ? --fix ? append ? org/python/core/PyList ? org/python/core/Py ? EmptyObjects [Lorg/python/core/PyObject; ? ? ? ? ([Lorg/python/core/PyObject;)V ? ?
? ? ?Each FIX specifies a transformation; default: all.
Either use '-f division -f metaclass' etc. or use the fully-qualified module name: '-f lib2to3.fixes.fix_types -f libfuturize.fixes.fix_unicode_keep_u' ? default ? -j ? --processes ? store ?
newInteger (I)Lorg/python/core/PyInteger; ? ?
? ? int ? Run 2to3 concurrently ? type ? -x ? --nofix ? Prevent a fixer from being run. ? -l ? --list-fixes ? List available transformations ? -p ? --print-function ? 0Modify the grammar so that print() is a function ? -v ? --verbose ? More verbose logging ?
--no-diffs ? #Don't show diffs of the refactoring ? -w ? --write ? Write back modified files ? -n ? --nobackups ? False ? 'Don't write backups for modified files. ? -o ? --output-dir ? str pPut output files in this directory instead of overwriting the input files. Requires -n. For Python >= 2.7 only. -W --write-unchanged-files YAlso write files even if no changes were required (useful with --output-dir); implies -w. --add-suffix
?Append this string to all output filenames. Requires -n if non-empty. For Python >= 2.7 only.ex: --add-suffix='3' will generate .py3 files. org/python/core/PyDictionary
?
parse_args S(Lorg/python/core/ThreadState;Lorg/python/core/PyObject;)Lorg/python/core/PyObject; v
Z unpackSequence 8(Lorg/python/core/PyObject;I)[Lorg/python/core/PyObject;
? write_unchanged_files __nonzero__ ()Z
Z! True# __setitem__ 7(Lorg/python/core/PyObject;Lorg/python/core/PyObject;)V%&
Z' write) __not__ ()Lorg/python/core/PyObject;+,
Z- &--write-unchanged-files/-W implies -w./ __setattr__1
Z2
output_dir4 nobackups6 error8 %Can't use --output-dir/-o without -n.:
add_suffix< "Can't use --add-suffix without -n.> no_diffs@ @not writing files and not printing diffs; that's not very usefulB Can't use -n without -wD -F _in 6(Lorg/python/core/PyObject;)Lorg/python/core/PyObject;HI
ZJ printL Can't write to stdin.N stderrP fileR f_lasti ITU V verboseX DEBUGZ INFO\ basicConfig^ %(name)s: %(message)s` formatb leveld getLoggerf libfuturize.mainh stage1j stage2l __debug__n both_stagesp _isrI
Zs [ d ?u AssertionErrorw
makeException S(Lorg/python/core/PyObject;Lorg/python/core/PyObject;)Lorg/python/core/PyException;yz
?{ set} 9(Lorg/python/core/ThreadState;)Lorg/python/core/PyObject; v
Z? update? add? -libfuturize.fixes.fix_unicode_literals_import? version?
list_fixes? 2Available transformations for the -f/--fix option:? sorted? __iter__?,
Z? __iternext__?,
Z? 1At least one file or directory argument required.? Use --help to show usage.? f$2 .fix_? _add?I
Z? java/lang/Object?
f_savedlocals [Ljava/lang/Object;?? ? getGeneratorInput ()Ljava/lang/Object;??
? org/python/core/PyException? java/lang/Throwable? libfuturize/main$py? Lorg/python/core/PyCode;?? ?? j(Lorg/python/core/PyObject;[Lorg/python/core/PyObject;Lorg/python/core/PyCode;Lorg/python/core/PyObject;)V ??
b? nofix? java/util/Arrays? fill (([Ljava/lang/Object;Ljava/lang/Object;)V??
?? all_imports? libfuturize.fixes.? 0fix_add__future__imports_except_unicode_literals? libpasteurize.fixes.? fix_add_all__future__imports? &fix_add_future_standard_library_import? fix_add_all_future_builtins? fix? all? _eq?I
Z? ()V ??
?? endswith? fix_{0}? dellocal?
? len? _gt?I
Z? OAmbiguous fixer name. Choose a fully qualified module name instead from these:
?
? join? f$3 ??? ?? 1Unknown fixer. Use --list-fixes or -l for a list.? __getitem__?I
Z? _and?I
Z? [Conflicting usage: the following fixers have been simultaneously requested and disallowed:
? f$4?? ?? union? _or?I
Z? _sub?I
Z path commonprefix sep isdir dirname
rstrip info 7Output in %r will mirror the input directory %r layout. ?(Lorg/python/core/ThreadState;Lorg/python/core/PyObject;Lorg/python/core/PyObject;Lorg/python/core/PyObject;)Lorg/python/core/PyObject; v
Z utils PY26
append_suffix input_base_dir
_callextra ~([Lorg/python/core/PyObject;[Ljava/lang/String;Lorg/python/core/PyObject;Lorg/python/core/PyObject;)Lorg/python/core/PyObject;
Z errors! refactor_stdin# processes% ?(Lorg/python/core/ThreadState;Lorg/python/core/PyObject;Lorg/python/core/PyObject;Lorg/python/core/PyObject;Lorg/python/core/PyObject;)Lorg/python/core/PyObject; v'
Z( setException M(Ljava/lang/Throwable;Lorg/python/core/PyFrame;)Lorg/python/core/PyException;*+
?, MultiprocessingUnsupported. match (Lorg/python/core/PyObject;)Z01
?2 +Sorry, -j isn't supported on this platform.4 summarize6 bool8 g? ?: (Ljava/lang/String;)V org/python/core/PyFunctionTable=
>? self Llibfuturize/main$py;@A ?B D newCode ?(I[Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;IZZLorg/python/core/PyFunctionTable;I[Ljava/lang/String;[Ljava/lang/String;II)Lorg/python/core/PyCode;FG
?H ? ?J argsL parserN flagsP optionsR loggerT avail_fixesV fixnameX unwanted_fixesZ _(208_25)\ extra_fixes^ prefix` explicitb all_presentd foundf _[235_29]h fj _(240_40)l _(251_28)n requestedp fixer_namesr extra_kwargst rtv _(x)x z myf| getMain ()Lorg/python/core/PyCode; ([Ljava/lang/String;)V? ?<
??~
?? org/python/core/CodeLoader? createSimpleBootstrap 9(Lorg/python/core/PyCode;)Lorg/python/core/CodeBootstrap;??
?? runMain 5(Lorg/python/core/CodeBootstrap;[Ljava/lang/String;)V??
?? getCodeBootstrap !()Lorg/python/core/CodeBootstrap; #org/python/core/PyRunnableBootstrap? )getFilenameConstructorReflectionBootstrap 2(Ljava/lang/Class;)Lorg/python/core/CodeBootstrap;??
??
call_function S(ILorg/python/core/PyFrame;Lorg/python/core/ThreadState;)Lorg/python/core/PyObject;
?? g
???
???
???
?? org/python/core/PyRunnable? Lorg/python/compiler/APIVersion; value % Lorg/python/compiler/MTime; `9 K? Lorg/python/compiler/Filename; Z/home/trustin/Workspaces/sphinx-maven-plugin/target/update-sphinx/dist/libfuturize/main.py org/python/core/ThreadState? ? [Ljava/lang/String;?? Code LineNumberTable StackMap
SourceFile RuntimeVisibleAnnotations !?> ? @A ? g? ?? ?? ??
? ? <+? ? +>? ? W+@? ? N-S-S- S-+? &N-2:+? ):-2:+? ):-2:+ ? ):+A? ++? /N+1-? )N+B? 1? N-3S-+? &N-2:+3? ):+D? 5+? /N+5-? )N+E? 7+? /N+7-? )N+F? 9+? /N+9-? )N+G? ;+? /N+;-? )N+I? =? N-?S-AS-CS-+? &N-2:+?? ):-2:+A? ):-2:+C? ):+J? E? N-GS-+? &N-2:+G? ):+L? I? N-KS-MS-OS-QS-+? &N-2:+K? ):-2:+M? ):-2:+O? ):-2:+Q? ):+Q? I? VN+X-? )N+T? ? ZN+\? `-__S? bY+? f-?;i? V??N+?-? )N+?W?v? ? 6
> @ A B D E F G I J L Q T g ? ? ?+]? i? VW+`? +9? ln? q,? ZNs? V-__S? :uS-? yNN+-? |N+a? +? ??? q,? ZN?? V-__S?? V-__S?? V-__S?? V-__S? :?S?S-? yNW+c? +? ??? q,? ZN?? V-__S?? V-__S?? V-__S?? V-__S? :?S?S-? yNW+e? +? ??? q,? ZN?? V-__S?? V-__S?? V-__S?? V-__S? :?S?S-? yNW+g? +? ??? q,? ZN?? V-__S?? V-__S?? V-__S?? V-__S? :?S?S-? yNW+i? +? ??? q,? ZN?? V-__S?? V-__S?? V-__S?? V-__S? :?S?S-? yNW+k? +? ??? q,? ZN?? V-__S?? V-__S?? V-__S?? V-__S? :?S?S-? yNW+m? +? ??? q,? ZN?? V-__S?? V-__S?? V-__S? ?Y? ?? ?-__S?? V-__S? :?S?S?S-? yNW+o? +? ??? q,? ZNĸ V-__SƸ V-__Sȸ V-__S? ?-__Sθ V-__Sи V-__S? :?S?S?S?S-? yNW+q? +? ??? q,? ZNԸ V-__Sָ V-__S?? V-__S? ?Y? ?? ?-__Sظ V-__S? :?S?S?S-? yNW+s? +? ??? q,? ZNڸ V-__Sܸ V-__S?? V-__S V-__S? :?S?S-? yNW+u? +? ??? q,? ZN? V-__S? V-__S?? V-__S? V-__S? :?S?S-? yNW+w? +? ??? q,? ZN? V-__S? V-__S?? V-__S? V-__S? :?S?S-? yNW+y? +? ??? q,? ZN? V-__S?? V-__S? V-__S? :?S?S-? yNW+{? +? ??? q,? ZN? V-__S? V-__S?? V-__S?? V-__S? :?S?S-? yNW+}? +? ??? q,? ZN?? V-__S?? V-__S?? V-__S+?? l-__S?? V-__S? :?S?S?S-? yNW+? +? ??? q,? ZN?? V-__S ? V-__Sȸ V-__S? V-__S? V-__S? V-__S? :?S?S?S?S-? yNW+ ?? +? ??? q,? ZN? V-__S
? V-__S?? V-__S? V-__S? :?S?S-? yNW+ ?? +? ??? q,? ZN? V-__Sȸ V-__S? V-__S? V-__S? V-__S? :?S?S?S?S-? yNW+ ?? ?Y? ??N+-? |N+ ?? +?? lN+-? |N+ ?? +? ?? q,+? ??N-?:2:+? |:2:+? |:N+ ?? +? ?? q?"? y+ ?? +$? lN+? ?? V-?(N+ ?? +? ?*? q?.?"? + ?? +A? l,0? V?W? + ?? +$? lN+? ?*-?3N? + ?? +? ?5? qY?"? W+? ?7? q?.?"? #+ ?? +? ?9? q,;? V?W? + ?? +? ?=? qY?"? W+? ?7? q?.?"? #+ ?? +? ?9? q,?? V?W? + ?? +? ?*? q?.Y?"? W+? ?A? q?"? + ?? +A? l,C? V?W? + ?? +? ?*? q?.Y?"? W+? ?7? q?"? #+ ?? +? ?9? q,E? V?W? + ?? G? VN+? ?-_?KN?"? ?+ ?? +$? lN+-? |N+ ?? +? ?*? q?"? \+ ?? +M? l,? ZNO? V-__S+5? lQ? q-__S? :SS-? yNW+ ?? ? ?N+?W-?? + ?? +? ?? q?"? (+ ?? +$? l:+? ?? V?(:? + ?? + ?? +? ?Y? q?"? +7? l[? q? +7? l]? q:+? |:+ ?? +7? l_? q,? Z:a? V__S+? ?__S? :cSeS? y:W+ ?? +7? lg? q,i? V?:+? |:+ ?? +? ?k? qY?"? W+? ?m? q?"? j+ ?? +o? l?"? 4+? ?q? q:+\? l_?t:?"? ?v+x? l_?|?+ ?? +?? l:+? ?q?3:? #+ ?? +$? l:+? ?q?3:+ ?? +~? l,??:+? |:+ ?? +? ?k? qY?"? W+? ?q? q?"? B+ ?? +? ??? q,+K? l?W+ ?? +? ??? q,+O? l?W? + ?? +? ?m? qY?"? W+? ?q? q?"? B+ ?? +? ??? q,+M? l?W+ ?? +? ??? q,+Q? l?W? + ?? +? ? ? q?"? $+ ?? +? ??? q,?? V?W? + ?? +? ??? q?"? /+ ?? +M? l,+3? l?W+ ¶ ? ?N+?W-?+ ö +? ??? q?"? ?+ Ķ +M? l,?? V?W+ ƶ +?? l,+? ????:? $+? |+ Ƕ +M? l,+? ??W+ ƶ ??:???+ ȶ +? ??.?"? + ɶ ? ?N+?W-?? + ʶ +? ??.?"? ?+ ˶ +M? l,? Z:?? V__S+5? lQ? q__S? :SS? y:W+ Ͷ +M? l,? Z:?? V__S+5? lQ? q__S? :SS? y:W+ ζ ? ?N+?W-?+ ж +~? l,+ ж ? bY+? f? ?:????:+? ??? q_??,_????:+ ? |:+ Ҷ +~? l,??:+? |:+ Ӷ +? ??? q?"? ?+ Զ +? ?k? q?"? G+ ն ?? V:+? |:+ ֶ +? ??? q,+? ?ø V???W? ?+ ڶ Ÿ V:+? |:+ ۶ +? ??? q,+? ?Ǹ V???W+ ܶ +? ??? q,+? ?ɸ V???W+ ݶ +? ??? q,+? ?˸ V???W? + +~? l,??:+
? |:+ ߶ +? ?Ͷ q?"?E+ ? +?? l:+? |:+ ? +? ?Ͷ q??:??+? |+ ? +? ?:ϸ V_??:?"? !+ ? +$? l:+? |:??+ ? ?? V:+? ?_?K:?"? $+ ? +
? ??? q,+? ??W?@+ ? ? ?Y??Y?? q:+? |:+ ? +? ???:? Y+? |+ ? +? ? q,ٸ Vc? q,+? ????"? + ? +? ?,+? ??W? + ? ??:???+ ? +??:+? |:+ ?? + l,+? ??:? ?_??:?"? ?+ ? +M? l,? Z:? V? V? q,+ ? ? bY+? f? ?:????:+? ?_??,_??????__S+5? lQ? q__S? :SS? y:W+ ? ? ?N+?W-?+ ? + l,+? ??:? ?_??:?"? a+ ?? +M? l,? Z:? V__S+5? lQ? q__S? :SS? y:W+ ?? ? ?N+?W-?+ ?? +
? ??? q,+? ?? ̶?W+ ? ??:??$+ ?? + l,+
? ?+ ? ????:? ?_??:?"? ?+ ?? +M? l,? Z:?? V? V? q,+ ?? ? bY+? f? ?:????:+
? ?+ ? ???_??,_??????__S+5? lQ? q__S? :SS? y:W+ ?? ? ?N+?W-?+ ?? + ?? +? ??"? +? ??? q,+
? ??? +
? ?:+? |:? -+ ? +? ??? q,+
? ??:+? |:+? +? ?+? ???+ ? ??:+? |:+? +;? l? q? q,+? ??:+? |:+? +? ?Y?"? JW+? ? q,+;? l? q??.Y?"? #W+;? l? q ? q,+? ???.?"? 6+ ? +;? l? q? q,+? ??:+? |:? +
? +? ?5? q?"? e+? +? ?
? q,+;? l? q?:+? |:+? +? ?? q,? V+? ?5? q+? ??W? +? +1? l? q? q?"? $+? ?Y? ??:+? |:? c+? ?Y? ZY? VSY+? ?=? qSY5? VSY+? ?5? qSY? VSY+? ?S?:+? |:+? +C? l? Z:+?? l,+? ??__S+? ?__S+?? l,+
? ??__S+? ?7? q__S+? ?A? q?.__S? :+? ?^X? ::+? |:+? +? ?"? q?.?"?G+ ? +? ??"? +!? +? ?$? q,??W? ?+$? +? ?G? q,+? ?+? ?*? q+\? l+? ?&? q?)W? ?+?-:+G? l/? q?3? ?+'? +o? l?"? 2+? ?&? q:? ?_??:?"? ?v+x? l_?|?+(? +M? l,? Z:5? V__S+5? lQ? q__S? :SS? y:W+*? ? ?N+?W-? ??++? +? ?7? q,??W? +.? +ζ l,+9? l,+? ?"? q??N+?W-? ???? ? ? ] ` a c e g i k m o q s u w y { } ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?
! $ ' ( * + .? ? : ? ?? $ ? ?? L ? ?? Zr ? ?? ? ? ?? Z? ? ?? ? ? ?? Z ? ?? 1 ? ?? Z W ? ?? ? ? ??
? ??
> ? ??
l ? ??
x ? ?? Z# ? ?? Zn ? ?? ? ? ?? ? ? ?? ? ? ?? Z9 ? ?? ^ ? ?? Z? ? ?? ? ? ??
? ??
p ? ? Z Z
? ? ? Z?
? ? ? Z Z
? ? ? Z? ? ? ? Z? z ? ? b ? ? b ? ? b w ? ? Z Z ? ? ? Z Z ? ? Z Z <