bg rdZddlmZddlZddlmZddlmZmZe Z e Z e e dfdZ dZd Zd gZdS) ah This module provides a newsuper() function in Python 2 that mimics the behaviour of super() in Python 3. It is designed to be used as follows: from __future__ import division, absolute_import, print_function from future.builtins import super And then, for example: class VerboseList(list): def append(self, item): print('Adding an item') super().append(item) # new simpler super() function Importing this module on Python 3 has no effect. This is based on (i.e. almost identical to) Ryan Kelly's magicsuper module here: https://github.com/rfk/magicsuper.git Excerpts from Ryan's docstring: "Of course, you can still explicitly pass in the arguments if you want to do something strange. Sometimes you really do want that, e.g. to skip over some classes in the method resolution order. "How does it work? By inspecting the calling frame to determine the function object being executed and the object on which it's being called, and then walking the object's __mro__ chain to find out where that function was defined. Yuck, but it seems to work..." )absolute_importN) FunctionType)PY3PY26c|turtj|} |j|jjd}n$#t tf$rtdwxYw t||j}nn#tttf$rT t|j |j}n5#t$rtdt$rtdwxYwYnwxYw|turt||St|S)zLike builtin super(), but capable of magic. This acts just like the builtin super() function, but if called without any arguments it attempts to infer them at runtime. rz'super() used in a function with no argsz$super() used with an old-style classzsuper() called outside a method) _SENTINELsys _getframef_localsf_code co_varnames IndexErrorKeyError RuntimeError find_ownerAttributeError TypeError __class___builtin_super)typ type_or_obj framedepthfs i/builddir/build/BUILD/cloudlinux-venv-1.0.7/venv/lib/python3.11/site-packages/future/builtins/newsuper.pynewsuperr-sN i M* % % J*QX%9!%<=KKH& J J JHII I J F[!(33CC i8 F F F F !6AA! K K K"#IJJJ F F F"#DEEE F F)##c;/// #  s3=!A"A88C#B+*C#+2CC#"C#c|jD]}|jD]} t|tsat|t r|j}n/ |j}n&#t$r| ||}YnwxYwt|tan#ttf$rYwxYw|j |ur|ccSt)z=Find the class that owns the currently-executing method. ) __mro____dict__values isinstancerpropertyfget__func__r__get__r func_code)clscodermeths rrrOs {L''))  D $T,77 :!$11 : $y:#'=DD-:::#'<<S#9#9DDD:%T,77 :#I.    ~%% &# * Os52BA! B! BBBBB10B1ctjd}|jj}t t d||i|S)Nr)r)r r r co_namegetattrr)argskwdsrnms rsupermr1ksE aA  B -78q)))" - -t r;sB'&&&&& """""""" FHH  aD8=== ,r2