module documentation

Handle Python version/platform incompatibilities.
Variable arm Undocumented
Variable binary​_types Undocumented
Variable cpython Undocumented
Variable exec​_ Undocumented
Variable ​Full​Arg​Spec Undocumented
Variable has​_refcount​_gc Undocumented
Variable import​_ Undocumented
Variable int​_types Undocumented
Variable osx Undocumented
Variable print​_ Undocumented
Variable py2k Undocumented
Variable py37 Undocumented
Variable py38 Undocumented
Variable py39 Undocumented
Variable py3k Undocumented
Variable pypy Undocumented
Variable string​_types Undocumented
Variable win32 Undocumented
Class nullcontext Context manager that does no additional processing.
Function ​_formatannotation vendored from python 3.7
Function ​_qualname Undocumented
Function b Undocumented
Function b64decode Undocumented
Function b64encode Undocumented
Function cmp Undocumented
Function dataclass​_fields Return a sequence of all dataclasses.Field objects associated with a class.
Function decode​_backslashreplace Undocumented
Function importlib​_metadata​_get Undocumented
Function inspect​_formatargspec Copy formatargspec from python 3.7 standard library.
Function inspect​_getfullargspec Fully vendored version of getfullargspec from Python 3.3.
Function local​_dataclass​_fields Return a sequence of all dataclasses.Field objects associated with a class, excluding those that originate from a superclass.
Function raise​_ implement "raise" with cause support.
Function raise​_from​_cause legacy. use raise_()
Function reraise legacy. use raise_()
Function u Undocumented
Function ue Undocumented
Function with​_metaclass Create a base class with a metaclass.
arm =

Undocumented

binary_types =

Undocumented

cpython =

Undocumented

exec_ =

Undocumented

FullArgSpec =

Undocumented

has_refcount_gc =

Undocumented

import_ =

Undocumented

int_types =

Undocumented

osx =

Undocumented

print_ =

Undocumented

py2k =

Undocumented

py37 =

Undocumented

py38 =

Undocumented

py39 =

Undocumented

py3k =

Undocumented

pypy =

Undocumented

string_types =

Undocumented

win32 =

Undocumented

def _formatannotation(annotation, base_module=None):
vendored from python 3.7
def _qualname(fn):

Undocumented

def b(s):

Undocumented

def b64decode(x):

Undocumented

def b64encode(x):

Undocumented

def cmp(a, b):

Undocumented

def dataclass_fields(cls):
Return a sequence of all dataclasses.Field objects associated with a class.
def decode_backslashreplace(text, encoding):

Undocumented

def importlib_metadata_get(group):

Undocumented

def inspect_formatargspec(args, varargs=None, varkw=None, defaults=None, kwonlyargs=(), kwonlydefaults={}, annotations={}, formatarg=str, formatvarargs=(lambda name: '*' + name), formatvarkw=(lambda name: '**' + name), formatvalue=(lambda value: '=' + repr(value)), formatreturns=(lambda text: ' -> ' + text), formatannotation=_formatannotation):

Copy formatargspec from python 3.7 standard library.

Python 3 has deprecated formatargspec and requested that Signature be used instead, however this requires a full reimplementation of formatargspec() in terms of creating Parameter objects and such. Instead of introducing all the object-creation overhead and having to reinvent from scratch, just copy their compatibility routine.

Ultimately we would need to rewrite our "decorator" routine completely which is not really worth it right now, until all Python 2.x support is dropped.

def inspect_getfullargspec(func):
Fully vendored version of getfullargspec from Python 3.3.
def local_dataclass_fields(cls):
Return a sequence of all dataclasses.Field objects associated with a class, excluding those that originate from a superclass.
def raise_(exception, with_traceback=None, replace_context=None, from_=False):
implement "raise" with cause support.
Parameters
exceptionexception to raise
with​_tracebackwill call exception.with_traceback()
replace​_contextan as-yet-unsupported feature. This is an exception object which we are "replacing", e.g., it's our "cause" but we don't want it printed. Basically just what __suppress_context__ does but we don't want to suppress the enclosing context, if any. So for now we make it the cause.
from​_the cause. this actually sets the cause and doesn't hope to hide it someday.
def raise_from_cause(exception, exc_info=None):
legacy. use raise_()
def reraise(tp, value, tb=None, cause=None):
legacy. use raise_()
def u(s):

Undocumented

def ue(s):

Undocumented

def with_metaclass(meta, *bases, **kw):

Create a base class with a metaclass.

Drops the middle class upon creation.

Source: https://lucumr.pocoo.org/2013/5/21/porting-to-python-3-redux/