Commit Graph

17456 Commits

Author SHA1 Message Date
Tim Peters c58440fcef No functional change -- just added whitespace in places so I could follow
the logic better.  Will be adding some additional tests later today.
2001-04-09 17:16:31 +00:00
Jeremy Hylton a830b3859b Warn when assigning to __debug__ instead of raising an error. 2001-04-09 16:07:59 +00:00
Fred Drake 819815abea Fix typo in example (\b should be \n in string literal).
This closes SF bug #414279.
2001-04-09 15:57:06 +00:00
Fred Drake 9c846366ee Fix a number of bugs and omissions in the AddressList documentation, most
noted by Steve Holden.


This closes SF bug #413876.
2001-04-09 15:42:56 +00:00
Steve Purcell 17a781bc69 * Remove exc_info() kludge -- it actually messed up the Jython output
* Fixed TestLoader.loadTestsFromName() for nested packages
* Corrected the command-line usage summary
2001-04-09 15:37:31 +00:00
Moshe Zadka a36f4a0cd6 Fixing Itamar's name, as per his request. 2001-04-09 15:23:46 +00:00
Moshe Zadka 5d87d47295 fixing 408085 - redirect from https becomes http
Even though relative redirects are illegal, they are common
urllib treated every relative redirect as though it was to http,
even if the original was https://
As long as we're compensating for server bugs, might as well do
it properly.
2001-04-09 14:54:21 +00:00
Jeremy Hylton f870c952f9 Add two arguments to Scope constructor, module scope and class name
Add mangling support
Add get_children() and add_child() methods to Scope
Skip nodes when If test is a false constant
Add test code that checks results against symtable module
2001-04-09 13:57:32 +00:00
Jeremy Hylton 8b966dcf03 Add preliminary module symbol table constructor 2001-04-09 04:35:35 +00:00
Jeremy Hylton 0e8468c8ba remove global decl about unused variable 2001-04-09 04:31:50 +00:00
Jeremy Hylton 80e29bd139 Add support for future statements 2001-04-09 04:28:48 +00:00
Jeremy Hylton 42a0830713 Fix "import as" (has always skipping the as name)
Fix com_NEWLINE() so that is accepts arguments, which occurs for lines like:
    stmt; # note trailing semicolon
Add XXX about checking for assignment to list comps
2001-04-09 04:27:12 +00:00
Jeremy Hylton a384f737cc typo 2001-04-09 04:23:55 +00:00
Tim Peters f0e717bdb1 Repair portability of sign extension when reading signed ints on boxes
where sizeof(long)==8.  This *was* broken on boxes where signed right
shifts didn't sign-extend, but not elsewhere.  Unfortunately, apart
from the Cray T3E I don't know of such a box, and Guido has so far
refused to buy me any Cray machines for home Python testing <wink>.

More immediately interesting would be if someone could please test
this on *any* sizeof(long)==8 box, to make sure I didn't break it.
2001-04-08 23:39:38 +00:00
Guido van Rossum 9cec8fba06 Make it clear that a bdb subclass must implement do_clear().
This was found by Neal Norwitz's PyChecker.
2001-04-08 15:05:16 +00:00
Tim Peters 7e01e284cb Whitespace normalization. 2001-04-08 07:44:07 +00:00
Tim Peters 6fd7120616 Fix from the Madusa mailing list:
http://groups.yahoo.com/group/medusa/message/333

It's clear that Medusa should not be checking for an empty buffer
via "buf is ''".  The patch merely changes "is" to "==".  However,
there's a mystery here all the same:  Python attempts to store null
strings uniquely, so it's unclear why "buf is ''" ever returned
false when buf actually was empty.  *Some* string operations produce
non-unique null strings, e.g.

>>> "abc"*0 is "abc"*0
0
>>>

but they're rare, and I don't see any such operations in asynchat.
2001-04-08 07:23:44 +00:00
Tim Peters cfc21fcf48 Remove useless imports, as reported by PyChecker. 2001-04-08 00:43:13 +00:00
Tim Peters 3664111fb1 Get rid of useless string import, as reported by Neal Norwitz's PyChecker.py
on c.l.py.
2001-04-08 00:38:42 +00:00
Tim Peters 388ed08cbf SF patch #413552 - Premature decref on object
Jeffery Collins pointed out that filterstring decrefs a character object
before it's done using it.  This works by accident today because another
module always happens to have an active reference too at the time.  The
accident doesn't work after his Pippy modifications, and since it *is*
an accident even in the mainline Python, it should work by design there too.
The patch accomplishes that.
2001-04-07 20:34:48 +00:00
Greg Stein 4d4d0034c0 Correct the documentation for getreadbufferproc and getwritebufferproc.
Fixes bug #233308 from Travis Oliphant.
2001-04-07 16:14:49 +00:00
Greg Stein 76977bbcaf Add an uninstall method to the ImportManager.
This is the accepted portion of patch #402498.
2001-04-07 16:05:24 +00:00
Jack Jansen 43935128a4 Finally merged morefindertools into findertools. 2001-04-07 12:53:45 +00:00
Fred Drake 501d90471d Add entry for unittest documentation. 2001-04-07 05:42:14 +00:00
Fred Drake b9ad228798 Start of documentation for the unittest module. Some of this comes from
Steve Purcell's documentation, and a lot of it is written based on
using PyUnit and reading the implementation.

