]> granicus.if.org Git - python/log
python
22 years agoRefer the reader to the correct module for constant definitions.
Fred Drake [Fri, 14 Jun 2002 01:58:19 +0000 (01:58 +0000)]
Refer the reader to the correct module for constant definitions.
This closes SF bug #550777.

22 years agoFix SF bug # 561858 Assertion with very long lists
Neal Norwitz [Fri, 14 Jun 2002 01:11:57 +0000 (01:11 +0000)]
Fix SF bug # 561858 Assertion with very long lists

Write 4 bytes for co_stacksize, etc. to prevent writing out
bad .pyc files which can cause a crash when read back in.

(I forgot that frozen needs to be updated too for the test.)

22 years agoFix SF bug # 561858 Assertion with very long lists
Neal Norwitz [Fri, 14 Jun 2002 01:07:39 +0000 (01:07 +0000)]
Fix SF bug # 561858 Assertion with very long lists

Write 4 bytes for co_stacksize, etc. to prevent writing out
bad .pyc files which can cause a crash when read back in.

22 years agoSF bug # 493951 string.{starts,ends}with vs slices
Neal Norwitz [Fri, 14 Jun 2002 00:50:42 +0000 (00:50 +0000)]
SF bug # 493951 string.{starts,ends}with vs slices

Handle negative indices similar to slices.

22 years agoDocument the Binary.data attribute.
Fred Drake [Fri, 14 Jun 2002 00:33:02 +0000 (00:33 +0000)]
Document the Binary.data attribute.
This closes SF bug #562878.

22 years agoUse \code{True} (or False) instead of true/false.
Neal Norwitz [Fri, 14 Jun 2002 00:27:13 +0000 (00:27 +0000)]
Use \code{True} (or False) instead of true/false.
Not sure if code is correct, but that is what's in this file.
I've seen \constant{True} in other places.

22 years agoTest exceptional condition in select()
Neal Norwitz [Thu, 13 Jun 2002 22:23:47 +0000 (22:23 +0000)]
Test exceptional condition in select()

22 years agoTest exceptional conditions in list.sort()
Neal Norwitz [Thu, 13 Jun 2002 22:23:06 +0000 (22:23 +0000)]
Test exceptional conditions in list.sort()

22 years agoCleanup a little
Neal Norwitz [Thu, 13 Jun 2002 22:18:39 +0000 (22:18 +0000)]
Cleanup a little

22 years agoSF # 533070 Silence AIX C Compiler Warnings
Neal Norwitz [Thu, 13 Jun 2002 21:42:51 +0000 (21:42 +0000)]
SF # 533070 Silence AIX C Compiler Warnings

Warning caused by using &func.  & is not necessary.

22 years agoMajor cleanup operation: whenever there's a call that looks for an
Guido van Rossum [Thu, 13 Jun 2002 21:42:04 +0000 (21:42 +0000)]
Major cleanup operation: whenever there's a call that looks for an
optional attribute, only clear the exception when the internal getattr
operation raised AttributeError.  Many places in this file already had
that policy; but just as many didn't, and there didn't seem to be any
rhyme or reason to it.  Be consistently cautious.

Question: should I backport this?  On the one hand it's a bugfix.  On
the other hand it's a change in behavior.  Certain forms of buggy or
just weird code would work in the past but raise an exception under
the new rules; e.g. if you define a __getattr__ method that raises a
non-AttributeError exception.

22 years agoFix for SF bug 532646. This is a little simpler than what Neal
Guido van Rossum [Thu, 13 Jun 2002 21:32:51 +0000 (21:32 +0000)]
Fix for SF bug 532646.  This is a little simpler than what Neal
suggested there, based upon a better analysis (__getattr__ is a red
herring).  Will backport to 2.2.

22 years agoSF # 561244 Micro optimizations
Neal Norwitz [Thu, 13 Jun 2002 21:32:44 +0000 (21:32 +0000)]
SF # 561244 Micro optimizations

Cleanup code a bit and return as early as possible.

22 years agoFix typo in exception message
Neal Norwitz [Thu, 13 Jun 2002 21:25:17 +0000 (21:25 +0000)]
Fix typo in exception message

22 years agoUse new PyDoc_STRVAR macro
Neal Norwitz [Thu, 13 Jun 2002 21:22:11 +0000 (21:22 +0000)]
Use new PyDoc_STRVAR macro

