Commit graph

17449 commits

Author SHA1 Message Date
Fred Drake
8d00a0ffc3 Michael Hudson:
Update docs for PyDict_Next() based on the most recent changes to the
dictionary code.

This closes SF patch #409864.
2001-04-13 17:55:02 +00:00
Guido van Rossum
058dae37a6 I am TENTATIVELY checking in Martin von Loewis's patch for the SSL
problem reported by Neil Schemenauer on python-dev on 4/12/01, wth
subject "Problem with SSL and socketmodule on Debian Potato?".

It's tentative because Moshe objected, but Martin rebutted, and Moshe
seems unavailable for comments.

(Note that with OpenSSL 0.9.6a, I get a lot of compilation warnings
for socketmodule.c -- I'm assuming I can safely ignore these until 2.1
is released.)
2001-04-13 17:54:04 +00:00
Jeremy Hylton
37832f0c8d split long line 2001-04-13 17:50:20 +00:00
Fred Drake
0c4d468e39 Fixup some platform annotations. 2001-04-13 17:37:00 +00:00
Fred Drake
2441366930 Work around the conversion of ">>" and "<<" to guillemets. Reported by Ping. 2001-04-13 17:32:49 +00:00
Fred Drake
c054c75582 Work around the conversion of ">>" and "<<" to guillemets. Reported by Ping. 2001-04-13 17:25:38 +00:00
Fred Drake
705088e65f Added regression test for SF bug #415660 (failure to invalidate all
references to an object before calling registered callbacks).

Change last uses of verify() to self.assert_().
2001-04-13 17:18:15 +00:00
Fred Drake
2a5a5ca012 cleanup_helper(): Make sure we invalidate all reference objects
before calling any callbacks.  This is important
                   since the callback objects only look at themselves
                   to determine that they are invalide.  This change
                   avoids a segfault when callbacks use a different
                   reference to an object in the process of being
                   deallocated.

This fixes SF bug #415660.
2001-04-13 17:15:47 +00:00
Guido van Rossum
eb0d992520 Slight adaptation of Michael Hudson's patch to test PyDict_Next()
(with modification of existing dict elements!).

This is part of SF patch #409864: lazy fix for Pings bizarre scoping
crash.

The adaptation I made to Michael's patch was to change the error
handling to avoid masking other errors (moving the specific error
message to inside test_dict_inner()), and to insert a test for
dict==NULL at the start.
2001-04-13 17:08:15 +00:00
Guido van Rossum
361c535863 Fix typo in comment (the module is now called _testcapi, not _test). 2001-04-13 17:03:04 +00:00
Jeremy Hylton
c76770c68c Change error message raised when free variable is not yet bound. It
now raises NameError instead of UnboundLocalError, because the var in
question is definitely not local.  (This affects test_scope.py)

Also update the recent fix by Ping using get_func_name().  Replace
tests of get_func_name() return value with call to get_func_desc() to
match all the other uses.
2001-04-13 16:51:46 +00:00
Fred Drake
62effc1127 Work around the conversion of ">>" and "<<" to guillemets. Reported by Ping. 2001-04-13 15:55:25 +00:00
Fred Drake
fb8ffe6b5e Work around the conversion of ">>" and "<<" to guillemets. Reported by Ping.
Wrap some long lines and fix some markup nits.
2001-04-13 15:54:41 +00:00
Guido van Rossum
d9994e0115 Patch by Ping (SF bug 415879, Exception.__init__() causes segfault):
Calling an unbound method on a C extension class without providing
   an instance can yield a segfault.  Try "Exception.__init__()" or
   "ValueError.__init__()".

   This is a simple fix. The error-reporting bits in call_method
   mistakenly treat the misleadingly-named variable "func" as a
   function, when in fact it is a method.

   If we let get_func_name take care of the work, all is fine.
