summaryrefslogtreecommitdiffstats
path: root/Lib/mimetools.py
Commit message (Collapse)AuthorAgeFilesLines
* warnings.catch_warnings() now returns a list or None instead of the customBrett Cannon2008-09-091-1/+1
| | | | | | | | WarningsRecorder object. This makes the API simpler to use as no special object must be learned. Closes issue 3781. Review by Benjamin Peterson.
* Move test.test_support.catch_warning() to the warnings module, rename itBrett Cannon2008-09-021-4/+5
| | | | | | | | | | | catch_warnings(), and clean up the API. While expanding the test suite, a bug was found where a warning about the 'line' argument to showwarning() was not letting functions with '*args' go without a warning. Closes issue 3602. Code review by Benjamin Peterson.
* Silence the DeprecationWarning of rfc822 triggered by its importation inBrett Cannon2008-08-141-1/+5
| | | | | | | | | | | | mimetools. This has an unfortunate side-effect of potentially not letting any warning about rfc822's deprecation be seen by user-visible code if rfc822 is not imported before mimetools. This is because modules are cached in sys.modules and thus do not have their deprecation triggered more than once. But this silencing would have happened by other code that silences the use of mimetools or rfc822 anyway in the stdlib or user code, and thus seems justified to be done here.
* fix test_py3kwarnsBenjamin Peterson2008-07-141-1/+2
| | | | The fact that this was failing and went unnoticed so long seems like a good argument for being able to enable and disble py3kwarnings through Python.
* deprecated mimetoolsBenjamin Peterson2008-06-121-0/+3
|
* Bug #1250170, Patch #1462230: handle socket.gethostname()Georg Brandl2006-03-311-1/+4
| | | | failures gracefully
* Replace backticks with repr() or "%r"Walter Dörwald2004-02-121-2/+2
| | | | From SF patch #852334.
* choose_boundary(): This no longer uses random, so stop importing it.Tim Peters2003-06-151-1/+0
|
* choose_boundary(): Incorporated a threadsafe incrementing counter, so thatTim Peters2003-06-151-8/+22
| | | | | | | | unique boundary strings within a program run are guaranteed. On Windows, duplicates were pretty likely, due to the coarse granularity of time.time. Toned down the absurdly optimistic claims in the docstring. Bugfix candidate.
* Massive changes from SF 589982 (tempfile.py rewrite, by ZackGuido van Rossum2002-08-091-2/+2
| | | | | Weinberg). This changes all uses of deprecated tempfile functions to the recommended ones.
* SF 563203. Replaced 'has_key()' with 'in'.Raymond Hettinger2002-06-011-2/+2
|
* os was already imported in the module, no need to re-importNeal Norwitz2002-03-261-1/+0
|
* Only AttributeError can be raised in this situation - on systems withoutSkip Montanaro2002-03-231-2/+2
| | | | | getuid or getpid. posix_getuid & posix_getpid never raise exceptions when called with no args.
* Do not hide a failure to create a temporary file; if it fails the workFred Drake2001-02-231-5/+1
| | | | | | | will not have been done, and applications need to know that. Also, do not print a message about it; the exception is the right thing. This closes SF bug #133717.
* added a few more __all__ listsSkip Montanaro2001-01-251-0/+2
| | | | test___all__.py: fail silently in check_all if the module can't be imported
* Whitespace normalization.Tim Peters2001-01-141-176/+176
|
* Get rid of string functions.Guido van Rossum2000-12-151-15/+14
|
* Update the code to better reflect recommended style:Fred Drake2000-12-121-3/+3
| | | | | Use != instead of <> since <> is documented as "obsolescent". Use "is" and "is not" when comparing with None or type objects.
* Return after writing 7bit or 8bit encodings. Closes bug 115712Martin v. Löwis2000-09-301-2/+2
|
* Skip Montanaro submits a simple patch that makes encode() and decode()Guido van Rossum2000-04-041-0/+4
| | | | recognize the '7bit' and '8bit' encodings, to simplify use.
* More trivial comment -> docstring transformations by Ka-Ping Yee,Guido van Rossum2000-02-041-12/+13
| | | | | | | | | | | | | | | | | | who writes: Here is batch 2, as a big collection of CVS context diffs. Along with moving comments into docstrings, i've added a couple of missing docstrings and attempted to make sure more module docstrings begin with a one-line summary. I did not add docstrings to the methods in profile.py for fear of upsetting any careful optimizations there, though i did move class documentation into class docstrings. The convention i'm using is to leave credits/version/copyright type of stuff in # comments, and move the rest of the descriptive stuff about module usage into module docstrings. Hope this is okay.
* Use random instead of whrandom.Guido van Rossum1998-05-201-2/+2
|
* Avoid using the obsolete rand module; and improve the randomnessGuido van Rossum1998-04-111-4/+3
| | | | | of the boundary chosen by choose_boudary() by using milliseconds of the timestamp.
* Support uue and x-uue as short names for uuencode.Guido van Rossum1997-12-101-2/+6
|
* Use the modules base64, quopri, and uu, instead of external programsGuido van Rossum1997-07-111-2/+22
| | | | to decode/encode the standard transfer encodings.
* Added getparamnames() to Message class -- return a list of allGuido van Rossum1996-10-041-0/+8
| | | | parameters of the content-type header.
* Don't die when getuid() or getpid() aren't defined.Guido van Rossum1996-08-261-2/+8
|
* removed unused globalsGuido van Rossum1996-05-281-1/+1
|
* add missing loop step to parseplist()Guido van Rossum1996-01-251-0/+1
|
* forget previous change (content-encoding)Guido van Rossum1995-08-291-2/+1
|
* encoding can be content-transfer-encoding or content-encodingGuido van Rossum1995-08-291-1/+2
|
* add seekable option to __init__Guido van Rossum1995-08-071-2/+2
|
* Merge alpha100 branch back to main trunkGuido van Rossum1994-08-011-2/+76
|
* * Mass change: get rid of all init() methods, in favor of __init__()Guido van Rossum1993-12-171-3/+2
| | | | | | | constructors. There is no backward compatibility. Not everything has been tested. * aiff.{py,doc}: deleted in favor of aifc.py (which contains its docs as comments)
* * More changes due to stricter argument passing rulesGuido van Rossum1993-01-041-1/+1
| | | | | | * Fixed calendar.py, mimetools.py, whrandom.py to cope with time.time() returning a floating point number. (And fix old bug in calendar) * Add recursion level to mainloop.mainloop(), to make it reentrant.
* New modules mimetools and rfc822.Guido van Rossum1992-07-131-0/+113
Minor, minor changes to commands.py and sndhdr.py.