summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Change the sense of a test in how the profiler interprets exception events.Fred Drake2001-09-271-1/+1
| | | | | This should fix a bug in how time is allocated during exception propogation (esp. in the presence of finally clauses).
* Bump Windows build numbers for 2.2a4; installer changes were done earlier.Tim Peters2001-09-272-2/+4
|
* Turn \input, \include, and \verbatiminput into XInclude elements insteadFred Drake2001-09-272-10/+14
| | | | of something ad-hoc.
* Added note about new StringIO/cStringIO feature.Marc-André Lemburg2001-09-271-0/+5
|
* Add support for some more markup that had slipped in.Fred Drake2001-09-271-2/+15
| | | | Fixed a typo in a comment.
* Fix comment typoAndrew M. Kuchling2001-09-271-1/+1
|
* Fix some markup errors.Fred Drake2001-09-271-2/+2
|
* Markup adjustment: \[...\] is math markup and does not translate well whenFred Drake2001-09-271-6/+7
| | | | | | used with text as was done here. Fixed so that the typeset version wraps the warning text and the HTML version does not create images of the warning text.
* docroutine() (both instances): Docstrings for class methods weren'tTim Peters2001-09-271-2/+0
| | | | | | | | | | | | | | | | getting displayed, due to a special case here whose purpose I didn't understand. So just disabled the doc suppression here. Another special case here skips the docs when picking apart a method and finding that the im_func is also in the class __dict__ under the same name. That one I understood. It has a curious consequence, though, wrt inherited properties: a static class copies inherited stuff into the inheriting class's dict, and that affects whether or not this special case triggers. The upshoot is that pydoc doesn't show the function docstrings of getter/setter/deleter functions of inherited properties in the property section when the class is static, but does when the class is dynamic (bring up Lib/test/pydocfodder.py under GUI pydoc to see this).
* List class attrs in MRO order of defining class instead of by alphabeticTim Peters2001-09-271-23/+12
| | | | order of defining class's name.
* Removed no-longer-true comment about pydoc working under all versions ofTim Peters2001-09-261-4/+0
| | | | | Python since 1.5 (virtually everything I changed over the last week relies on "modern" features, particularly nested scopes).
* Remove comment that no longer applies.Fred Drake2001-09-261-3/+0
|
* Updates do email package documentation for markup, style, andBarry Warsaw2001-09-268-225/+161
| | | | organization.
* Display a class's method resolution order, if it's non-trivial. "Trivial"Tim Peters2001-09-261-1/+22
| | | | | here means it has no more than one base class to rummage through (in which cases there's no potential confusion about resolution order).
* More test cases, including something that simulates what the profilerFred Drake2001-09-261-5/+66
| | | | probably *should* be doing.
* A file just to look at (using pydoc).Tim Peters2001-09-261-0/+297
|
* Add tests for new PyErr_NormalizeException() behaviorJeremy Hylton2001-09-262-0/+61
| | | | | | | | | | | | Add raise_exception() to the _testcapi module. It isn't a test, but the C API exists only to support test_exceptions. raise_exception() takes two arguments -- an exception class and an integer specifying how many arguments it should be called with. test_exceptions uses BadException() to test the interpreter's behavior when there is a problem instantiating the exception. test_capi1() calls it with too many arguments. test_capi2() causes an exception to be raised in the Python code of the constructor.
* PyErr_NormalizeException()Jeremy Hylton2001-09-261-1/+12
| | | | | | | | | | | | | | | | | | If a new exception occurs while an exception instance is being created, try harder to make sure there is a traceback. If the original exception had a traceback associated with it and the new exception does not, keep the old exception. Of course, callers to PyErr_NormalizeException() must still be prepared to have tb set to NULL. XXX This isn't an ideal solution, but it's better than no traceback at all. It occurs if, for example, the exception occurs when the call to the constructor fails before any Python code is executed. Guido suggests that it there is Python code that was about to be executed -- but wasn't, say, because it was called with the wrong number of arguments -- then we should point at the first line of the code object anyway.
* Don't export generators future infoJeremy Hylton2001-09-261-1/+1
|
* Prevent a NULL pointer from being pushed onto the stack.Jeremy Hylton2001-09-261-1/+5
| | | | | | | | | | | | It's possible for PyErr_NormalizeException() to set the traceback pointer to NULL. I'm not sure how to provoke this directly from Python, although it may be possible. The error occurs when an exception is set using PyErr_SetObject() and another exception occurs while PyErr_NormalizeException() is creating the exception instance. XXX As a result of this change, it's possible for an exception to occur but sys.last_traceback to be left undefined. Not sure if this is a problem.
* Move the styling for the HTML version of \mailheader into the CSS file.Fred Drake2001-09-263-2/+3
| | | | | | In both the HTML and typeset versions of the documentation, add a colon after the name of a mail header so that it is more easily distinguished from other text.
* Note that the colon following a mail header name should not be includedFred Drake2001-09-261-5/+5
| | | | | | when using the \mailheader markup. Change a couple of inline examples to show the markup rather than the result.
* Typo fix.Greg Ward2001-09-261-1/+1
|
* Move the \mailheader description to the right place.Fred Drake2001-09-261-12/+13
| | | | | | Clarify the \mimetype description; it can be used to refer to a part of a MIME type name, so \mimetype{text} or \mimetype{plain} can be used, not just \mimetype{text/plain}.
* Start making some markup adjustments; Barry has indicated he will work onFred Drake2001-09-261-17/+17
| | | | this before we finish the integration, along with some restructuring.
* Test case for SF bugs #463359 and #462937, added to test_grammar for lack ofThomas Wouters2001-09-262-0/+28
| | | | | a better place. Excessively fragile code, but at least it breaks when something in this area changes!
* Update the tests for the current incarnation of the email package, andBarry Warsaw2001-09-261-105/+198
| | | | added some new tests of message/delivery-status content type messages.
* More test messages for test_email.pyBarry Warsaw2001-09-262-0/+135
|
* _parsebody(): Use get_boundary() and get_type().Barry Warsaw2001-09-261-10/+16
| | | | | | | Also, add a clause to the big-if to handle message/delivery-status content types. These create a message with subparts that are Message instances, which best represent the header blocks of this content type.
* has_key(): Implement in terms of get().Barry Warsaw2001-09-261-33/+58
| | | | | | | | | | | | | | | get_type(): Use a compiled regular expression, which can be shared. _get_params_preserve(): A helper method which extracts the header's parameter list preserving value quoting. I'm not sure that this needs to be a public method. It's necessary because we want get_param() and friends to return the unquoted parameter value, however we want the quote-preserved form for set_boundary(). get_params(), get_param(), set_boundary(): Implement in terms of _get_params_preserve(). walk(): Yield ourself first, then recurse over our subparts (if any).
* __init__(): Arguments major renamed to maintype and minor renamed toBarry Warsaw2001-09-261-3/+3
| | | | subtype for consistency with the rest of the package.
* Updated docstrings. Also,Barry Warsaw2001-09-261-7/+7
| | | | | | typed_subpart_iterator(): Arguments major renamed to maintype and minor renamed to subtype for consistency with the rest of the package.
* Image.py and class Image => MIMEImage.py and MIMEImageBarry Warsaw2001-09-264-36/+40
| | | | | | | | | Text.py and class Text => MIMEText.py and MIMEText MessageRFC822.py and class MessageRFC822 => MIMEMessage.py and MIMEMessage These are renamed so as to be more consistent; these are MIME specific derived classes for when creating the object model out of whole cloth.
* In class Generator:Barry Warsaw2001-09-261-5/+32
| | | | | | | | | | | | | | | | | | | | | | | | _handle_text(): If the payload is None, then just return (i.e. don't write anything). Subparts of message/delivery-status types will have this property since they are just blocks of headers. Also, when raising the TypeError, include the type of the payload in the error message. _handle_multipart(), _handle_message(): When creating a clone of self, pass in our _mangle_from_ and maxheaderlen flags so the clone has the same behavior. _handle_message_delivery_status(): New method to do the proper printing of message/delivery-status type messages. These have to be handled differently than other message/* types because their payloads are subparts containing just blocks of headers. In class DecodedGenerator: _dispatch(): Skip over multipart/* messages since we don't care about them, and don't want the non-text format to appear in the printed results.
* cosmeticBarry Warsaw2001-09-261-0/+1
|
* The email package documentation, currently organized the way I thinkBarry Warsaw2001-09-268-0/+1168
| | | | Fred prefers. I'm not sure I like this organization, so it may change.
* SF [#463737] Add types.CallableIterTypeTim Peters2001-09-251-3/+5
| | | | | Rather than add umpteen new obscure internal Iter types, got rid of all of them. See the new comment.
* test_iterator(): Don't do a type comparison to see if it's anBarry Warsaw2001-09-251-1/+4
| | | | | | iterator, just test to make sure it has the two required iterator protocol methods __iter__() and next() -- actually just test hasattr-ness.
* add_operators(): the __floordiv__ and __truediv__ descriptors (andGuido van Rossum2001-09-251-0/+10
| | | | | | | their 'i' and 'r' variants) were not being generated if the corresponding nb_ slots were present in the type object. I bet this is because floor and true division were introduced after I last looked at that part of the code.
* Update to support \mailheader and 5-column tables.Fred Drake2001-09-251-0/+52
|
* Simplify a helper by returning fewer values.Fred Drake2001-09-251-5/+4
|
* Factor out the protect-from-exceptions helpers and make capture_events()Fred Drake2001-09-251-35/+65
| | | | | | use it. This simplifies the individual tests a little. Added some new tests related to exception handling.
* Guido points out that sys.__stdout__ is a bit bucket under IDLE. So keepTim Peters2001-09-252-1/+13
| | | | | | | the local save/modify/restore of sys.stdout, but add machinery so that regrtest can tell test_support the value of sys.stdout at the time regrtest.main() started, and test_support can pass that out later to anyone who needs a "visible" stdout.
* _reconstructor(): there's no need for tricks with assignment toGuido van Rossum2001-09-251-9/+2
| | | | | __class__. The __new__ protocol is up to this. (Thanks to Tim for pointing this out.)
* test_support should be imported directly, not via test.test_support.Tim Peters2001-09-252-2/+2
|
* Get rid of the increasingly convoluted global tricks w/ sys.stdout, inTim Peters2001-09-252-28/+12
| | | | favor of local save/modify/restore. The test suite should run fine again.
* Clarified some points about the interface to the mmap() function.Fred Drake2001-09-251-10/+11
| | | | This closes SF bug #448918.
* Minor changes.Fred Drake2001-09-251-5/+8
|
* Revise the example to be more resiliant in the face of continued use afterFred Drake2001-09-251-18/+18
| | | | | | | | | the object has been pickled; don't mutate the instance dict in the __getstate__() method. Other minor changes for style. Broke up the displayed interactive session to get better page-breaking behavior for typeset versions, and to point out an important aspect of the example. This closes SF bug #453914.
* - Provisional support for pickling new-style objects. (*)Guido van Rossum2001-09-254-12/+142
| | | | | | | | | | | | | | | | | | | - Made cls.__module__ writable. - Ensure that obj.__dict__ is returned as {}, not None, even upon first reference; it simply springs into life when you ask for it. (*) The pickling support is provisional for the following reasons: - It doesn't support classes with __slots__. - It relies on additional support in copy_reg.py: the C method __reduce__, defined in the object class, really calls calling copy_reg._reduce(obj). Eventually the Python code in copy_reg.py needs to be migrated to C, but I'd like to experiment with the Python implementation first. The _reduce() code also relies on an additional helper function, _reconstructor(), defined in copy_reg.py; this should also be reimplemented in C.