There is more to come, but I want to get this check in before I have a
disk crash or anything else bad happens.
2001-04-07 05:41:39 +00:00
Tim Peters eb26f95906 Since Guido fiddled Cookie.py to work with doctest, it's a Good Thing to
have the std test suite exercise the Cookie doctests too.
2001-04-06 21:20:58 +00:00
Guido van Rossum 58b6f5b53e Since this module already uses doctest-style examples, I figured I'd
add a self-test using doctest.  Results:

- The docstring needs to be a raw string because it uses \"...\".

- The oreo example was broken: the Set-Cookie output doesn't add
  quotes around "doublestuff".

- I had to change the example that prints the class of a Cookie.Cookie
  instance to avoid incorporating an arbitrary object address in the
  test output.

Pretty good score for both doctest and the doc string, I'd say!
2001-04-06 19:39:11 +00:00
Tim Peters f95423e265 Remove lines for asynchat & asyncore, as they've now got their own test. 2001-04-06 18:59:17 +00:00
Guido van Rossum dca060c55c After testing the test on Unix, several improvements:
- Use push() instead of send(), and make these calls in main().

- Sleep a second to give the server thread time to initialize itself.
2001-04-06 16:43:49 +00:00
Guido van Rossum 66172520ee Add test for asynchat. This also tests asyncore. 2001-04-06 16:32:22 +00:00
Guido van Rossum e4a1b6d7c4 Make the docstring a raw string, for pydoc.
(How many opre of these will we need? :-( )
2001-04-06 15:30:33 +00:00
Jack Jansen 3aee7752fa Added a note about Help and ctb missing in carbon. 2001-04-06 09:02:43 +00:00
Jack Jansen bad62deca1 Version 1.2 by Christopher Stern. 2001-04-06 08:34:55 +00:00
Tim Peters b5d1392d92 Fix the fix (my error -- hasty pasty). 2001-04-05 22:38:32 +00:00
Tim Peters a29b6222fe One-liner critical fix from Jim Fulton: Eric's string-method crusade
got the order backwards in a line (for .find()).
2001-04-05 22:26:23 +00:00
Fred Drake 4cf1227e56 Change {\em ...} to \emph{...} for consistency with the rest of the Python
documentation.
2001-04-05 18:31:27 +00:00
Fred Drake f459d852e5 Add some information about what to expect of the DocumentType's
.internalSubset attribute based on a clarification from the www-dom
list.
2001-04-05 18:30:04 +00:00
Fred Drake d3908e2952 Effectively revert the previous change: leave the new #include in, but
comment it out with an explanation.  This makes it easier for someone
who wants the additional symbols to try re-enabling it for their platform.
2001-04-05 18:26:31 +00:00
Fred Drake d34a9c98a9 Added more link attributes based on additonal information from Chris
McCafferty <christopher.mccafferty@csg.ch>, and a bit of experimentation
with Navigator 4.7.

HTML-as-deployed is evil!
2001-04-05 18:14:50 +00:00
Andrew M. Kuchling 37f0263811 Bug #412086, reported by Peter Wilson: The _curses module doesn't
define COLORS or COLOR_PAIRS until after start_color() is called,
    but they were never added to the curses module.  Fixed by adding
    a wrapper around start_color(), similar to the wrapper around initscr().
2001-04-05 16:08:41 +00:00
Andrew M. Kuchling 7880e5ecd7 Patch #413912 from Steve Majewski: Add .m to the list of extensions
in order to support Objective-C.
2001-04-05 15:46:48 +00:00
Andrew M. Kuchling 88717f4825 Mention pydoc in the man page 2001-04-05 14:50:40 +00:00
Fred Drake dc806704b5 Corrected default value of the DocumentType.internalSubset attribute based
on a clarification sent to the www-dom list.
2001-04-05 14:41:30 +00:00
Fred Drake 9b3bc49575 Add an #include of sys/ioctl.h to pick up a lot of the constants supported
in the previous patch.

This closes (again!) SF patch #410267.
2001-04-04 21:19:26 +00:00
Tim Peters 7d3bad66e4 Sf bug [ #412214 ] ZipFile constructor leaves files open.
This applies the patch Fred Drake created to fix it.
I'm checking it in since I had to apply the patch anyway in order
to test its behavior on Windows.
2001-04-04 18:56:49 +00:00
Tim Peters 42fc7ccdac SF patch [ #413750 ] Cygwin entry for README file, from Jason Tishler. 2001-04-04 18:35:19 +00:00
Fred Drake f3186e8242 A number of improvements based on a discussion with Chris McCafferty
<christopher.mccafferty@csg.ch>:

Add javascript: and telnet: to the types of URLs we ignore.

Add support for several additional URL-valued attributes on the BODY,
FRAME, IFRAME, LINK, OBJECT, and SCRIPT elements.
2001-04-04 17:47:25 +00:00
Fred Drake 33d2b84b2c CharacterData methods: Update self.length on changes instead of extended
the __getattr__() handler.

Text.splitText():  Update the length and nodeValue attributes.
2001-04-04 15:15:18 +00:00
Fred Drake 87432f42f9 Add support for the CharacterData methods, CDATASection. 2001-04-04 14:09:46 +00:00
Fred Drake c6a3cb4baf Document PySequence_Size(), and describe PySequence_Length() as simply an
alternate name for the same function.
2001-04-04 01:25:17 +00:00