ok
Direktori : /opt/cloudlinux/venv/lib/python3.11/site-packages/dill/__pycache__/ |
Current File : //opt/cloudlinux/venv/lib/python3.11/site-packages/dill/__pycache__/detect.cpython-311.pyc |
� �܋fS+ � �� � d Z ddlZddlmZmZmZmZmZ ddlm Z m Z mZmZm Z ddlmZ g d�Zdd �Zd � Zdd�Zd � Zdd�Zd� Zdd�Zdd�Zdd�Zd� Zdd�Zdd�Zdd�Zdd�ZdS )z= Methods for detecting objects leading to pickling failures. � N)�ismethod� isfunction�istraceback�isframe�iscode� )�parent� reference�at�parents�children)�trace)�baditems� badobjects�badtypes�code�errors�freevars� getmodule� globalvars� nestedcode� nestedglobals� outermost�referredglobals�referrednestedr �varnamesFc � � ddl m} || |� � }|s|s|S ddl}ddlm} || d�� � }|t |� � � � � v r|ndS )zget the module of the objectr )r Nr )�getnameT)�force)�inspectr �builtins�sourcer �vars�keys)�object� _filenamer �getmod�moduler! r �names �\/builddir/build/BUILD/cloudlinux-venv-1.0.6/venv/lib/python3.11/site-packages/dill/detect.pyr r s� � �+�+�+�+�+�+� �V�F�I� &� &�F� �)�U�)�6�M��O�O�O��������7�6��&�&�&�D��t�H�~�~�2�2�4�4�4�4�8�8�$�>� c � �� t | � � r| j j pi }nt | � � r | j pi }ndS |� � � }ddlm} || d�� � \ }}n# t $ r g d}}Y nw xY wd� |� � ��fd�|D � � }|D ]+\ }} ||� � ||fk r|c S �# t $ r Y �(w xY wdS )z�get outermost enclosing object (i.e. the outer function in a closure) NOTE: this is the object-equivalent of getsource(func, enclosing=True) Nr )�getsourcelinesT)� enclosing� c 3 �. �K � | ]\ }}|�v � ||fV � �d S �N� )�.0r) �objr s �r* � <genexpr>zoutermost.<locals>.<genexpr>3 s/ �� � � �E�E�j�t�C������S�z�����E�Er+ ) r �__func__�__globals__r �itemsr"