22 years agoAdd "version added" for getpgid
Neal Norwitz [Thu, 13 Jun 2002 21:19:25 +0000 (21:19 +0000)]
Add "version added" for getpgid

22 years agoSF #561244 Micro optimizations
Neal Norwitz [Thu, 13 Jun 2002 21:11:11 +0000 (21:11 +0000)]
SF #561244 Micro optimizations

Convert loops to memset()s.

22 years agoPatch #568235: Add posix.setpgid.
Martin v. Löwis [Thu, 13 Jun 2002 21:09:11 +0000 (21:09 +0000)]
Patch #568235: Add posix.setpgid.

22 years agoPatch #568124: Add doc string macros.
Martin v. Löwis [Thu, 13 Jun 2002 20:33:02 +0000 (20:33 +0000)]
Patch #568124: Add doc string macros.

22 years agoTemporarily disable the timeout and socket tests.
Guido van Rossum [Thu, 13 Jun 2002 20:24:17 +0000 (20:24 +0000)]
Temporarily disable the timeout and socket tests.
They still run as standalone scripts, but when used as part of the
regression test suite, they are effectively no-ops.
(This is done by renaming test_main to main.)

22 years agoHopefully this addresses the remaining issues of SF bugs 459235 and
Guido van Rossum [Thu, 13 Jun 2002 19:17:46 +0000 (19:17 +0000)]
Hopefully this addresses the remaining issues of SF bugs 459235 and
473985.  Through a subtle rearrangement of some members in the etype
struct (!), mapping methods are now preferred over sequence methods,
which is necessary to support str.__getitem__("hello", slice(4)) etc.

22 years agoThe opcode FOR_LOOP no longer exists.
Guido van Rossum [Thu, 13 Jun 2002 17:59:51 +0000 (17:59 +0000)]
The opcode FOR_LOOP no longer exists.

22 years agoDo not claim that getlocale() returns a tulpe; that is not always true.
Fred Drake [Thu, 13 Jun 2002 17:54:06 +0000 (17:54 +0000)]
Do not claim that getlocale() returns a tulpe; that is not always true.
Closes SF bug #568577.

22 years agoMunge depends files to have absolute paths.
Jeremy Hylton [Thu, 13 Jun 2002 17:38:11 +0000 (17:38 +0000)]
Munge depends files to have absolute paths.

Look in both moddirlist and incdirlist, since a .h could be in either.

22 years agoExtend dependency tracking so that .o files are rebuilt.
Jeremy Hylton [Thu, 13 Jun 2002 17:32:20 +0000 (17:32 +0000)]
Extend dependency tracking so that .o files are rebuilt.

Two new tests are needed:

Don't skip building an extension if any of the depends files are newer
than the target.

Pass ext.depends to compiler.compile() so that it can track individual
files.

22 years agoRefactor compile() method implementations.
Jeremy Hylton [Thu, 13 Jun 2002 17:28:18 +0000 (17:28 +0000)]
Refactor compile() method implementations.

Always use _setup_compile() to do the grunt work of processing
arguments, figuring out which files to compile, and emitting debug
messages for files that are up-to-date.

Use _get_cc_args() when possible.

22 years agoAdd depends=None to the arglist for compile().
Jeremy Hylton [Thu, 13 Jun 2002 17:27:13 +0000 (17:27 +0000)]
Add depends=None to the arglist for compile().

22 years agoExtend compiler() method with optional depends argument.
Jeremy Hylton [Thu, 13 Jun 2002 17:26:30 +0000 (17:26 +0000)]
Extend compiler() method with optional depends argument.

This change is not backwards compatible.  If a compiler subclass
exists outside the distutils package, it may get called with the
unexpected keyword arg.  It's easy to extend that compiler by having
it ignore the argument, and not much harder to do the right thing.  If
this ends up being burdensome, we can change it before 2.3 final to
work harder at compatibility.

Also add _setup_compile() and _get_cc_args() helper functions that
factor out much of the boilerplate for each concrete compiler class.

22 years agoRearrange the #ifndef WITHOUT_COMPLEX so it can be picked up from
Guido van Rossum [Thu, 13 Jun 2002 17:07:07 +0000 (17:07 +0000)]
Rearrange the #ifndef WITHOUT_COMPLEX so it can be picked up from
pyconfig.h.

22 years agoComment out testHostnameRes() -- it depends on a correctly working
Guido van Rossum [Thu, 13 Jun 2002 16:54:38 +0000 (16:54 +0000)]
Comment out testHostnameRes() -- it depends on a correctly working
DNS, and we can't assume that.

