[Python-ideas] Better error messages for missing optional stdlib packages

Neil Girdhar mistersheik at gmail.com
Wed Oct 3 18:39:56 EDT 2018

I agree with this.  These small changes can save hundreds of people an hour 
each.  In the long run, it pays off.

On Wednesday, October 3, 2018 at 4:31:08 PM UTC-4, Marcus Harnisch wrote:
> Hi all 
> When trying to import lzma on one of my machines, I was suprised to get 
> a normal import error like for any other module. According to the docs 
> lzma has been part of stdlib since 3.3. Further digging revealed that 
> the error is due to the fact that xz wasn't compiled in when building 
> Python. Since I suspect that there are other optional stdlib modules, 
> this made me think whether the message in those cases should look a 
> little more polished. Perhaps installing a stub module that prints some 
> informative text before raising the relevant exception or similar. 
> Also, maybe add a little note in the docs, stating that despite being 
> part of stdlib this module might not be available on all systems. 
> Thanks, 
> Marcus 
> _______________________________________________ 
> Python-ideas mailing list 
> Python... at python.org <javascript:> 
> https://mail.python.org/mailman/listinfo/python-ideas 
> Code of Conduct: http://python.org/psf/codeofconduct/ 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20181003/f0d4ec2b/attachment.html>

More information about the Python-ideas mailing list