Commit Graph

6222 Commits

Author SHA1 Message Date
Martin v. Löwis 0e2d881406 Add xml namespace initially (PyXML 1.19). 2002-06-30 07:32:56 +00:00
Martin v. Löwis d1b516c274 Fix spacing. 2002-06-30 07:27:30 +00:00
Martin v. Löwis 18476a3740 Merge changes from PyXML:
[1.15]
Added understanding of the feature_validation, feature_external_pes,
and feature_string_interning features.
Added support for the feature_external_ges feature.
Added support for the property_xml_string property.
[1.16]
Made it recognize the namespace prefixes feature.
[1.17]
removed erroneous first line
[1.19]
Support optional string interning in pyexpat.
[1.21]
Restore compatibility with versions of Python that did not support weak
references.  These do not get the cyclic reference fix, but they will
continue to work as they did before.
[1.22]
Activate entity processing unless standalone.
2002-06-30 07:21:24 +00:00
Raymond Hettinger 46ac8eb3c8 Code modernization. Replace v=s[i]; del s[i] with single lookup v=s.pop(i) 2002-06-30 03:39:14 +00:00
Barry Warsaw 1969817486 Another test of long headers. 2002-06-29 15:23:39 +00:00
Barry Warsaw 9546e7972c Oleg Broytmann's support for RFC 2231 encoded parameters, SF patch #549133
New test cases.
2002-06-29 05:58:45 +00:00
Barry Warsaw 12566a8826 Oleg Broytmann's support for RFC 2231 encoded parameters, SF patch #549133
Specifically,

decode_rfc2231(), encode_rfc2231(): Functions to encode and decode RFC
2231 style parameters.

decode_params(): Function to decode a list of parameters.
2002-06-29 05:58:04 +00:00
Barry Warsaw 908dc4bea8 Oleg Broytmann's support for RFC 2231 encoded parameters, SF patch #549133
Specifically,

_formatparam(): Teach this about encoded `param' arguments, which are
a 3-tuple of items (charset, language, value).  language is ignored.

_unquotevalue(): Handle both 3-tuple RFC 2231 values and unencoded
values.

_get_params_preserve(): Decode the parameters before returning them.

get_params(), get_param(): Use _unquotevalue().

get_filename(), get_boundary(): Teach these about encoded (3-tuple)
parameters.
2002-06-29 05:56:15 +00:00
Barry Warsaw 3fdc889e76 test_multilingual(): Test for Header.__unicode__(). 2002-06-29 03:27:27 +00:00
Barry Warsaw 8e69bdac33 __unicode__(): Patch # 541263 by Mikhail Zabaluev, implementation
modified by Barry.
2002-06-29 03:26:58 +00:00
Jeremy Hylton 566fe9ef66 Track change of begin() to _begin(). 2002-06-28 23:54:30 +00:00
Barry Warsaw b6a9213930 Lots of new and updated tests to check for proper ascii header
folding.  Note that some of the Japanese tests have changed, but I
don't really know if they are correct or not. :(

Someone with Japanese and RFC 2047 expertise, please take a look!
2002-06-28 23:49:33 +00:00
Barry Warsaw ba2577b7f1 _max_append(): When adding the string `s' to its own line, it should
be lstrip'd so that old continuation whitespace is replaced by that
specified in Header's continuation_ws parameter.
2002-06-28 23:48:23 +00:00
Barry Warsaw 766125080f Teach this class about "highest-level syntactic breaks" but only for
headers with no charset or 'us-ascii' charsets.  Actually this is only
partially true: we know about semicolons (but not true parameters) and
we know about whitespace (but not technically folding whitespace).
Still it should be good enough for all practical purposes.

Other changes include:

__init__(): Add a continuation_ws argument, which defaults to a single
space.  Set this to change the whitespace used for continuation lines
when a header must be split.  Also, changed the way header line
lengths are calculated, so that they take into account continuation_ws
(when tabs-expanded) and any provided header_name parameter.  This
should do much better on returning split headers for which the first
and subsequent lines must fit into a specified width.

guess_maxlinelen(): Removed.  I don't think we need this method as
part of the public API.

