Backport Generic.__new__ fix (#560)

4 files changed