Patches from Debian

Hi,

we applied these two patches. Please include them.
Today I learned about the ``stacklevel`` argument to ``warnings.warn`` - good call!