Skip to content
Myr

Addressing feedback from pull request

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Mathias J. Hennig · committed by Mathias J. Hennig · parent c8f19f0 · Browse files · 1 file+5 added−6 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+5 added−6 removed

  • other:+5 added−6 removed

1 file+5 added−6 removed

modified:flask/_compat.py+5 added-6 removed
52 unmodified lines
53 return cls545556def with_metaclass(meta, *bases):57 """Create a base class with a metaclass."""58 # This requires a bit of explanation: the basic idea is to make a59 # dummy metaclass for one level of class instantiation that replaces60 # itself with the actual metaclass.60 #61 # This has the advantage over six.with_metaclass in that it does not62 # introduce dummy classes into the final MRO.63 constructor = lambda c, name, b, dct: meta(name, bases, dct)64 metaclass = type('with_metaclass', (type,), {'__new__': constructor})65 return type.__new__(metaclass, 'temporary_class', (object,), {})61 class metaclass(type):62 def __new__(cls, name, this_bases, d):63 return meta(name, bases, d)64 return type.__new__(metaclass, 'temporary_class', (), {})656667# Certain versions of pypy have a bug where clearing the exception stack68# breaks the __exit__ function in a very peculiar way. This is currently
20 unmodified lines