22 years agoFix non-blocking connect() for Windows. Refactored the code
Guido van Rossum [Thu, 13 Jun 2002 16:07:04 +0000 (16:07 +0000)]
Fix non-blocking connect() for Windows.  Refactored the code
that retries the connect() call in timeout mode so it can be shared
between connect() and connect_ex(), and needs only a single #ifdef.

The test for this was doing funky stuff I don't approve of,
so I removed it in favor of a simpler test.  This allowed me
to implement a simpler, "purer" form of the timeout retry code.
Hopefully that's enough (if you want to be fancy, use non-blocking
mode and decode the errors yourself, like before).

22 years agoMore style changes and little cleanups.
Jeremy Hylton [Thu, 13 Jun 2002 15:14:10 +0000 (15:14 +0000)]
More style changes and little cleanups.

Remove __init__ that just called base class __init__ with same args.
Fold long argument lists into fewer, shorter lines.
Remove parens in tuple unpacks.
Don't put multiple statements on one line with a semicolon.
In find_library_file() compute the library_filename() upfront.

22 years agoGet rid of accidentally checked-in reference to "bits".
Guido van Rossum [Thu, 13 Jun 2002 15:08:35 +0000 (15:08 +0000)]
Get rid of accidentally checked-in reference to "bits".

22 years agoMajor overhaul of timeout sockets:
Guido van Rossum [Thu, 13 Jun 2002 15:07:44 +0000 (15:07 +0000)]
Major overhaul of timeout sockets:

- setblocking(0) and settimeout(0) are now equivalent, and ditto for
  setblocking(1) and settimeout(None).

