ó
Ű¤[c           @   s   d  Z  d d l Z e j d e  d d l Z d d l Z y d d l Z Wn e k
 ri d d l Z n Xd   Z	 d   Z
 e j e j e
  d S(   s  Utilities to enable code objects to be pickled.

Any process that import this module will be able to pickle code objects.  This
includes the func_code attribute of any function.  Once unpickled, new
functions can be built using new.function(code, globals()).  Eventually
we need to automate all of this so that functions themselves can be pickled.

Reference: A. Tremols, P Cogolo, "Python Cookbook," p 302-305
i˙˙˙˙Ns]   ipykernel.codeutil is deprecated since IPykernel 4.3.1. It has moved to ipyparallel.serializec          G   s   t  j |    S(   N(   t   typest   CodeType(   t   args(    (    s1   lib/python2.7/site-packages/ipykernel/codeutil.pyt	   code_ctor   s    c         C   s   |  j  |  j |  j |  j |  j |  j |  j |  j |  j |  j	 |  j
 |  j |  j |  j g } t j d d k r | j d |  j  n  t t |  f S(   Ni    i   i   (   t   co_argcountt
   co_nlocalst   co_stacksizet   co_flagst   co_codet	   co_constst   co_namest   co_varnamest   co_filenamet   co_namet   co_firstlinenot	   co_lnotabt   co_freevarst   co_cellvarst   syst   version_infot   insertt   co_kwonlyargcountR   t   tuple(   t   coR   (    (    s1   lib/python2.7/site-packages/ipykernel/codeutil.pyt   reduce_code   s    (   t   __doc__t   warningst   warnt   DeprecationWarningR   R    t   copyregt   ImportErrort   copy_regR   R   t   pickleR   (    (    (    s1   lib/python2.7/site-packages/ipykernel/codeutil.pyt   <module>   s   			