Skip to content

compat: Fix AttributeError when precheck wrapped in partial.

Jason R. Coombs requested to merge topic/default/rewriteutil-compat into branch/default

If corerewriteutil.precheck was extended/patched, it fails with functools.partial has no attribute '__code__' (or similar). This change revisits this compatibility mechanism. It turns out that d4752aeb20f1 added the check_divergence parameter, so check for that directly and simply use the built-in version if it has that interface. If it doesn't, fall back to the compatibility function. d90f6237 appears not to be relevant.

Merge request reports

Loading