o ,]@spdZddlmZddlZddlmZddlmZddlm Z ddl m Z m Z m Z edZGd d d ejZdS) a For the ``future`` package. Adds this import line: from past.builtins import str as oldstr at the top and wraps any unadorned string literals 'abc' or explicit byte-string literals b'abc' in oldstr() calls so the code has the same behaviour on Py3 as on Py2.6/2.7. )unicode_literalsN) fixer_base)token)syms) future_importtouch_import_topwrap_in_fn_callz[^uUrR]?[\'\"]c@seZdZdZdZddZdS) FixOldstrWrapTSTRINGcCs\|jtjkr*tdd|t|jr,|}d|_d|j|_t d|g|jd}|SdSdS)Nz past.typesoldstrb)prefix) typerr r _literal_rematchvalueclonerr)selfnoderesultsnewwrappedrC/usr/lib/python3/dist-packages/libfuturize/fixes/fix_oldstr_wrap.py transforms    zFixOldstrWrap.transformN)__name__ __module__ __qualname__ BM_compatiblePATTERNrrrrrr s r )__doc__ __future__rrelib2to3r lib2to3.pgen2rlib2to3.fixer_utilrlibfuturize.fixer_utilrrrcompilerBaseFixr rrrrs