2001-04-13 15:42:40 +00:00
Ka-Ping Yee
d03f8fe95e One-character style change to appease Netscape stylesheets. 2001-04-13 15:04:32 +00:00
Guido van Rossum
575d7f3f3f Oops. Need an extra blank line after the PSF license. 2001-04-13 15:04:31 +00:00
Guido van Rossum
9ea60c51bb - Inserted the (tentative) PSF license.
- Removed the subsection numbering in section B (each time a new
  license is inserted in the front, the others have to be renumbered).

- Changed the words in the intro to avoid implying that 1.6.1 is
  GPL-compatible.
2001-04-13 15:04:00 +00:00
Ka-Ping Yee
6191a23537 Use nturl2path to generate a file: URL to source files in Windows. 2001-04-13 15:00:27 +00:00
Jeremy Hylton
79fa2b6073 Add test for SF bug #405427 2001-04-13 14:57:44 +00:00
Jeremy Hylton
23d4047790 SF patch #405845 by Martin von Löwis
Fixes SF bug #405427.
If an http response has a bogus return code, e.g. 400.100, raise
BadStatusLine.
2001-04-13 14:57:08 +00:00
Jeremy Hylton
3bee2f6011 Update to reflect new tokenize_test.py 2001-04-13 14:55:18 +00:00
Fred Drake
d20d8b319c Work around the conversion of ">>" and "<<" to guillemets. Reported by Ping. 2001-04-13 14:52:39 +00:00
Jeremy Hylton
a4553c04fd There's no need for the tokenize tests to include a SyntaxError. 2001-04-13 14:36:51 +00:00
Fred Drake
a3e56a6ceb Minor markup adjustments.
Turn reference to the cmd module into a hyperlink.
2001-04-13 14:34:58 +00:00
Ka-Ping Yee
022171fa21 Clean up isroutine(). 2001-04-13 14:04:02 +00:00
Ka-Ping Yee
9bc576b7f6 Use inspect.stack()[1][3] to tell if Helper.__repr__ is called interactively. 2001-04-13 13:57:31 +00:00
Ka-Ping Yee
eca15c1fb1 Add inode checks to detect circular symbolic links (so that the
Tools/idle/idlelib link doesn't cause an infinite loop -- aack!)
2001-04-13 13:53:07 +00:00
Ka-Ping Yee
59685c5193 Small style change to accommodate Netscape. 2001-04-13 12:11:19 +00:00
Ka-Ping Yee
c99e0f1862 Robustify getfile() against classes that lie about their __module__s
(such as the exceptions in _weakref and _locale!)
2001-04-13 12:10:40 +00:00
Ka-Ping Yee
da79389f10 Word-wrap the list of cross-references. 2001-04-13 11:02:51 +00:00
Ka-Ping Yee
79c009d767 Another pass through the topic table to fill in cross references.
Restore Helper.__repr__ for now.
2001-04-13 10:53:25 +00:00
Ka-Ping Yee
dec96e92ae Make force-loading optional; don't force-load in interactive mode.
Make synopsis() load modules as '__temp__' so they don't clobber anything.
Change "constants" section to "data" section.
Don't show __builtins__ or __doc__ in "data" section.
For Bob Weiner: don't boldface text in Emacs shells or dumb terminals.
Remove Helper.__repr__ (it really belongs in site.py, and should be                 guarded by a check for len(inspect.stack) <= 2).
2001-04-13 09:55:49 +00:00
Ka-Ping Yee
202c99b2e0 Remove duplicate type objects from isroutine() and isbuiltin().
Make getmodule() on a module return the module itself.
2001-04-13 09:15:08 +00:00
Martin v. Löwis
88ad12afac Patch #415777: new grouping strategy.
fixes bug #414940, and redoes the fix for #129417 in a different way.
It also fixes a number of other problems with locale-specific formatting:
If there is leading or trailing spaces, then no grouping should be applied
in the spaces, and the total length of the string should not be changed
due to grouping.
Also added test case which works only if the en_US locale is available.
2001-04-13 08:09:50 +00:00
Tim Peters
613b2222cf Whitespace normalization. 2001-04-13 05:37:27 +00:00
Fred Drake
e1f3ed6b58 Update the helper scripts that push development docs to SourceForge;
this version avoids having to build a separate authenticated connection
to push the update-docs.sh script to SF.
2001-04-13 05:13:55 +00:00
Fred Drake
3de33697ef Add entry for ColorPicker documentation as well. 2001-04-13 04:50:01 +00:00
Fred Drake
b6bdcb23df Documentation for Just's ColorPicker module, so the Mac OS guys get
something out of this documentation release as well.  ;-)
2001-04-13 04:49:30 +00:00
Guido van Rossum
4fb60361dc Note additions to pydoc and pstats. 2001-04-13 00:46:14 +00:00
Eric S. Raymond
4f3980d3cb Added a test main to the pstats library that can help you browse profile dumps. 2001-04-13 00:23:01 +00:00
Fred Drake
f4e5bd9df5 _synthesize(): Helper function: when the users passes a specific
value for the 'using' parameter of the get() function
                or the BROWSER environment variable, if the thing
                passed in is a path (as seems to be the case with KDE)
                instead of a short name, examine the available
                controllers to see if we can synthesize one based on a
                pre-registered controller that shares the same base
                name.

