Accidentally, I pushed this commit together with dectorator/doctest fix. If you want, I can remove this pyglet commit or close #7401 in favor of this PR.