kr.motd.maven.sphinx.dist.libpasteurize.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__ ?
pasteurize: automatic conversion of Python 3 code to clean 2/3 code
===================================================================
``pasteurize`` attempts to convert existing Python 3 code into source-compatible
Python 2 and 3 code.
Use it like this on Python 3 code:
$ pasteurize --verbose mypython3script.py
This removes any Py3-only syntax (e.g. new metaclasses) and adds these
import lines:
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
from future import standard_library
standard_library.install_hooks()
from builtins import *
To write changes to the files, use the -w flag.
It also adds any other wrappers needed for Py2/3 compatibility.
Note that separate stages are not available (or needed) when converting from
Python 3 with ``pasteurize`` as they are when converting from Python 2 with
``futurize``.
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 '
( sys * importOne H(Ljava/lang/String;Lorg/python/core/PyFrame;I)Lorg/python/core/PyObject; , -
" . logging 0 optparse 2 lib2to3.main 4 main 6 warn 8 StdoutRefactoringTool : lib2to3 < refactor > future @ __version__ B libpasteurize.fixes D fix_names F org/python/core/PyObject H None J getname .(Ljava/lang/String;)Lorg/python/core/PyObject; L M
N org/python/core/PyFunction P f_globals Lorg/python/core/PyObject; R S T main$1 BMain program.
Returns a suggested exit status (0, 1, 2).
W org/python/core/PyUnicode Y /(Ljava/lang/String;)Lorg/python/core/PyUnicode; [
Z \ getglobal ^ M
_ OptionParser a __getattr__ c M
I d !pasteurize [options] file|dir ... f usage h __call__ g(Lorg/python/core/ThreadState;[Lorg/python/core/PyObject;[Ljava/lang/String;)Lorg/python/core/PyObject; j k
I l (ILorg/python/core/PyObject;)V ' n
o getlocal (I)Lorg/python/core/PyObject; q r
s
add_option u -V w --version y
store_true { 'Report the version number of pasteurize } action help ? -a ?
--all-imports ? 5Adds all __future__ and future imports to each module ? -f ? --fix ? append ? org/python/core/PyList ? org/python/core/Py ? EmptyObjects [Lorg/python/core/PyObject; ? ? ? ? ([Lorg/python/core/PyObject;)V ? ?
? ? 1Each FIX specifies a transformation; default: all ? 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 ? -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. ? org/python/core/PyDictionary ?
? ?
parse_args ? S(Lorg/python/core/ThreadState;Lorg/python/core/PyObject;)Lorg/python/core/PyObject; j ?
I ? unpackSequence 8(Lorg/python/core/PyObject;I)[Lorg/python/core/PyObject; ? ?
? ? setderef ? n
? True ? __setitem__ 7(Lorg/python/core/PyObject;Lorg/python/core/PyObject;)V ? ?
I ? write ? __not__ ()Lorg/python/core/PyObject; ? ?
I ? __nonzero__ ()Z ? ?
I ? no_diffs ? @not writing files and not printing diffs; that's not very useful ? nobackups ? error ? Can't use -n without -w ? version ? print ? f_lasti I
list_fixes 2Available transformations for the -f/--fix option: sorted __iter__
?
I __iternext__
?
I 1At least one file or directory argument required. stderr file Use --help to show usage. - _in 6(Lorg/python/core/PyObject;)Lorg/python/core/PyObject;
I Can't write to stdin. verbose DEBUG" INFO$ basicConfig& %(name)s: %(message)s( format* level, set. f$2 getderef1 r
2 .fix_4 _add6
I7 java/lang/Object9
f_savedlocals [Ljava/lang/Object;;< = getGeneratorInput ()Ljava/lang/Object;?@
A org/python/core/PyExceptionC java/lang/ThrowableE J S ?G libpasteurize/main$pyI Lorg/python/core/PyCode;0K JL
getclosureN r
O ?(Lorg/python/core/PyObject;[Lorg/python/core/PyObject;Lorg/python/core/PyCode;Lorg/python/core/PyObject;[Lorg/python/core/PyObject;)V ?Q
QR nofixT java/util/ArraysV fill (([Ljava/lang/Object;Ljava/lang/Object;)VXY
WZ 9(Lorg/python/core/ThreadState;)Lorg/python/core/PyObject; j\
I] all_imports_ libpasteurize.fixes.a addc fix_add_all__future__importse &fix_add_future_standard_library_importg fix_add_all_future_builtinsi _subk
Il _orn
Io T(Lorg/python/core/ThreadState;[Lorg/python/core/PyObject;)Lorg/python/core/PyObject; jq
Ir errorst refactor_stdinv processesx ?(Lorg/python/core/ThreadState;Lorg/python/core/PyObject;Lorg/python/core/PyObject;Lorg/python/core/PyObject;Lorg/python/core/PyObject;)Lorg/python/core/PyObject; jz
I{ setException M(Ljava/lang/Throwable;Lorg/python/core/PyFrame;)Lorg/python/core/PyException;}~
? MultiprocessingUnsupported? match (Lorg/python/core/PyObject;)Z??
D? __debug__? _gt?
I? AssertionError?
makeException S(Lorg/python/core/PyObject;Lorg/python/core/PyObject;)Lorg/python/core/PyException;??
?? +Sorry, -j isn't supported on this platform.? summarize? bool? VK J? j(Lorg/python/core/PyObject;[Lorg/python/core/PyObject;Lorg/python/core/PyCode;Lorg/python/core/PyObject;)V ??
Q? (Ljava/lang/String;)V org/python/core/PyFunctionTable? ()V ??
?? self Llibpasteurize/main$py;?? J? ? 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;??
?? K J? args? parser? flags? options? avail_fixes? fixname? unwanted_fixes? _(118_25)? extra_fixes? prefix? fixer_names? rt? fixer_pkg? _(x)? fix? ? getMain ()Lorg/python/core/PyCode; ([Ljava/lang/String;)VI ??
J???
J? 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;
J? V
J?0
J? org/python/core/PyRunnable? Lorg/python/compiler/APIVersion; value % Lorg/python/compiler/MTime; `9 K? Lorg/python/compiler/Filename; \/home/trustin/Workspaces/sphinx-maven-plugin/target/update-sphinx/dist/libpasteurize/main.py org/python/core/ThreadState? ?< Code LineNumberTable StackMap
SourceFile RuntimeVisibleAnnotations !J? ? ?? K VK 0K ? ? ?+? ? +%? ? W+'? ? N-S-S- S-+? &N-2:+? ):-2:+? ):-2:+ ? ):+)? ++? /N++-? )N+*? 1+? /N+1-? )N++? 3+? /N+3-? )N+,? 5? N-7S-9S-;S-+? &N-2:+7? ):-2:+9? ):-2:+;? ):+-? =? N-?S-+? &N-2:+?? ):+/? A? N-CS-+? &N-2:+C? ):+0? E? N-GS-+? &N-2:+G? ):+3? ? IN+K? O-__S? QY+? U-??X? ]??N+7-? )N+??H? *
% ' ) * + , - / 0 3 V ? ?+7? X? ]W+9? +3? `b? e,? INg? ]-__S? :iS-? mNN+-? pN+:? +? tv? e,? INx? ]-__Sz? ]-__S|? ]-__S~? ]-__S? :?S?S-? mNW+