get():  If the user specifies a browser we don't know about, use
        _synthesize() to attempt to create a usable controller.

Some small adjustments were needed in some of the browser classes to
support this.
2001-04-12 22:07:27 +00:00
Jeremy Hylton
bb0bae6da2 Pop loop off the loop stack before handling the loop's else clause.
Otherwise, continue/break will attempt to affect the wrong loop.

A few more fiddles to get the SET_LINENOs consistent across compilers.
2001-04-12 21:54:41 +00:00
Jeremy Hylton
13d70944cb Use new _implicitNameOp() to generate name op code for list comprehensions.
Always emit a SET_LINENO 0 at the beginning of the module.  The
builtin compiler does this, and it's much easier to compare bytecode
generated by the two compilers if they both do.

Move the SET_LINENO inside the FOR_LOOP block for list
comprehensions.  Also for compat. with builtin compiler.
2001-04-12 21:04:43 +00:00
Guido van Rossum
23f7aed2a7 Because this code was derived from Python 1.6.1 (amongst others), the
CNRI copyright should be updated to include 2001.
2001-04-12 20:53:31 +00:00
Ka-Ping Yee
b7a48300cd Fix linking to classes (in class tree, and add links on unbound methods). 2001-04-12 20:39:14 +00:00
Ka-Ping Yee
6dcfa3884d Fix call to ModuleScanner from GUI search interface.
Fix handling of unbound top-level methods.
2001-04-12 20:27:31 +00:00
Fred Drake
47f11ce591 Added warning that FancyURLopener prompts the user on the terminal when
basic authentication is needed.

Added documentation for FancyURLopener.prompt_user_passwd(), explaining
that subclasses should provide more appropriate behavior for the hosting
environment.
2001-04-12 20:26:49 +00:00
Jeremy Hylton
614e87f286 Add support for visitAssAttr to findOp(). 2001-04-12 20:24:26 +00:00
Jeremy Hylton
542b11acfd pyassem.py:
Fix annoying bugs in flow graph layout code.  In some cases the
    implicit control transfers weren't honored.  In other cases,
    JUMP_FORWARD instructions jumped backwards.

    Remove unused arg from nextBlock().

pycodegen.py

    Add optional force kwarg to set_lineno() that will emit a
    SET_LINENO even if it is the same as the previous lineno.

    Use explicit LOAD_FAST and STORE_FAST to access list comp implicit
    variables.  (The symbol table doesn't know about them.)
2001-04-12 20:21:39 +00:00
Ka-Ping Yee
35cf0a3f90 Added a big new Helper class to provide interactive help! 2001-04-12 19:53:52 +00:00