Greg Ward [Tue, 23 Mar 1999 14:00:06 +0000 (14:00 +0000)]
Changes to allow passing an open file to the constructor (to support
ProcessHierarchy's changes to support reading from a remote URL in
ProcessDatabase).
Guido van Rossum [Mon, 22 Mar 1999 21:44:51 +0000 (21:44 +0000)]
Clean up pass for the previous patches.
- Use HAVE_GETHOSTBYNAME_R_6_ARG instead of testing for Linux and
glibc2.
- If gethostbyname takes 3 args, undefine HAVE_GETHOSTBYNAME_R --
don't know what code should be used.
- New symbol USE_GETHOSTBYNAME_LOCK defined iff the lock should be used.
- Modify the gethostbyaddr() code to also hold on to the lock until
after it is safe to release, overlapping with the Python lock.
(Note: I think that it could in theory be possible that Python code
executed while gethostbyname_lock is held could attempt to reacquire
the lock -- e.g. in a signal handler or destructor. I will simply say
"don't do that then.")
Guido van Rossum [Mon, 22 Mar 1999 20:14:53 +0000 (20:14 +0000)]
Jonathan Giddy writes:
Here's a patch to fix the race condition, which wasn't fixed by Rob's
patch. It holds the gethostbyname lock until the results are copied out,
which means that this lock and the Python global lock are held at the same
time. This shouldn't be a problem as long as the gethostbyname lock is
always acquired when the global lock is not held.
Fixed the flush() method of compression objects; the test for
the end of loop was incorrect, and failed when the flushmode != Z_FINISH.
Logic cleaned up and commented.
Greg Ward [Mon, 22 Mar 1999 14:54:09 +0000 (14:54 +0000)]
Obsolete source file -- command options are actually implemented in
a much less formalistic way. Just keeping this around for possible
future reference.
Guido van Rossum [Fri, 19 Mar 1999 20:59:40 +0000 (20:59 +0000)]
Fix a problem with Vladimir's PyFloat_Fini code: clear the free list; if
a block cannot be freed, add its free items back to the free list.
This is necessary to avoid leaking when Python is reinitialized later.
Guido van Rossum [Fri, 19 Mar 1999 20:30:39 +0000 (20:30 +0000)]
Fix a problem with Vladimir's PyInt_Fini code: clear the free list; if
a block cannot be freed, add its free items back to the free list, and
add its valid ints back to the small_ints array if they are in range.
This is necessary to avoid leaking when Python is reinitialized later.
Fred Drake [Thu, 18 Mar 1999 16:18:27 +0000 (16:18 +0000)]
Add some (commented out) macros to change the page size to the size of
typical published manuals, so people can more easily see what they're
really asking for. ;-)
Revise the verbatim environment: simple implementation, but more
compatible if a document also add \usepackage{verbatim} at the
beginning.
Declare \modindex, \bimodindex, \exmodindex, and \stmodindex
obsolete. These still work just fine, but \declaremodule should be
used instead. The obsolete macros will print a warning on standard
out.
Guido van Rossum [Thu, 18 Mar 1999 15:10:44 +0000 (15:10 +0000)]
Sjoerd Mullender writes:
If a filename on Windows starts with \\, it is converted to a URL
which starts with ////. If this URL is passed to urlparse.urlparse
you get a path that starts with // (and an empty netloc). If you pass
the result back to urlparse.urlunparse, you get a URL that starts with
//, which is parsed differently by urlparse.urlparse. The fix is to
add the (empty) netloc with accompanying slashes if the path in
urlunparse starts with //. Do this for all schemes that use a netloc.
Guido van Rossum [Thu, 18 Mar 1999 14:21:41 +0000 (14:21 +0000)]
Sjoerd Mullender writes:
Pathnames of files on other hosts in the same domain
(\\host\path\to\file) are not translated correctly to URLs and back.
The URL should be something like file:////host/path/to/file.
Note that a combination of drive letter and remote host is not
possible.
Jack Jansen [Wed, 17 Mar 1999 22:57:55 +0000 (22:57 +0000)]
Remove all owner resources from template, and if no owner resource contained in
applet-specific rsrc file we add a "Pyta" owner resource. Owner resources have both id=0 and name="Owner resource" (is this always true?).
Guido van Rossum [Wed, 17 Mar 1999 22:30:10 +0000 (22:30 +0000)]
Delete non-standard-conforming code in urljoin() that would use the
netloc from the base url as the default netloc for the resulting url
even if the schemes differ.
Once upon a time, when the web was wild, this was a valuable hack
because some people had a URL referencing an ftp server colocated with
an http server without having the host in the ftp URL (so they could
replicate it or change the hostname easily).
More recently, after the file: scheme got added back to the list of
schemes that accept a netloc, it turns out that this caused weirdness
when joining an http: URL with a file: URL -- the resulting file: URL
would always inherit the host from the http: URL because the file:
scheme supports a netloc but in practice never has one.
There are two reasons to get rid of the old, once-valuable hack,
instead of removing the file: scheme from the uses_netloc list. One,
the RFC says that file: uses the netloc syntax, and does not endorse
the old hack. Two, neither netscape 4.5 nor IE 4.0 support the old
hack.
Guido van Rossum [Tue, 16 Mar 1999 21:54:50 +0000 (21:54 +0000)]
Bug reported by Jim Robinson:
An attempt to execute grid_slaves with arguments (0,0) results in
*all* of the slaves being returned, not just the slave associated with
row 0, column 0. This is because the test for arguments in the method
does not test to see if row (and column) does not equal None, but
rather just whether is evaluates to non-false. A value of 0 fails
this test.
Guido van Rossum [Mon, 15 Mar 1999 20:27:53 +0000 (20:27 +0000)]
Rob Riggs wrote:
"""
Spec says that on success pthread_create returns 0. It does not say
that an error code will be < 0. Linux glibc2 pthread_create() returns
ENOMEM (12) when one exceed process limits. (It looks like it should
return EAGAIN, but that's another story.)
For reference, see:
http://www.opengroup.org/onlinepubs/7908799/xsh/pthread_create.html
"""
[I have a feeling that similar bugs were fixed before; perhaps someone
could check that all error checks no check for != 0?]
Guido van Rossum [Mon, 15 Mar 1999 16:37:54 +0000 (16:37 +0000)]
New mixin class that defines cmp and hash that use
the ob_itself pointer. This allows (when using the mixin)
different Python objects pointing to the same C object and
behaving well as dictionary keys.
Jack Jansen [Sat, 13 Mar 1999 23:07:32 +0000 (23:07 +0000)]
If a control has no refcon pointing back to the Python object we create a new
Python object. This needs a new bgenObjectDefinition.py, which implements
compare and hash functions.
Guido van Rossum [Fri, 12 Mar 1999 22:07:05 +0000 (22:07 +0000)]
Bug submitted by Wayne Knowles, who writes:
Under Windows, python freeze.py -o hello hello.py
creates all the correct files in the hello subdirectory, but the
Makefile has the directory prefix in it for frozen_extensions.c
nmake fails because it tries to locate hello/frozen_extensions.c
(His fix adds a call to os.path.basename() in the appropriate place.)
Guido van Rossum [Fri, 12 Mar 1999 19:43:17 +0000 (19:43 +0000)]
Vladimir has restructured his code somewhat so that the blocks are now
represented by an explicit structure. (There are still too many casts
in the code, but that may be unavoidable.)
Also added code so that with -vv it is very chatty about what it does.
Guido van Rossum [Fri, 12 Mar 1999 00:12:21 +0000 (00:12 +0000)]
OK, try again. Vladimir gave me a fix for the alignment bus error,
so here's his patch again. This time it works (at least on Solaris,
Linux and Irix).
Guido van Rossum [Thu, 11 Mar 1999 16:37:13 +0000 (16:37 +0000)]
- Don't crash in the case where a superclass is a string instead of a
pyclbr.Class object; this can happen when the superclass is
unrecognizable (to pyclbr), e.g. when module renaming is used.
- Show a watch cursor when calling pyclbr (since it may take a while
recursively parsing imported modules!).
Fred Drake [Thu, 11 Mar 1999 16:04:04 +0000 (16:04 +0000)]
Added .rdf and .xsl as application/xml types. (.rdf is for the
Resource Description Framework, a metadata encoding, and .xsl is for
the Extensible Stylesheet Language.)
Guido van Rossum [Wed, 10 Mar 1999 05:17:28 +0000 (05:17 +0000)]
"Path browser" - 4 scrolled lists displaying:
directories on sys.path
modules in selected directory
classes in selected module
methods of selected class
Sinlge clicking in a directory, module or class item updates the next
column with info about the selected item. Double clicking in a
module, class or method item opens the file (and selects the clicked
item if it is a class or method).
I guess eventually I should be using a tree widget for this, but the
ones I've seen don't work well enough, so for now I use the old
Smalltalk or NeXT style multi-column hierarchical browser.
I had an off-by-1000 error in floatsleep(),
and the problem with time.clock() is that it's not implemented properly
on QNX... ANSI says it's supposed to return _CPU_ time used by the
process, but on QNX it returns the amount of real time used... so I was
confused.
Jack Jansen [Sun, 7 Mar 1999 23:11:21 +0000 (23:11 +0000)]
Offscreen bitmap support, first stab. PixMaps are still treated as ordinary
handles, not fullblown python objects, and UpdateGWorld returns a new GWorld
object in stead of modifying the existing one.