encode_chunks() -> _encode_chunks(): I don't think we need this one as
part of the public API either.
2002-06-28 23:46:53 +00:00
Barry Warsaw 062749ac57 _split_header(): The code here was terminally broken because it didn't
know anything about RFC 2047 encoded headers.  Fortunately we have a
perfectly good header splitter in Header.encode().  So we just call
that to give us a properly formatted and split header.
Header.encode() didn't know about "highest-level syntactic breaks" but
that's been fixed now too.
2002-06-28 23:41:42 +00:00
Jeremy Hylton 7c75c99a10 Simplify HTTPSConnection constructor.
See discussion in SF bug 458463.
2002-06-28 23:38:14 +00:00
Jeremy Hylton 13f99d7097 Close SF patch 523944: importing modules with foreign newlines.
Didn't use the patch, because universal newlines support made it easy.
It might be worth fixing the actual problem in the 2.2 maintenance
branch, in which case the patch is still needed.
2002-06-28 23:32:51 +00:00
Fred Drake 2a3d7db93e Added character data buffering to pyexpat parser objects.
Setting the buffer_text attribute to true causes the parser to collect
character data, waiting as long as possible to report it to the Python
callback.  This can save an enormous number of callbacks from C to
Python, which can be a substantial performance improvement.

buffer_text defaults to false.
2002-06-28 22:56:48 +00:00
Jeremy Hylton be4fcf1875 Fixes for two separate HTTP/1.1 bugs: 100 responses and HTTPS connections.
The HTTPResponse class now handles 100 continue responses, instead of
choking on them.  It detects them internally in the _begin() method
and ignores them.  Based on a patch by Bob Kline.

This closes SF bugs 498149 and 551273.

The FakeSocket class (for SSL) is now usable with HTTP/1.1
connections.  The old version of the code could not work with
persistent connections, because the makefile() implementation read
until EOF before returning.  If the connection is persistent, the
server sends a response and leaves the connection open.  A client that
reads until EOF will block until the server gives up on the connection
-- more than a minute in my test case.

The problem was fixed by implementing a reasonable makefile().  It
reads data only when it is needed by the layers above it.  It's
implementation uses an internal buffer with a default size of 8192.

