This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author acdha
Recipients acdha, zaytsev
Date 2014-01-07.18:29:08
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Other than hoisting the warnings import to the top (PEP-8) that seems entirely reasonable to me. The user report which we got was confusing because it was non-obvious where it came from - a warning or other pointer would have helped the original reporter get an idea as to what was failing earlier.

The other two changes I'd suggest would be documentation updates:

os.path.expanduser noting that KeyError may be raised when HOME is undefined and pwd.getpwuid fails for the active user

pwd.getpwuid noting that KeyErrors will be raised when the underlying POSIX call fails
Date User Action Args
2014-01-07 18:29:08acdhasetrecipients: + acdha, zaytsev
2014-01-07 18:29:08acdhasetmessageid: <>
2014-01-07 18:29:08acdhalinkissue20164 messages
2014-01-07 18:29:08acdhacreate