]> granicus.if.org Git - python/log
python
23 years agoAdd utility to set filename attribute on all nodes
Jeremy Hylton [Mon, 17 Sep 2001 18:02:21 +0000 (18:02 +0000)]
Add utility to set filename attribute on all nodes

23 years agoBrian Quinlan's XML-RPC server framework.
Fredrik Lundh [Mon, 17 Sep 2001 17:35:21 +0000 (17:35 +0000)]
Brian Quinlan's XML-RPC server framework.

23 years agosupport true division
Jeremy Hylton [Mon, 17 Sep 2001 16:41:02 +0000 (16:41 +0000)]
support true division

23 years ago[Patch #462255, from Jason Tishler] Re-enables building the resouce
Andrew M. Kuchling [Mon, 17 Sep 2001 16:19:16 +0000 (16:19 +0000)]
[Patch #462255, from Jason Tishler] Re-enables building the resouce
    module on the Cygwin platform.

23 years agoSF patch #461781 by Chris Lawrence: os.path.realpath - Resolve symlinks:
Guido van Rossum [Mon, 17 Sep 2001 15:16:09 +0000 (15:16 +0000)]
SF patch #461781 by Chris Lawrence: os.path.realpath - Resolve symlinks:

   Once upon a time, I put together a little function
   that tries to find the canonical filename for a given
   pathname on POSIX. I've finally gotten around to
   turning it into a proper patch with documentation.
   On non-POSIX, I made it an alias for 'abspath', as
   that's the behavior on POSIX when no symlinks are
   encountered in the path.

   Example:
   >>> os.path.realpath('/usr/bin/X11/X')
   '/usr/X11R6/bin/X'

23 years agoAdd cross-compilation defaults to most AC_TRY_RUN values. The
Guido van Rossum [Mon, 17 Sep 2001 04:03:14 +0000 (04:03 +0000)]
Add cross-compilation defaults to most AC_TRY_RUN values.  The
supplied values are the most "normal" or "common" values found for
recent 32 bit machines.  This now seems to work to build Python 2.2
for the ARM processor used on the iPAQ.

23 years agoPyObject_Dir(): Merge in __members__ and __methods__ too (if they exist,
Tim Peters [Mon, 17 Sep 2001 02:38:46 +0000 (02:38 +0000)]
PyObject_Dir():  Merge in __members__ and __methods__ too (if they exist,
and are lists, and then just the string elements (if any)).

There are good and bad reasons for this.  The good reason is to support
dir() "like before" on objects of extension types that haven't migrated
to the class introspection API yet.  The bad reason is that Python's own
method objects are such a type, and this is the quickest way to get their
im_self etc attrs to "show up" via dir().  It looks much messier to move
them to the new scheme, as their current getattr implementation presents
a view of their attrs that's a untion of their own attrs plus their
im_func's attrs.  In particular, methodobject.__dict__ actually returns
methodobject.im_func.__dict__, and if that's important to preserve it
doesn't seem to fit the class introspection model at all.

23 years agomerge_class_dict(): Clear the error if __bases__ doesn't exist.
Tim Peters [Sun, 16 Sep 2001 20:33:22 +0000 (20:33 +0000)]
merge_class_dict():  Clear the error if __bases__ doesn't exist.

23 years agoIn a world with a growing number of subclassable types, replace
Tim Peters [Sun, 16 Sep 2001 08:40:16 +0000 (08:40 +0000)]
In a world with a growing number of subclassable types, replace
    type(x) is T
tests with
    isinstance(x, T)
Also got rid of a future-generators import, left over from code that
wasn't intended to get checked in.

23 years agoImprove handling of docstrings. I had feared this was a case of
Tim Peters [Sun, 16 Sep 2001 02:19:49 +0000 (02:19 +0000)]
Improve handling of docstrings.  I had feared this was a case of
introspection incompatibility, but in fact it's just that calltips
always gave up on a docstring that started with a newline (but
didn't realize they were giving up <wink>).

23 years agoFixed typo in new 'p' description.
Tim Peters [Sat, 15 Sep 2001 18:16:27 +0000 (18:16 +0000)]
Fixed typo in new 'p' description.

23 years agoSF bug [#461674] struct 'p' format doesn't work (maybe)
Tim Peters [Sat, 15 Sep 2001 18:09:22 +0000 (18:09 +0000)]
SF bug [#461674] struct 'p' format doesn't work (maybe)
Rewrote the 'p' description.

23 years agoSince we had a bug with multiplication of dynamic long subclasses, add a
Tim Peters [Sat, 15 Sep 2001 06:35:55 +0000 (06:35 +0000)]
Since we had a bug with multiplication of dynamic long subclasses, add a
little test to make sure it doesn't come back.

23 years agoA fix for SF bug #461546 (bug in long_mul).
Guido van Rossum [Sat, 15 Sep 2001 03:14:32 +0000 (03:14 +0000)]
A fix for SF bug #461546 (bug in long_mul).

Both int and long multiplication are changed to be more careful in
their assumptions about when one of the arguments is a sequence: the
assumption that at least one of the arguments must be an int (or long,
respectively) is still held, but the assumption that these don't smell
like sequences is no longer true: a subtype of int or long may well
have a sequence-repeat thingie!

23 years agoThe 'p' (Pascal string) pack code acts unreasonably when the string size
Tim Peters [Sat, 15 Sep 2001 02:35:15 +0000 (02:35 +0000)]
The 'p' (Pascal string) pack code acts unreasonably when the string size
and count exceed 255.  Changed to preserve as much of the string as
possible (instead of count%256 characters).

23 years agoAdd code generator for yield stmt
Jeremy Hylton [Fri, 14 Sep 2001 23:17:55 +0000 (23:17 +0000)]
Add code generator for yield stmt

23 years agolimit prefix test for lambda
Jeremy Hylton [Fri, 14 Sep 2001 23:01:49 +0000 (23:01 +0000)]
limit prefix test for lambda

the compiler package generates a module-unique trailing suffix for
each lambda

23 years agodel no longer necessary now that new module is gone
Jeremy Hylton [Fri, 14 Sep 2001 22:54:48 +0000 (22:54 +0000)]
del no longer necessary now that new module is gone

23 years agoVarious sundry changes for 2.2 compatibility
Jeremy Hylton [Fri, 14 Sep 2001 22:49:08 +0000 (22:49 +0000)]
Various sundry changes for 2.2 compatibility

Remove the option to have nested scopes or old LGB scopes.  This has a
large impact on the code base, by removing the need for two variants
of each CodeGenerator.

Add a get_module() method to CodeGenerator objects, used to get the
future features for the current module.

Set CO_GENERATOR, CO_GENERATOR_ALLOWED, and CO_FUTURE_DIVISION flags
as appropriate.

Attempt to fix the value of nlocals in newCodeObject(), assuming that
nlocals is 0 if CO_NEWLOCALS is not defined.

23 years agoThe object-being sliced in an assignment to a slice is referenced, not
Jeremy Hylton [Fri, 14 Sep 2001 22:45:57 +0000 (22:45 +0000)]
The object-being sliced in an assignment to a slice is referenced, not
bound.

When a Yield() node is visited, assign to the generator attribute of
the scope, not the visitor.

23 years agothe new new doesn't define CO_xxx as the old new did
Jeremy Hylton [Fri, 14 Sep 2001 22:44:35 +0000 (22:44 +0000)]
the new new doesn't define CO_xxx as the old new did

23 years agothe names attribute of Global is not a node
Jeremy Hylton [Fri, 14 Sep 2001 22:40:36 +0000 (22:40 +0000)]
the names attribute of Global is not a node

23 years agoUpdate the warning about transporting marshals across boxes with different
Tim Peters [Fri, 14 Sep 2001 20:40:13 +0000 (20:40 +0000)]
Update the warning about transporting marshals across boxes with different
ideas about sizeof(long).

23 years agoSupply code objects a new-style tp_members slot and tp_getattr impl.
Jeremy Hylton [Fri, 14 Sep 2001 20:08:07 +0000 (20:08 +0000)]
Supply code objects a new-style tp_members slot and tp_getattr impl.

The chief effects are to make dir() do something useful and supply
them with an __class__.

23 years agotp_new_wrapper(): A subtle change in the check for safe use.
Guido van Rossum [Fri, 14 Sep 2001 19:43:36 +0000 (19:43 +0000)]
tp_new_wrapper(): A subtle change in the check for safe use.
Allow staticbase != type, as long as their tp_new slots are the same.

23 years agoAdd call_maybe(): a variant of call_method() that returns
Guido van Rossum [Fri, 14 Sep 2001 17:51:50 +0000 (17:51 +0000)]
Add call_maybe(): a variant of call_method() that returns
NotImplemented when the lookup fails, and use this for binary
operators.  Also lookup_maybe() which doesn't raise an exception when
the lookup fails (still returning NULL).

23 years agoMarkup adjustments for consistency.
Fred Drake [Fri, 14 Sep 2001 17:48:41 +0000 (17:48 +0000)]
Markup adjustments for consistency.

23 years agocall_method():
Guido van Rossum [Fri, 14 Sep 2001 16:58:08 +0000 (16:58 +0000)]
call_method():

- Don't turn a non-tuple argument into a one-tuple.  Rather, the
  caller must pass a format that causes Py_VaBuildValue() to return a
  tuple.

- Speed things up by calling PyObject_Call (which is fairly low-level
  and straightforward) rather than PyObject_CallObject (which calls
  PyEval_CallObjectWithKeywords which calls PyObject_Call, and nothing
  is really done in the mean time except some tests for NULL args and
  valid types, which are already guaranteed).

- Cosmetics.

Other places:

- Make sure that the format argument to call_method() is surrounded by
  parentheses, so it will cause a tuple to be created.

- Replace a few calls to PyEval_CallObject() with a surefire tuple for
  args to calls to PyObject_Call().  (A few calls to
  PyEval_CallObject() remain that have NULL for args.)

23 years agoPyObject_CallObject(): this may as well call PyEval_CallObject()
Guido van Rossum [Fri, 14 Sep 2001 16:47:50 +0000 (16:47 +0000)]
PyObject_CallObject(): this may as well call PyEval_CallObject()
directly, as the only thing done here (replace NULL args with an empty
tuple) is also done there.

XXX Maybe we should take one step further and equate the two at the
macro level?  That's harder though because PyEval_Call* is declared in
a header that's not included standard.  But it is silly that
PyObject_CallObject calls PyEval_CallObject which calls back to
PyObject_Call.  Maybe PyEval_CallObject should be moved into this file
instead?  All I know is that there are too many call APIs!  The
differences between PyObject_Call and PyEval_CallObjectWithKeywords is
that the latter allows args to be NULL, and does explicit type checks
for args and kwds.

23 years agoMention SMTP additions and hmac module.
Guido van Rossum [Fri, 14 Sep 2001 16:35:16 +0000 (16:35 +0000)]
Mention SMTP additions and hmac module.

23 years agoAdd support for SMTP TLS
Andrew M. Kuchling [Fri, 14 Sep 2001 16:19:27 +0000 (16:19 +0000)]
Add support for SMTP TLS

23 years agoSF patch #461413 (Gerhard Häring): Add STARTTLS feature to smtplib
Guido van Rossum [Fri, 14 Sep 2001 16:08:44 +0000 (16:08 +0000)]
SF patch #461413 (Gerhard Häring): Add STARTTLS feature to smtplib

   This patch adds the features from RFC 2487 (Secure SMTP
   over TLS) to the smtplib module:

   - A starttls() function
   - Wrapper classes that simulate enough of sockets and
     files for smtplib, but really wrap a SSLObject
   - reset the list of known SMTP extensions at each call
     of ehlo(). This should have been the case anyway.

23 years ago_PyObject_Dump(): print the type of the object. This is by far the
Guido van Rossum [Fri, 14 Sep 2001 15:50:08 +0000 (15:50 +0000)]
_PyObject_Dump(): print the type of the object.  This is by far the
most frequently interesting information IMO.  Also tidy up the output.

23 years agoThe end of [#460467] file objects should be subclassable.
Tim Peters [Fri, 14 Sep 2001 03:26:08 +0000 (03:26 +0000)]
The end of [#460467] file objects should be subclassable.
A surprising number of changes to split tp_new into tp_new and tp_init.
Turned out the older PyFile_FromFile() didn't initialize the memory it
allocated in all (error) cases, which caused new sanity asserts
elsewhere to fail left & right (and could have, e.g., caused file_dealloc
to try decrefing random addresses).

23 years agoChanged the dict implementation to take "string shortcuts" only when
Tim Peters [Fri, 14 Sep 2001 00:25:33 +0000 (00:25 +0000)]
Changed the dict implementation to take "string shortcuts" only when
keys are true strings -- no subclasses need apply.  This may be debatable.

The problem is that a str subclass may very well want to override __eq__
and/or __hash__ (see the new example of case-insensitive strings in
test_descr), but go-fast shortcuts for strings are ubiquitous in our dicts
(and subclass overrides aren't even looked for then).  Another go-fast
reason for the change is that PyCheck_StringExact() is a quicker test
than PyCheck_String(), and we make such a test on virtually every access
to every dict.

OTOH, a str subclass may also be perfectly happy using the base str eq
and hash, and this change slows them a lot.  But those cases are still
hypothetical, while Python's own reliance on true-string dicts is not.

23 years agoGet rid of builtin_open() entirely (the C code and docstring, not the
Tim Peters [Thu, 13 Sep 2001 21:49:44 +0000 (21:49 +0000)]
Get rid of builtin_open() entirely (the C code and docstring, not the
builtin function); Guido pointed out that it could be just another
name in the __builtin__ dict for the file constructor now.

23 years ago_PyBuiltin_Init(): For clarity, macroize this purely repetitive code.
Tim Peters [Thu, 13 Sep 2001 21:37:17 +0000 (21:37 +0000)]
_PyBuiltin_Init():  For clarity, macroize this purely repetitive code.

23 years agoNow that file objects are subclassable, you can get at the file constructor
Tim Peters [Thu, 13 Sep 2001 21:01:29 +0000 (21:01 +0000)]
Now that file objects are subclassable, you can get at the file constructor
just by doing type(f) where f is any file object.  This left a hole in
restricted execution mode that rexec.py can't plug by itself (although it
can plug part of it; the rest is plugged in fileobject.c now).

23 years agoUse the keyword form of file() instead of open() to create TESTFN.
Tim Peters [Thu, 13 Sep 2001 19:36:36 +0000 (19:36 +0000)]
Use the keyword form of file() instead of open() to create TESTFN.

23 years agoAdded simple tests of keyword arguments in the basic type constructors.
Tim Peters [Thu, 13 Sep 2001 19:33:07 +0000 (19:33 +0000)]
Added simple tests of keyword arguments in the basic type constructors.

23 years agotype_call(): Change in policy. The keyword args (if any) are now passed
Tim Peters [Thu, 13 Sep 2001 19:18:27 +0000 (19:18 +0000)]
type_call():  Change in policy.  The keyword args (if any) are now passed
on to the tp_new slot (if non-NULL), as well as to the tp_init slot (if
any).  A sane type implementing both tp_new and tp_init should probably
pay attention to the arguments in only one of them.

23 years agobased upon a suggestion in c.l.py, this slight expansion of the
Skip Montanaro [Thu, 13 Sep 2001 19:05:30 +0000 (19:05 +0000)]
based upon a suggestion in c.l.py, this slight expansion of the
OverflowError message seems reasonable.

23 years agoAdmit that we'll never add the args for a "call" event to the profile
Fred Drake [Thu, 13 Sep 2001 16:56:43 +0000 (16:56 +0000)]
Admit that we'll never add the args for a "call" event to the profile
and trace functions; this now declares that None will be passed for the
"call" event.
This closes SF bug/suggestion #460315.

23 years agoComment tweak: point to Robin Dunn's pybsddb project on SourceForge.
Greg Ward [Thu, 13 Sep 2001 15:05:08 +0000 (15:05 +0000)]
Comment tweak: point to Robin Dunn's pybsddb project on SourceForge.

23 years agoSF bug [#460467] file objects should be subclassable.
Tim Peters [Thu, 13 Sep 2001 05:38:56 +0000 (05:38 +0000)]
SF bug [#460467] file objects should be subclassable.
Preliminary support.  What's here works, but needs fine-tuning.

23 years agoSF bug #461073: mailbox __iter__ bug, by Andrew Dalke.
Guido van Rossum [Thu, 13 Sep 2001 01:29:13 +0000 (01:29 +0000)]
SF bug #461073: mailbox __iter__ bug, by Andrew Dalke.

Andrew quite correctly notices that the next() method isn't quite what
we need, since it returns None upon end instead of raising
StopIteration.  His fix is easy enough, using iter(self.next, None)
instead.

23 years agoAdded items about significant subclass bugfixes.
Tim Peters [Wed, 12 Sep 2001 23:40:29 +0000 (23:40 +0000)]
Added items about significant subclass bugfixes.

23 years agoAdded subclass equality tests. Almost all of these are commented out now,
Tim Peters [Wed, 12 Sep 2001 19:53:15 +0000 (19:53 +0000)]
Added subclass equality tests.  Almost all of these are commented out now,
because they don't work yet.

23 years agobuild_class(): one more (hopefully the last) step on the way to
Guido van Rossum [Wed, 12 Sep 2001 19:19:18 +0000 (19:19 +0000)]
build_class(): one more (hopefully the last) step on the way to
backwards compatibility.  When using the class of the first base as
the metaclass, use its __class__ attribute in preference over its
ob_type slot.  This ensures that we can still use classic classes as
metaclasse, as shown in the original "Metaclasses" essay.  This also
makes all the examples in Demo/metaclasses/ work again (maybe these
should be turned into a test suite?).

23 years agoAgain perhaps the end of [#460020] bug or feature: unicode() and subclasses.
Tim Peters [Wed, 12 Sep 2001 19:12:49 +0000 (19:12 +0000)]
Again perhaps the end of [#460020] bug or feature: unicode() and subclasses.
Inhibited complex unary plus optimization when applied to a complex subtype.
Added PyComplex_CheckExact macro.  Some comments and minor code fiddling.

23 years agoWhen MAKEFLAGS contains '-s', invoke setup.py with '-q', to silence
Guido van Rossum [Wed, 12 Sep 2001 18:59:25 +0000 (18:59 +0000)]
When MAKEFLAGS contains '-s', invoke setup.py with '-q', to silence
its normally chatty nature.

(This completes a side project to make "make -s" truly silent unless
errors occur.)

23 years agoIf interning an instance of a string subclass, intern a real string object
Tim Peters [Wed, 12 Sep 2001 07:54:51 +0000 (07:54 +0000)]
If interning an instance of a string subclass, intern a real string object
with the same value instead.  This ensures that a string (or string
subclass) object's ob_sinterned pointer is always a str (or NULL), and
that the dict of interned strings only has strs as keys.

23 years agostr_subtype_new, unicode_subtype_new:
Tim Peters [Wed, 12 Sep 2001 05:18:58 +0000 (05:18 +0000)]
str_subtype_new, unicode_subtype_new:
+ These were leaving the hash fields at 0, which all string and unicode
  routines believe is a legitimate hash code.  As a result, hash() applied
  to str and unicode subclass instances always returned 0, which in turn
  confused dict operations, etc.
+ Changed local names "new"; no point to antagonizing C++ compilers.

23 years agoMore on bug 460020: disable many optimizations of unicode subclasses.
Tim Peters [Wed, 12 Sep 2001 03:03:31 +0000 (03:03 +0000)]
More on bug 460020:  disable many optimizations of unicode subclasses.

23 years agoMore bug 460020: lots of string optimizations inhibited for string
Tim Peters [Wed, 12 Sep 2001 02:18:30 +0000 (02:18 +0000)]
More bug 460020:  lots of string optimizations inhibited for string
subclasses, all "the usual" ones (slicing etc), plus replace, translate,
ljust, rjust, center and strip.  I don't know how to be sure they've all
been caught.

Question:  Should we complain if someone tries to intern an instance of
a string subclass?  I hate to slow any code on those paths.

23 years agoAdd missing "}".
Fred Drake [Wed, 12 Sep 2001 00:43:13 +0000 (00:43 +0000)]
Add missing "}".

23 years agolong_invert(): tiny speed and space optimization.
Tim Peters [Tue, 11 Sep 2001 23:24:22 +0000 (23:24 +0000)]
long_invert():  tiny speed and space optimization.

23 years agoAdd info about Windows filesystem limits.
Tim Peters [Tue, 11 Sep 2001 23:18:51 +0000 (23:18 +0000)]
Add info about Windows filesystem limits.

23 years agoMore bug 460020. Disable a number of long optimizations for long subclasses.
Tim Peters [Tue, 11 Sep 2001 22:31:33 +0000 (22:31 +0000)]
More bug 460020.  Disable a number of long optimizations for long subclasses.

23 years agoMore bug 460020: when F is a subclass of float, disable the unary plus
Tim Peters [Tue, 11 Sep 2001 21:53:35 +0000 (21:53 +0000)]
More bug 460020:  when F is a subclass of float, disable the unary plus
optimization (+F(whatever)).

23 years agoMore bug 460020. When I is a subclass of int, disable the +I(whatever),
Tim Peters [Tue, 11 Sep 2001 21:44:14 +0000 (21:44 +0000)]
More bug 460020.  When I is a subclass of int, disable the +I(whatever),
I(0) << whatever, I(0) >> whatever, I(whatever) << 0 and I(whatever) >> 0
optimizations.

23 years agoThese modules now live under the Carbon package.
Jack Jansen [Tue, 11 Sep 2001 21:25:10 +0000 (21:25 +0000)]
These modules now live under the Carbon package.
Added a few new toolbox modules.
Noted machine dependencies for some modules.
Moved waste to undoc.tex.

23 years agoAdded applesingle, macresource, Nav and videoreader.
Jack Jansen [Tue, 11 Sep 2001 21:24:07 +0000 (21:24 +0000)]
Added applesingle, macresource, Nav and videoreader.
Moved icopen to its alphabetical place.
Moved waste here (from toolbox).

23 years agoAdded a note that these are not available under Carbon (or
Jack Jansen [Tue, 11 Sep 2001 20:18:04 +0000 (20:18 +0000)]
Added a note that these are not available under Carbon (or
OSX MachO Python).

23 years agoAnother documentation contributor.
Fred Drake [Tue, 11 Sep 2001 19:58:51 +0000 (19:58 +0000)]
Another documentation contributor.

23 years agoDocument clearly that the only way to retrieve the return code from the
Fred Drake [Tue, 11 Sep 2001 19:56:51 +0000 (19:56 +0000)]
Document clearly that the only way to retrieve the return code from the
child processes is to use the Popen3 and Popen4 classes.
This fixes SF bug #460512.

23 years agoThe endless 460020 bug.
Tim Peters [Tue, 11 Sep 2001 19:48:03 +0000 (19:48 +0000)]
The endless 460020 bug.
Disable t[:], t*0, t*1 optimizations when t is of a tuple subclass type.

23 years agoAdded Donovan Preston.
Jack Jansen [Tue, 11 Sep 2001 19:12:02 +0000 (19:12 +0000)]
Added Donovan Preston.

23 years agoAdded entry for the hmac module.
Fred Drake [Tue, 11 Sep 2001 16:59:42 +0000 (16:59 +0000)]
Added entry for the hmac module.

23 years agoDocumentation for the new login() method of the smtplib.SMTP class,
Fred Drake [Tue, 11 Sep 2001 16:58:00 +0000 (16:58 +0000)]
Documentation for the new login() method of the smtplib.SMTP class,
contributed by Gerhard Häring.
This is part of SF patch #460112.

23 years agoDocumentation for the new hmac module, contributed by Gerhard Häring.
Fred Drake [Tue, 11 Sep 2001 16:56:09 +0000 (16:56 +0000)]
Documentation for the new hmac module, contributed by Gerhard Häring.
This is part of SF patch #460112.

23 years agoSilence parser generator output.
Guido van Rossum [Tue, 11 Sep 2001 16:43:16 +0000 (16:43 +0000)]
Silence parser generator output.

23 years agoAdded documentation on the getfirst() and getlist() methods of the
Fred Drake [Tue, 11 Sep 2001 16:27:03 +0000 (16:27 +0000)]
Added documentation on the getfirst() and getlist() methods of the
cgi.FieldStorage class.
This closes SF patch #453691.

23 years agoReplace a few places where X->ob_type was compared to &PyXXX_Type with
Guido van Rossum [Tue, 11 Sep 2001 16:13:52 +0000 (16:13 +0000)]
Replace a few places where X->ob_type was compared to &PyXXX_Type with
calls to PyXXX_CheckExact(X).

23 years agoAdd login() method and SMTPAuthenticationError exception. SF patch
Guido van Rossum [Tue, 11 Sep 2001 15:57:46 +0000 (15:57 +0000)]
Add login() method and SMTPAuthenticationError exception.  SF patch
#460112 by Gerhard Haering.

(With slight layout changes to conform to docstrings guidelines and to
prevent a line longer than 78 characters.  Also fixed some docstrings
that Gerhard didn't touch.)

23 years agoTest for new hmac module.
Guido van Rossum [Tue, 11 Sep 2001 15:54:16 +0000 (15:54 +0000)]
Test for new hmac module.

23 years agoHMAC algorithm as described by RFC 2104, by Gerhard Häring (SF patch
Guido van Rossum [Tue, 11 Sep 2001 15:54:00 +0000 (15:54 +0000)]
HMAC algorithm as described by RFC 2104, by Gerhard Häring (SF patch
#460112).

23 years agoAnother contributor.
Guido van Rossum [Tue, 11 Sep 2001 15:52:01 +0000 (15:52 +0000)]
Another contributor.

23 years agoPatch #460554: Properly test for tuples.
Martin v. Löwis [Tue, 11 Sep 2001 15:11:27 +0000 (15:11 +0000)]
Patch #460554: Properly test for tuples.

23 years agoUpdated infomation about libraries for alternate compilers on Windows.
Fred Drake [Tue, 11 Sep 2001 15:10:42 +0000 (15:10 +0000)]
Updated infomation about libraries for alternate compilers on Windows.
This closes SF patch #459441.

23 years agoWhen frameworks are not enabled don't put an empty target in the Makefile.
Jack Jansen [Tue, 11 Sep 2001 14:41:54 +0000 (14:41 +0000)]
When frameworks are not enabled don't put an empty target in the Makefile.
Older make's can apparently choke on this.

23 years agoFix the second reincarnation of SF #456395 -- failure on IRIX. This
Guido van Rossum [Tue, 11 Sep 2001 14:24:35 +0000 (14:24 +0000)]
Fix the second reincarnation of SF #456395 -- failure on IRIX.  This
time use .replace() to change all \r\n into \n, not just the last one.

23 years agoRestore the comparisons that I initially put in the test but that Tim
Guido van Rossum [Tue, 11 Sep 2001 14:02:22 +0000 (14:02 +0000)]
Restore the comparisons that I initially put in the test but that Tim
XXX'ed out.  Turns out that after fixing the constructors, the
comparisons in fact succeed.  E.g. int(hexint(12345)) returns an int
with value 12345.

23 years agoMods by Donovan Preston (with changes by me to make them "go with the flow")
Jack Jansen [Tue, 11 Sep 2001 13:08:10 +0000 (13:08 +0000)]
Mods by Donovan Preston (with changes by me to make them "go with the flow")
that will detect an __main__.py or __rawmain__.py in the application bundle.
This file is then exectued as the main script. We now have applets in
MachO Python!!!

The difference between __main__ and __rawmain__ is that the former gets a
complete simulated argv (so you can drop files on the applet and the script
sees them in sys.argv) while the latter skips the argv simulation and the
<option>key dialog. This keeps the AppleEvent that started the app intact,
as well as the funny "-psn_xxxx" argv[1] argument, so the script can do
with these what it wants.

23 years ago- Removed the . in the extensions.
Jack Jansen [Tue, 11 Sep 2001 13:01:07 +0000 (13:01 +0000)]
- Removed the . in the extensions.
- Allow any file to be dropped on the interpreter (for file args).

23 years agoremoved debug print.
Jack Jansen [Tue, 11 Sep 2001 13:00:16 +0000 (13:00 +0000)]
removed debug print.

23 years agoAdded a note about making sure the Lac/Lib directory is in sys.path.
Jack Jansen [Tue, 11 Sep 2001 11:30:02 +0000 (11:30 +0000)]
Added a note about making sure the Lac/Lib directory is in sys.path.

23 years agoFailing to import macfsn is not a fatal error.
Jack Jansen [Tue, 11 Sep 2001 11:29:31 +0000 (11:29 +0000)]
Failing to import macfsn is not a fatal error.

23 years agoImplemented PyMac_GetFullPathname for MacPython.
Jack Jansen [Tue, 11 Sep 2001 09:22:19 +0000 (09:22 +0000)]
Implemented PyMac_GetFullPathname for MacPython.

23 years agoPossibly the end of SF [#460020] bug or feature: unicode() and subclasses.
Tim Peters [Tue, 11 Sep 2001 03:07:38 +0000 (03:07 +0000)]
Possibly the end of SF [#460020] bug or feature: unicode() and subclasses.
Changed unicode(i) to return a true Unicode object when i is an instance of
a unicode subclass.  Added PyUnicode_CheckExact macro.

23 years agoPyUnicode_FromEncodedObject(): Repair memory leak in an error case.
Tim Peters [Tue, 11 Sep 2001 02:00:50 +0000 (02:00 +0000)]
PyUnicode_FromEncodedObject():  Repair memory leak in an error case.

23 years agoAdded another test of str() applied to a string subclass instance,
Tim Peters [Tue, 11 Sep 2001 01:52:02 +0000 (01:52 +0000)]
Added another test of str() applied to a string subclass instance,
involving embedded null bytes, since it's possible to screw that up w/o
screwing up cases w/o embedded nulls.

23 years agoMore on SF bug [#460020] bug or feature: unicode() and subclasses.
Tim Peters [Tue, 11 Sep 2001 01:41:59 +0000 (01:41 +0000)]
More on SF bug [#460020] bug or feature: unicode() and subclasses.
Repaired str(i) to return a genuine string when i is an instance of a str
subclass.  New PyString_CheckExact() macro.

23 years agoFix tortured comment -- I must be on drugs today.
Tim Peters [Mon, 10 Sep 2001 23:53:53 +0000 (23:53 +0000)]
Fix tortured comment -- I must be on drugs today.

23 years agoMore on SF bug [#460020] bug or feature: unicode() and subclasses.
Tim Peters [Mon, 10 Sep 2001 23:37:46 +0000 (23:37 +0000)]
More on SF bug [#460020] bug or feature: unicode() and subclasses.
tuple(i) repaired to return a true tuple when i is an instance of a
tuple subclass.
Added PyTuple_CheckExact macro.
PySequence_Tuple():  if a tuple-like object isn't exactly a tuple, it's
not safe to return the object as-is -- make a new tuple of it instead.

23 years agotest_dir(): Add tests for dir(i) where i is a module subclass.
Tim Peters [Mon, 10 Sep 2001 23:12:14 +0000 (23:12 +0000)]
test_dir():  Add tests for dir(i) where i is a module subclass.

23 years agoPrototype for PyMac_GetFullPathname().
Jack Jansen [Mon, 10 Sep 2001 22:09:30 +0000 (22:09 +0000)]
Prototype for PyMac_GetFullPathname().

23 years agoReplaced PyMac_FullPath by PyMac_FullPathname, which has an extra 'length'
Jack Jansen [Mon, 10 Sep 2001 22:00:39 +0000 (22:00 +0000)]
Replaced PyMac_FullPath by PyMac_FullPathname, which has an extra 'length'
parameter for the return string (as unix pathnames are not limited
by the 255 char pstring limit).
Implemented the function for MachO-Python, where it returns unix pathnames.

23 years agomore xmlrpclib tweaks: fixed repr(Fault()); enable UTF-8 parsing in
Fredrik Lundh [Mon, 10 Sep 2001 21:45:42 +0000 (21:45 +0000)]
more xmlrpclib tweaks: fixed repr(Fault()); enable UTF-8 parsing in
xmllib (on 2.0 and later)

23 years agoMore for SF bug [#460020] bug or feature: unicode() and subclasses
Tim Peters [Mon, 10 Sep 2001 21:28:20 +0000 (21:28 +0000)]
More for SF bug [#460020] bug or feature: unicode() and subclasses
Repair float constructor to return a true float when passed a subclass
instance.  New PyFloat_CheckExact macro.