Also, rename begin() method of HTTPResponse to _begin() because it
should only be called by the HTTPConnection.
2002-06-28 22:38:01 +00:00
Jack Jansen 2bb598067a The standard definition file is now called mwerks_shcarbon_plugin.h. 2002-06-27 22:10:19 +00:00
Fredrik Lundh 3d9addd55a merged with SLAB codebase (version 1.0.1) 2002-06-27 21:36:21 +00:00
Fredrik Lundh 4fb7027ec0 made the code match the comments (1.5.2 compatibility) 2002-06-27 20:08:25 +00:00
Fredrik Lundh 6f7c3431c8 Fix bug #570057: Broken pre.subn() (and pre.sub())
This should be backported to the 2.2.X series (how
do I do that?)
2002-06-27 19:59:27 +00:00
Fred Drake 1add023b88 Integrate the tests for name interning from PyXML (test_pyexpat.py
revision 1.12 in PyXML).
2002-06-27 19:41:51 +00:00
Neal Norwitz 80a3e0a604 Whitespace normalization (remove tabs) 2002-06-26 22:05:33 +00:00
Jack Jansen ab5320bfd9 Fixed various MacPython-specific issues found by attempting to use the standard core setup.py for MacPython. 2002-06-26 15:42:49 +00:00
Raymond Hettinger 0a2963c797 Apply SF 562987 modernizing Cookie to subclass from dict instead of UserDict 2002-06-26 15:19:01 +00:00
Fred Drake 3a159a8d25 Suppress the variable verbose output from test.xmltests; the inclusion of
timing information in the output makes the determination of success bogus.
2002-06-26 15:16:16 +00:00
Jack Jansen 96cad2ea47 This module broke on the Mac (where it can't work, but distutils seems to import it anyway) because it imported pwd and grp. Moved the import to inside the routine where they're used. 2002-06-26 15:00:29 +00:00
Ka-Ping Yee 711cad769a Also look up variable names in __builtins__ if not found in globals.
Don't show hidden fields of exception values (names starting with '_').
2002-06-26 07:10:56 +00:00
Kurt B. Kaiser ffd3a4217a Shutdown subprocess debugger and associated Proxies/Adapters when closing
the Idle debugger.

M PyShell.py       : Call RemoteDebugger.close_remote_debugger()
M RemoteDebugger.py: Add close_remote_debugger(); further polish code used
                     to start the debugger sections.
M rpc.py           : Add comments on Idlefork methods register(), unregister()
                     comment out unused methods
M run.py           : Add stop_the_debugger(); polish code
2002-06-26 02:32:09 +00:00
Fred Drake 867de944b4 Add convenience module to run all the XML tests. 2002-06-25 19:20:10 +00:00
Kurt B. Kaiser f8096fbba1 Remove all EditorWindow BREAK tags when closing Debugger 2002-06-25 03:28:38 +00:00
Piers Lauder 17031bf421 fix incorrect size calc. in IMAP4_SSL.read 2002-06-24 23:35:37 +00:00
Kurt B. Kaiser 83118c6cb3 Clear associated breakpoints when closing an edit window.
M Debugger.py      : Added clear_file_breaks()
M EditorWindow.py  : Clear breaks when closed, commments->docstrings,
                     comment out some debugging print statements
M PyShell.py       : comments->docstrings ; clarify extending EditorWindow
                     methods.
M RemoteDebugger.py: Add clear_all_file_breaks() functionality,
                     clarify some comments.
2002-06-24 17:03:37 +00:00
Raymond Hettinger ab5dae35ca Fix SF bug 572567: Memory leak in object comparison. 2002-06-24 13:08:16 +00:00
Piers Lauder 0c09293143 Fix IMAP4_SSL read and send methods to take account of short data 2002-06-23 10:47:13 +00:00
Guido van Rossum 10f36d9f0b Add a check that the bug Jeremy just fixed in _PyTuple_Resize() is
fixed.

(Jeremy, how did you discover that?)
2002-06-21 02:14:10 +00:00
Raymond Hettinger 0ae0c07661 SF 569257 -- Name mangle double underscored variable names in __slots__. 2002-06-20 22:23:15 +00:00
Jack Jansen e36a8e8201 Disable the test for importing very long lists for MacPython: it triggers
an out-of-memory condition (and a hang on OSX). Filed a bug report
(#571845) to make sure this is eventually fixed.
2002-06-20 21:34:35 +00:00
Tim Peters 8db890a21a Removed the generator future-stmt -- not needed for 2.3. 2002-06-20 14:52:37 +00:00
Kurt B. Kaiser 669f4c3850 1. Debugger Breakpoints, finish implementation
2. Debugger Clear Breakpoints, implement
3. Nice yellow breakpoints for Chui  :)
2002-06-20 04:01:47 +00:00
Guido van Rossum 3875e90274 I get failures half of the time that I run this, so I'll disable
running this as part of the regular test suite again, until I have
time to figure out why.
2002-06-20 03:40:16 +00:00
Raymond Hettinger 9c051d7e01 SF 570727 indexer() class no longer needed since lists now support slicing 2002-06-20 03:38:12 +00:00
Michael W. Hudson 9c14badc5f Fix the bug described in
http://mail.python.org/pipermail/python-dev/2002-June/025461.html

with test cases.

Also includes extended slice support for arrays, which I thought I'd
already checked in but obviously not.
2002-06-19 15:44:15 +00:00
Jeremy Hylton 2683ac755d Define NDEBUG for releae builds, just like Python.
XXX Why doesn't distutils on Windows use the same set of flags as Python?
2002-06-18 19:08:40 +00:00
Jeremy Hylton 1b046e4314 Add implementation of _compile() and use default compile() method. 2002-06-18 18:48:55 +00:00
Jeremy Hylton 6e08d22b1a Add a default implementation of compile() to the base class.
The default implementation calls _compile() to compile individual
files.  This method must be implemented by the subclass.  This change
factors out most of the remaining common code in all the compilers
except mwerks.
2002-06-18 18:42:41 +00:00
Jeremy Hylton c01b350d36 Only import msvccompiler on win32 platforms. 2002-06-18 18:40:54 +00:00
Guido van Rossum 83ccb4e011 Michael fixed the race conditions and removed the sleeps.
This is his SF patch 569697.  I renamed main() to test_main() again so
that this is run as part of the standard test suite.
2002-06-18 18:35:13 +00:00