- Don't raise an exception from internal_select(); let the final call
  report the error (this means you will get an EAGAIN error instead of
  an ETIMEDOUT error -- I don't care).

- Move the select to inside the Py_{BEGIN,END}_ALLOW_THREADS brackets,
  so other theads can run (this was a bug in the original code).

- Redid the retry logic in connect() and connect_ex() to avoid masking
  errors.  This probably doesn't work for Windows yet; I'll fix that
  next.  It may also fail on other platforms, depending on what
  retrying a connect does; I need help with this.

- Get rid of the retry logic in accept().  I don't think it was needed
  at all.  But I may be wrong.

22 years agoFix a typo.
Guido van Rossum [Thu, 13 Jun 2002 15:03:01 +0000 (15:03 +0000)]
Fix a typo.
Add a sleep (yuck!) to _testRecvFrom() so the server can set up first.

22 years agoSome more style improvements
Jeremy Hylton [Thu, 13 Jun 2002 15:01:38 +0000 (15:01 +0000)]
Some more style improvements

22 years agoPython style conformance: Delete spaces between name of function and arglist.
Jeremy Hylton [Thu, 13 Jun 2002 14:58:30 +0000 (14:58 +0000)]
Python style conformance: Delete spaces between name of function and arglist.

Making the world better a little bit at a time <wink>.

22 years agoAdd dependencies on socketmodule.h.
Guido van Rossum [Thu, 13 Jun 2002 14:41:32 +0000 (14:41 +0000)]
Add dependencies on socketmodule.h.

22 years ago_Py prefix is verboten for static entry points
Andrew MacIntyre [Thu, 13 Jun 2002 11:55:14 +0000 (11:55 +0000)]
_Py prefix is verboten for static entry points

22 years agowork around name clash with OS/2 TCPIP routine sock_init()
Andrew MacIntyre [Thu, 13 Jun 2002 11:53:52 +0000 (11:53 +0000)]
work around name clash with OS/2 TCPIP routine sock_init()

22 years agoWhitespace nit.
Guido van Rossum [Thu, 13 Jun 2002 11:53:12 +0000 (11:53 +0000)]
Whitespace nit.

22 years agoAdd documentation for PyObject_RichCompare() and PyObject_RichCompareBool(),
Fred Drake [Thu, 13 Jun 2002 11:51:48 +0000 (11:51 +0000)]
Add documentation for PyObject_RichCompare() and PyObject_RichCompareBool(),
constributed by David Abrahams.
This closes SF patch #568081.

22 years agoChanged the extended slice example to show that you can reverse a
Guido van Rossum [Thu, 13 Jun 2002 11:41:07 +0000 (11:41 +0000)]
Changed the extended slice example to show that you can reverse a
string with a [::-1] slice.

22 years agoAdd version annotations for some older changes to the calendar module.
Fred Drake [Thu, 13 Jun 2002 01:34:50 +0000 (01:34 +0000)]
Add version annotations for some older changes to the calendar module.
Closes SF patch #567867.

22 years agoRemove some overly complicated ways to concatenate and repeat strings
Guido van Rossum [Wed, 12 Jun 2002 21:29:43 +0000 (21:29 +0000)]
Remove some overly complicated ways to concatenate and repeat strings
using "".join().  Fold a long line.

22 years agoDon't test for Java, test for sys.getrefcount.
Guido van Rossum [Wed, 12 Jun 2002 21:19:40 +0000 (21:19 +0000)]
Don't test for Java, test for sys.getrefcount.

22 years agoSome provisional changes to get more tests to run on Windows (I hope).
Guido van Rossum [Wed, 12 Jun 2002 21:17:20 +0000 (21:17 +0000)]
Some provisional changes to get more tests to run on Windows (I hope).

22 years agoArgh. Typo. :-(
Guido van Rossum [Wed, 12 Jun 2002 20:55:17 +0000 (20:55 +0000)]
Argh.  Typo. :-(

22 years agoAllow absent fromfd(), for Windows.
Guido van Rossum [Wed, 12 Jun 2002 20:48:59 +0000 (20:48 +0000)]
Allow absent fromfd(), for Windows.

22 years agotestSetSockOpt() should not require the reuse flag to be 1 -- any
Guido van Rossum [Wed, 12 Jun 2002 20:46:49 +0000 (20:46 +0000)]
testSetSockOpt() should not require the reuse flag to be 1 -- any
nonzero value is OK.  Also fixed the error message for this and for
testGetSockOpt().

22 years agoLose the message on assertEqual calls -- they actually hide
Guido van Rossum [Wed, 12 Jun 2002 20:38:30 +0000 (20:38 +0000)]
Lose the message on assertEqual calls -- they actually hide
information on what went wrong.

22 years agoDocstring, layout and style tweaking. Increase fuzz to 1 second.
Guido van Rossum [Wed, 12 Jun 2002 20:22:49 +0000 (20:22 +0000)]
Docstring, layout and style tweaking.  Increase fuzz to 1 second.

22 years agoAdd a new definition to Extension objects: depends.
Jeremy Hylton [Wed, 12 Jun 2002 20:08:56 +0000 (20:08 +0000)]
Add a new definition to Extension objects: depends.

depends is a list of files that the target depends, but aren't direct
sources of the target.  think .h files.

22 years agoAdd some more basic tests to validate the argument checking of
Guido van Rossum [Wed, 12 Jun 2002 19:57:18 +0000 (19:57 +0000)]
Add some more basic tests to validate the argument checking of
settimeout(), test settimeout(None), and the interaction between
settimeout() and setblocking().

22 years agoNew test suite for the socket module by Michael Gilfix.
Guido van Rossum [Wed, 12 Jun 2002 19:18:08 +0000 (19:18 +0000)]
New test suite for the socket module by Michael Gilfix.
Changed test_timeout.py to conform to the guidelines in Lib/test/README.

22 years agoSF bug 567826. Document new opcodes:
Guido van Rossum [Wed, 12 Jun 2002 15:33:08 +0000 (15:33 +0000)]
SF bug 567826.  Document new opcodes:
['BINARY_FLOOR_DIVIDE', 'BINARY_TRUE_DIVIDE',
'INPLACE_FLOOR_DIVIDE', 'INPLACE_TRUE_DIVIDE', 'GET_ITER',
'YIELD_VALUE', 'FOR_ITER', 'CONTINUE_LOOP']

22 years agoAdd a testcase to ensure that cycles going through the __class__ link
Guido van Rossum [Wed, 12 Jun 2002 14:38:04 +0000 (14:38 +0000)]
Add a testcase to ensure that cycles going through the __class__ link
of a new-style instance are detected by the garbage collector.

22 years agoSF bug 567538: Generator can crash the interpreter (Finn Bock).
Guido van Rossum [Wed, 12 Jun 2002 03:45:21 +0000 (03:45 +0000)]
SF bug 567538: Generator can crash the interpreter (Finn Bock).

This was a simple typo.  Strange that the compiler didn't catch it!
Instead of WHY_CONTINUE, two tests used CONTINUE_LOOP, which isn't a
why_code at all, but an opcode; but even though 'why' is declared as
an enum, comparing it to an int is apparently not even worth a
warning -- not in gcc, and not in VC++. :-(

Will fix in 2.2 too.

22 years agoRework the code to have only the GvR RPC. Output from execution of user
Kurt B. Kaiser [Wed, 12 Jun 2002 03:28:57 +0000 (03:28 +0000)]
Rework the code to have only the GvR RPC.  Output from execution of user
code is directed to the Shell.

22 years agoThe opcode YIELD_STMT was accidentally called YIELD_VALUE here.
Guido van Rossum [Tue, 11 Jun 2002 21:17:35 +0000 (21:17 +0000)]
The opcode YIELD_STMT was accidentally called YIELD_VALUE here.

22 years agopatch #562492 - prevent duplicate lines in history
Skip Montanaro [Tue, 11 Jun 2002 14:32:46 +0000 (14:32 +0000)]
patch #562492 - prevent duplicate lines in history
also call using_history() to properly initialize history variables

22 years agoFix SF #565414, FancyURLopener() needs to support **kwargs
Neal Norwitz [Tue, 11 Jun 2002 13:38:51 +0000 (13:38 +0000)]
Fix SF #565414, FancyURLopener() needs to support **kwargs
since the URLopener base class does and **kwargs are used in urlopen.

22 years agoFix for problem reported by Neal Norwitz. Tighten up calculation of
Michael W. Hudson [Tue, 11 Jun 2002 13:38:42 +0000 (13:38 +0000)]
Fix for problem reported by Neal Norwitz.  Tighten up calculation of
slicelength.  Include his test case.

22 years agoFold remaining long lines.
Guido van Rossum [Tue, 11 Jun 2002 12:22:28 +0000 (12:22 +0000)]
Fold remaining long lines.

22 years agoThis is my nearly two year old patch
Michael W. Hudson [Tue, 11 Jun 2002 10:55:12 +0000 (10:55 +0000)]
This is my nearly two year old patch

[ 400998 ] experimental support for extended slicing on lists

somewhat spruced up and better tested than it was when I wrote it.

Includes docs & tests.  The whatsnew section needs expanding, and arrays
should support extended slices -- later.

22 years agoPatch #488073: AtheOS port.
Martin v. Löwis [Tue, 11 Jun 2002 06:22:31 +0000 (06:22 +0000)]
Patch #488073: AtheOS port.

22 years agoadd a version of GvR's q&d python idle printing patch,
Steven M. Gava [Tue, 11 Jun 2002 04:45:34 +0000 (04:45 +0000)]
add a version of GvR's q&d python idle printing patch,
slightly tweaked and modified for the idlefork config system

22 years agoCompletely revise markup for the list of list methods; the new markup matches
Fred Drake [Tue, 11 Jun 2002 02:56:17 +0000 (02:56 +0000)]
Completely revise markup for the list of list methods; the new markup matches
the semantics and presentation used in the library reference.
Added an explanation of the use of [...] to denote optional arguments, since
this is the only use of this in a signature line.
Closes SF bug #567127.

22 years agoRecord the latest fixes.
Guido van Rossum [Mon, 10 Jun 2002 21:39:42 +0000 (21:39 +0000)]
Record the latest fixes.

22 years agoTook initial_tab and subsequent_tab away from the fill() method and
Greg Ward [Mon, 10 Jun 2002 21:37:12 +0000 (21:37 +0000)]
Took initial_tab and subsequent_tab away from the fill() method and
transformed them into the initial_indent and subsequent_indent instance
attributes.  Now they actually work as advertised, ie. they are
accounted for in the width of each output line.  Plus you can use them
with wrap() as well as fill(), and fill() went from simple-and-broken to
trivial-and-working.

22 years agoSF patch 560794 (Greg Chapman): deepcopy can't handle custom
Guido van Rossum [Mon, 10 Jun 2002 21:10:27 +0000 (21:10 +0000)]
SF patch 560794 (Greg Chapman): deepcopy can't handle custom
metaclasses.

This is essentially the same problem as that reported in bug 494904
for pickle: deepcopy should treat instances of custom metaclasses the
same way it treats instances of type 'type'.

Bugfix candidate.

22 years agoAllow the standalone wrap() and fill() functions to take arbitrary
Greg Ward [Mon, 10 Jun 2002 20:36:07 +0000 (20:36 +0000)]
Allow the standalone wrap() and fill() functions to take arbitrary
keyword args, which are passed directly to the TextWrapper constructor.

22 years agoMake 'width' an instance attribute rather than an argument to the wrap()
Greg Ward [Mon, 10 Jun 2002 20:26:02 +0000 (20:26 +0000)]
Make 'width' an instance attribute rather than an argument to the wrap()
and fill() methods.  Keep interface of existing wrap() and fill()
functions by going back to having them construct a new TextWrapper
instance on each call, with the preferred width passed to the
constructor.

22 years agoRemove the only use of a string method.
Thomas Heller [Mon, 10 Jun 2002 20:05:48 +0000 (20:05 +0000)]
Remove the only use of a string method.
Fixes SF 564840.

22 years agoSF patch 564549 (Erik Andersén).
Guido van Rossum [Mon, 10 Jun 2002 20:00:52 +0000 (20:00 +0000)]
SF patch 564549 (Erik Andersén).

The WeakKeyDictionary constructor didn't work when a dict arg was
given.  Fixed by moving a line.  Also adding a unit test.

Bugfix candidate.

22 years agoDon't accept null bytes in the key.
Guido van Rossum [Mon, 10 Jun 2002 19:46:18 +0000 (19:46 +0000)]
Don't accept null bytes in the key.

22 years agoDocument that the key should not contain null bytes.
Guido van Rossum [Mon, 10 Jun 2002 19:42:43 +0000 (19:42 +0000)]
Document that the key should not contain null bytes.

22 years agoSF bug 563750 (Alex Martelli): posix_tmpfile():
Guido van Rossum [Mon, 10 Jun 2002 19:23:22 +0000 (19:23 +0000)]
SF bug 563750 (Alex Martelli): posix_tmpfile():

The file returned by tmpfile() has mode w+b, so use that in the call
to PyFile_FromFile().

Bugfix candidate.

22 years agoTweak traceback message to avoid LaTeX2HTML bug
Andrew M. Kuchling [Mon, 10 Jun 2002 18:58:19 +0000 (18:58 +0000)]
Tweak traceback message to avoid LaTeX2HTML bug
Add a reminder

22 years agoAdd primitive printing support for Unix and Windows.
Guido van Rossum [Mon, 10 Jun 2002 18:52:02 +0000 (18:52 +0000)]
Add primitive printing support for Unix and Windows.

22 years agoFix typo
Andrew M. Kuchling [Mon, 10 Jun 2002 15:53:05 +0000 (15:53 +0000)]
Fix typo

22 years agoUndo the last chunk of the previous patch, putting back a useful
Guido van Rossum [Mon, 10 Jun 2002 15:29:03 +0000 (15:29 +0000)]
Undo the last chunk of the previous patch, putting back a useful
assert into PyType_Ready(): now that we're not clearing tp_dict, we
can assert that it's non-NULL again.

22 years agoIn the recent python-dev thread "Bizarre new test failure", we
Guido van Rossum [Mon, 10 Jun 2002 15:24:42 +0000 (15:24 +0000)]
In the recent python-dev thread "Bizarre new test failure", we
discovered that subtype_traverse must traverse the type if it is a
heap type, because otherwise some cycles involving a type and its
instance would not be collected.  Simplest example:
    while 1:
        class C(object): pass
        C.ref = C()
This program grows without bounds before this fix.  (It grows ever
slower since it spends ever more time in the collector.)

Simply adding the right visit() call to subtype_traverse() revealed
other problems.  With MvL's help we re-learned that type_clear()
doesn't have to clear *all* references, only the ones that may not be
cleared by other means.  Careful analysis (see comments in the code)
revealed that only tp_mro needs to be cleared.  (The previous checkin
to this file adds a test for tp_mro==NULL to _PyType_Lookup() that's
essential to prevent crashes due to tp_mro being NULL when
subtype_dealloc() tries to look for a __del__ method.)  The same kind
of analysis also revealed that subtype_clear() doesn't need to clear
the instance dict.

With this fix, a useful property of the collector is once again
guaranteed: a single gc.collect() call will clear out all garbage.
(It didn't always before, which put us on the track of this bug.)

Will backport to 2.2.

22 years agoThree's a charm: yet another fix for SF bug 551412. Thinking again
Guido van Rossum [Mon, 10 Jun 2002 14:30:43 +0000 (14:30 +0000)]
Three's a charm: yet another fix for SF bug 551412.  Thinking again
about the test case, slot_nb_power gets called on behalf of its second
argument, but with a non-None modulus it wouldn't check this, and
believes it is called on behalf of its first argument.  Fix this
properly, and get rid of the code in _PyType_Lookup() that tries to
call _PyType_Ready().  But do leave a check for a NULL tp_mro there,
because this can still legitimately occur.

I'll fix this in 2.2.x too.

22 years agoFix typo, and add some reminders
Andrew M. Kuchling [Mon, 10 Jun 2002 13:22:46 +0000 (13:22 +0000)]
Fix typo, and add some reminders

22 years agoTweak the description of pymalloc. Mention pymemcompat.h.
Michael W. Hudson [Mon, 10 Jun 2002 13:19:42 +0000 (13:19 +0000)]
Tweak the description of pymalloc.  Mention pymemcompat.h.

22 years agorefresh to pick up recent changes
Andrew MacIntyre [Mon, 10 Jun 2002 08:05:26 +0000 (08:05 +0000)]
refresh to pick up recent changes

22 years agomake _sre a dynamically loadable module and build xxsubtype
Andrew MacIntyre [Mon, 10 Jun 2002 08:04:29 +0000 (08:04 +0000)]
make _sre a dynamically loadable module and build xxsubtype

22 years ago- Better commandline interface to BuildApplet, complete with options,
Jack Jansen [Sun, 9 Jun 2002 22:08:52 +0000 (22:08 +0000)]
- Better commandline interface to BuildApplet, complete with options,
  verbose output to the console, etc.
- Allow Cocoa applets to be built with BuildApplet.

No full testing has been done yet to ensure OS9 operation hasn't suffered.

22 years agoPatch #505375: Make doc strings optional.
Martin v. Löwis [Sun, 9 Jun 2002 13:41:37 +0000 (13:41 +0000)]
Patch #505375: Make doc strings optional.

22 years agoPatch #505375: Make doc strings optional.
Martin v. Löwis [Sun, 9 Jun 2002 13:33:54 +0000 (13:33 +0000)]
Patch #505375: Make doc strings optional.

22 years agoescape 8-bit chars when generating .py files. fixes bug #566302
Just van Rossum [Sun, 9 Jun 2002 09:08:53 +0000 (09:08 +0000)]
escape 8-bit chars when generating .py files. fixes bug #566302

22 years agoMake all of TextWrapper's options keyword args to the constructor.
Greg Ward [Sun, 9 Jun 2002 00:22:07 +0000 (00:22 +0000)]
Make all of TextWrapper's options keyword args to the constructor.

22 years agoRecord copyright and author.
Greg Ward [Fri, 7 Jun 2002 22:40:23 +0000 (22:40 +0000)]
Record copyright and author.

22 years agoUse True/False instead of 1/0.
Greg Ward [Fri, 7 Jun 2002 22:35:41 +0000 (22:35 +0000)]
Use True/False instead of 1/0.

22 years agoRemove islower() -- not used anymore.
Greg Ward [Fri, 7 Jun 2002 22:33:11 +0000 (22:33 +0000)]
Remove islower() -- not used anymore.

22 years agoConform to the bloody coding standards: "def foo()" not "def foo ()".
Greg Ward [Fri, 7 Jun 2002 22:32:15 +0000 (22:32 +0000)]
Conform to the bloody coding standards: "def foo()" not "def foo ()".
Yuck.

22 years agoConvert _fix_sentence_endings() to use a regex, and augment it to
Greg Ward [Fri, 7 Jun 2002 22:04:15 +0000 (22:04 +0000)]
Convert _fix_sentence_endings() to use a regex, and augment it to
handle sentences like this:
  And she said, "Go to hell!"  Can you believe that?

22 years agoAdd fix_sentence_endings option to control whether we ensure that
Greg Ward [Fri, 7 Jun 2002 21:56:16 +0000 (21:56 +0000)]
Add fix_sentence_endings option to control whether we ensure that
sentences are separated by two spaces.

Improve _fix_sentence_endings() a bit -- look for ".!?" instead of just
".", and factor out the list of sentence-ending punctuation characters
to a class attribute.

22 years agoInitial revision. Currently biased towards English in a fixed-width font,
Greg Ward [Fri, 7 Jun 2002 21:43:37 +0000 (21:43 +0000)]
Initial revision.  Currently biased towards English in a fixed-width font,
according to the conventions that I (and Tim Peters) learned in school.