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.

classification
Title: uu.decode prints to stderr
Type: Stage:
Components: Library (Lib) Versions: Python 2.3
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: anadelonbrin, loewis, shang
Priority: normal Keywords:

Created on 2003-09-09 20:31 by shang, last changed 2022-04-10 16:11 by admin. This issue is now closed.

Messages (3)
msg18106 - (view) Author: Sami Hangaslammi (shang) Date: 2003-09-09 20:31
Python 2.3 final

The standard library function uu.decode prints a
warning message to stderr if there is an error when
decoding the file. This feels like an incorrect
behaviour for a library function.

The warning message can be supressed by providing a
quiet=True parameter, but this is not currently documented.

The relevant line in uu.py is 138
msg18107 - (view) Author: Tony Meyer (anadelonbrin) Date: 2005-01-31 00:15
Logged In: YES 
user_id=552329

Printing to stderr outside of debugging is uncommon for the
standard library, but there are other modules (ftplib,
asyncore) that do it.  In this case, it only happens when
there is an error (which can be recovered from), so printing
to stderr seems fairly appropriate.  An alternative would be
to call warnings.warn(), although by default that will have
the same effect.

Documenting the 'quiet' parameter seems reasonable, however,
and would be a simple change to libuu.tex.  I can produce
such a patch, if desired.
msg18108 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2005-03-03 10:08
Logged In: YES 
user_id=21627

I think documenting the quiet parameter is the right
solution. Fixed in libuu.tex 1.14 and 1.12.20.2
History
Date User Action Args
2022-04-10 16:11:04adminsetgithub: 39203
2003-09-09 20:31:26shangcreate