]> granicus.if.org Git - python/log
python
23 years agoImplement what the docstring said: multiple slashes per line are
Guido van Rossum [Sun, 2 Sep 2001 14:11:30 +0000 (14:11 +0000)]
Implement what the docstring said: multiple slashes per line are
treated the same as single ones by default.  Added -m option to issue
a warning for this case instead.

23 years agoAdd news about dictionary() constructor.
Guido van Rossum [Sun, 2 Sep 2001 13:44:35 +0000 (13:44 +0000)]
Add news about dictionary() constructor.

23 years agoMake dictionary() a real constructor. Accepts at most one argument, "a
Tim Peters [Sun, 2 Sep 2001 08:22:48 +0000 (08:22 +0000)]
Make dictionary() a real constructor.  Accepts at most one argument, "a
mapping object", in the same sense dict.update(x) requires of x (that x
has a keys() method and a getitem).
Questionable:  The other type constructors accept a keyword argument, so I
did that here too (e.g., dictionary(mapping={1:2}) works).  But type_call
doesn't pass the keyword args to the tp_new slot (it passes NULL), it only
passes them to the tp_init slot, so getting at them required adding a
tp_init slot to dicts.  Looks like that makes the normal case (i.e., no
args at all) a little slower (the time it takes to call dict.tp_init and
have it figure out there's nothing to do).

23 years agoRewrite the tuple() docstring to parallel the list() docstring.
Tim Peters [Sun, 2 Sep 2001 06:42:25 +0000 (06:42 +0000)]
Rewrite the tuple() docstring to parallel the list() docstring.

23 years agoRepair apparent cut'n'pasteo in tuple() docstring.
Tim Peters [Sun, 2 Sep 2001 06:29:48 +0000 (06:29 +0000)]
Repair apparent cut'n'pasteo in tuple() docstring.

23 years agoMove the long minidom example to a separate file; \verbatiminput does the
Fred Drake [Sun, 2 Sep 2001 06:07:36 +0000 (06:07 +0000)]
Move the long minidom example to a separate file; \verbatiminput does the
right thing with page breaks in long examples, while the verbatim
environment does not.  This causes the example to wrap to the next page
instead of overwriting the page footer and bottom margin.

23 years agoAn anonymous contributor reveals his name...
Guido van Rossum [Sun, 2 Sep 2001 05:07:17 +0000 (05:07 +0000)]
An anonymous contributor reveals his name...

23 years agoAdded more text to the docstring, updated the way the exit status is
Guido van Rossum [Sun, 2 Sep 2001 04:49:36 +0000 (04:49 +0000)]
Added more text to the docstring, updated the way the exit status is
percolated out, and some general cleanup.  The output is still the
same, except it now prints "Index: <file>" instead of "Processing:
<file>", so that the output can be used as input for patch (but only
the diff-style parts of it).

23 years agoA grep-like tool that looks for division operators.
Guido van Rossum [Sun, 2 Sep 2001 04:43:30 +0000 (04:43 +0000)]
A grep-like tool that looks for division operators.

23 years agoWhitespace normalization (tabs -> 4 spaces) in the Mac expectations.
Guido van Rossum [Sun, 2 Sep 2001 03:58:41 +0000 (03:58 +0000)]
Whitespace normalization (tabs -> 4 spaces) in the Mac expectations.

23 years agoStart items w/ "-" instead of "+" (consistency w/ earlier versions).
Tim Peters [Sun, 2 Sep 2001 03:40:59 +0000 (03:40 +0000)]
Start items w/ "-" instead of "+" (consistency w/ earlier versions).

Stephen Hansen reported via email that he didn't finish the port to
Borland C, so remove the old item saying it worked and add a new item
saying what I know; I've asked Stephen for more details.

23 years agoSilly typos.
Jack Jansen [Sun, 2 Sep 2001 00:09:35 +0000 (00:09 +0000)]
Silly typos.

23 years agoDon't call PyMac_HandleEvent in unix-Python
Jack Jansen [Sun, 2 Sep 2001 00:08:16 +0000 (00:08 +0000)]
Don't call PyMac_HandleEvent in unix-Python

23 years agoRegenerated, mainly for new GC routines.
Jack Jansen [Sat, 1 Sep 2001 23:42:11 +0000 (23:42 +0000)]
Regenerated, mainly for new GC routines.

23 years agoxx.prj has been replaced by xx.mcp.
Jack Jansen [Sat, 1 Sep 2001 23:40:19 +0000 (23:40 +0000)]
xx.prj has been replaced by xx.mcp.

23 years agoAdded glue routine for PyMac_BuildFSSpec, PyMac_GetFSRef and PyMac_BuildFSRef.
Jack Jansen [Sat, 1 Sep 2001 23:39:58 +0000 (23:39 +0000)]
Added glue routine for PyMac_BuildFSSpec, PyMac_GetFSRef and PyMac_BuildFSRef.

Moved the declarations to pymactoolbox.h.

23 years agoDon't call PyMac_HandleEvent if we're in unix-Python.
Jack Jansen [Sat, 1 Sep 2001 23:38:50 +0000 (23:38 +0000)]
Don't call PyMac_HandleEvent if we're in unix-Python.

23 years agoInclude Carbon/Carbon.h if we're on OSX.
Jack Jansen [Sat, 1 Sep 2001 23:38:13 +0000 (23:38 +0000)]
Include Carbon/Carbon.h if we're on OSX.

23 years agoUpdated the Popt resources for the applets to the newest version.
Jack Jansen [Sat, 1 Sep 2001 23:37:28 +0000 (23:37 +0000)]
Updated the Popt resources for the applets to the newest version.

23 years agoAdded preferences/startup options for division warning
Jack Jansen [Sat, 1 Sep 2001 22:37:54 +0000 (22:37 +0000)]
Added preferences/startup options for division warning
and accepting unix-style newlines on input.

Also (finally) added a startup option to get -vv behaviour.

Moved __convert_to_newlines to main.c because that's easier with the newline option.

23 years agoAdded preferences/startup options for division warning
Jack Jansen [Sat, 1 Sep 2001 22:36:29 +0000 (22:36 +0000)]
Added preferences/startup options for division warning
and accepting unix-style newlines on input.

23 years agoThe beginnings of a script to help finding / operators that may need
Guido van Rossum [Sat, 1 Sep 2001 21:55:58 +0000 (21:55 +0000)]
The beginnings of a script to help finding / operators that may need
to be change to //.  The code is pretty gross so far, and I promise
I'll work on this more, but I have to go eat now! :-)

23 years agoAdd Listbox.itemconfig[ure] call. (A "recent" addition to Tk -- 8.0
Guido van Rossum [Sat, 1 Sep 2001 18:29:55 +0000 (18:29 +0000)]
Add Listbox.itemconfig[ure] call.  (A "recent" addition to Tk -- 8.0
doesn't have it.)  This is from SF bug #457487 by anonymous.

23 years agoAdded the "Host" header to the "GET" example.
Fred Drake [Sat, 1 Sep 2001 02:35:23 +0000 (02:35 +0000)]
Added the "Host" header to the "GET" example.
This closes SF bug #457100.

23 years agoAdd various and sundry news items -- most mine, one Barry's, one
Guido van Rossum [Fri, 31 Aug 2001 18:31:35 +0000 (18:31 +0000)]
Add various and sundry news items -- most mine, one Barry's, one
Michael Hudson's.

23 years agoOops. The -W option takes args, not -X.
Guido van Rossum [Fri, 31 Aug 2001 18:17:13 +0000 (18:17 +0000)]
Oops.  The -W option takes args, not -X.

23 years agoAllow for the possibility that globals['__name__'] does not exist;
Guido van Rossum [Fri, 31 Aug 2001 17:46:35 +0000 (17:46 +0000)]
Allow for the possibility that globals['__name__'] does not exist;
substitute "<string>" for the module name in that case.  This actually
occurred when running test_descr.py with -Dwarn.

23 years agoAdd warning mode for classic division, almost exactly as specified in
Guido van Rossum [Fri, 31 Aug 2001 17:40:15 +0000 (17:40 +0000)]
Add warning mode for classic division, almost exactly as specified in
PEP 238.  Changes:

- add a new flag variable Py_DivisionWarningFlag, declared in
  pydebug.h, defined in object.c, set in main.c, and used in
  {int,long,float,complex}object.c.  When this flag is set, the
  classic division operator issues a DeprecationWarning message.

- add a new API PyRun_SimpleStringFlags() to match
  PyRun_SimpleString().  The main() function calls this so that
  commands run with -c can also benefit from -Dnew.

- While I was at it, I changed the usage message in main() somewhat:
  alphabetized the options, split it in *four* parts to fit in under
  512 bytes (not that I still believe this is necessary -- doc strings
  elsewhere are much longer), and perhaps most visibly, don't display
  the full list of options on each command line error.  Instead, the
  full list is only displayed when -h is used, and otherwise a brief
  reminder of -h is displayed.  When -h is used, write to stdout so
  that you can do `python -h | more'.

Notes:

- I don't want to use the -W option to control whether the classic
  division warning is issued or not, because the machinery to decide
  whether to display the warning or not is very expensive (it involves
  calling into the warnings.py module).  You can use -Werror to turn
  the warnings into exceptions though.

- The -Dnew option doesn't select future division for all of the
  program -- only for the __main__ module.  I don't know if I'll ever
  change this -- it would require changes to the .pyc file magic
  number to do it right, and a more global notion of compiler flags.

- You can usefully combine -Dwarn and -Dnew: this gives the __main__
  module new division, and warns about classic division everywhere
  else.

23 years agoFix a memory leak in str_subtype_new(). (All the other
Guido van Rossum [Fri, 31 Aug 2001 16:11:15 +0000 (16:11 +0000)]
Fix a memory leak in str_subtype_new().  (All the other
xxx_subtype_new() functions are OK, but I goofed up in this one. :-( )

23 years agoCorrect name mangling algorithm, and add a comment.
Guido van Rossum [Fri, 31 Aug 2001 04:35:14 +0000 (04:35 +0000)]
Correct name mangling algorithm, and add a comment.

23 years agoGive 'super' a decent repr(), and readonly attributes to access the
Guido van Rossum [Thu, 30 Aug 2001 23:13:11 +0000 (23:13 +0000)]
Give 'super' a decent repr(), and readonly attributes to access the
type and obj properties.  The "bogus super object" message is gone --
this will now just raise an AttributeError.

23 years agoAdded all the new files in the right packages and file groups (I think, untested).
Jack Jansen [Thu, 30 Aug 2001 22:10:10 +0000 (22:10 +0000)]
Added all the new files in the right packages and file groups (I think, untested).

23 years agoSF bug #456621: normpath on Win32 not collapsing c:\\..
Tim Peters [Thu, 30 Aug 2001 22:05:26 +0000 (22:05 +0000)]
SF bug #456621:  normpath on Win32 not collapsing c:\\..
I actually rewrote normpath quite a bit:  it had no test cases, and as
soon as I starting writing some I found several cases that didn't make
sense.

23 years agoAdd Jack Jansen's explanation of the MacOS X changes
Andrew M. Kuchling [Thu, 30 Aug 2001 21:30:16 +0000 (21:30 +0000)]
Add Jack Jansen's explanation of the MacOS X changes

23 years agoSuperseded by the (generated) xx.mcp.
Jack Jansen [Thu, 30 Aug 2001 21:29:57 +0000 (21:29 +0000)]
Superseded by the (generated) xx.mcp.

23 years agoCase mismatch in "import Types". Apparently nobody has looked at this for a looooong...
Jack Jansen [Thu, 30 Aug 2001 21:22:10 +0000 (21:22 +0000)]
Case mismatch in "import Types". Apparently nobody has looked at this for a looooong time. Reported by Chris Smith.

23 years agoWe should look in the directory containing the module, not in the module itself,...
Jack Jansen [Thu, 30 Aug 2001 21:19:42 +0000 (21:19 +0000)]
We should look in the directory containing the module, not in the module itself, when we're looking for the resource file.

23 years agoGroup some projects into "Done" and "To do". Get rid of Tim's merge
Guido van Rossum [Thu, 30 Aug 2001 21:18:04 +0000 (21:18 +0000)]
Group some projects into "Done" and "To do".  Get rid of Tim's merge
scratchpad -- the merge is long behind us.

23 years agometaclass(): add some more examples of metaclasses, including one
Guido van Rossum [Thu, 30 Aug 2001 20:52:40 +0000 (20:52 +0000)]
metaclass(): add some more examples of metaclasses, including one
using cooperative multiple inheritance.

inherits(): add a test for subclassing the unicode type.

23 years agoSF patch #455966: Allow leading 0 in float/imag literals.
Tim Peters [Thu, 30 Aug 2001 20:51:59 +0000 (20:51 +0000)]
SF patch #455966:  Allow leading 0 in float/imag literals.
Consequences for Jython still unknown (but raised on Jython-Dev).

23 years agoPyObject_Repr(): add missing ">" back at end of format string: "<%s
Guido van Rossum [Thu, 30 Aug 2001 20:26:05 +0000 (20:26 +0000)]
PyObject_Repr(): add missing ">" back at end of format string: "<%s
object at %p>".

23 years agoFix _convert_NAME() so that it doesn't store locals for class bodies.
Jeremy Hylton [Thu, 30 Aug 2001 20:25:55 +0000 (20:25 +0000)]
Fix _convert_NAME() so that it doesn't store locals for class bodies.

Fix list comp code generation -- emit GET_ITER instead of Const(0)
after the list.

Add CO_GENERATOR flag to generators.

Get CO_xxx flags from the new module

23 years agoSquash new compiler wng.
Tim Peters [Thu, 30 Aug 2001 20:07:55 +0000 (20:07 +0000)]
Squash new compiler wng.

23 years agoAdd testcases for inheritance from tricky builtins (numbers, strings,
Guido van Rossum [Thu, 30 Aug 2001 20:06:08 +0000 (20:06 +0000)]
Add testcases for inheritance from tricky builtins (numbers, strings,
tuples).

23 years agoPytype_GenericAlloc(): round up size so we zap all four bytes of the
Guido van Rossum [Thu, 30 Aug 2001 20:00:07 +0000 (20:00 +0000)]
Pytype_GenericAlloc(): round up size so we zap all four bytes of the
__dict__ slot for string subtypes.

subtype_dealloc(): properly use _PyObject_GetDictPtr() to get the
(potentially negative) dict offset.  Don't copy things into local
variables that are used only once.

type_new(): properly calculate a negative dict offset when tp_itemsize
is nonzero.  The __dict__ attribute, if present, is now a calculated
attribute rather than a structure member.

23 years agoRevert the previous patch to test_pow.py and move the test to test_unary.py
Fred Drake [Thu, 30 Aug 2001 19:15:20 +0000 (19:15 +0000)]
Revert the previous patch to test_pow.py and move the test to test_unary.py
based on a suggestion from Tim Peters; also make sure that we're really
doing exponentiation and not multiplication.

23 years agoAdded a regression test for the negation-of-exponentiation optimization
Fred Drake [Thu, 30 Aug 2001 18:56:30 +0000 (18:56 +0000)]
Added a regression test for the negation-of-exponentiation optimization
bug from compile.c.  (SF bug #456756.)

23 years agoWhen re-writing a factor containing a unary negation of a literal, only
Fred Drake [Thu, 30 Aug 2001 18:53:25 +0000 (18:53 +0000)]
When re-writing a factor containing a unary negation of a literal, only
affect nodes without another operator.  This was causing negated
exponentiations to drop the exponentiation.  This closes SF bug #456756.

23 years agoMore stuff discovered while writing the simplest of testcases:
Guido van Rossum [Thu, 30 Aug 2001 18:31:30 +0000 (18:31 +0000)]
More stuff discovered while writing the simplest of testcases:

tupledealloc(): only feed the free list when the type is really a
tuple, not a subtype.  Otherwise, use PyObject_GC_Del().

_PyTuple_Resize(): disallow using this for tuple subtypes.

23 years agoDo the int inlining only if the type is really an int, not whenever
Guido van Rossum [Thu, 30 Aug 2001 16:06:23 +0000 (16:06 +0000)]
Do the int inlining only if the type is really an int, not whenever
PyInt_Check() succeeds.  That returns true for subtypes of int, which
may override __add__ or __sub__.

23 years agoAh, the joy of writing test cases...
Guido van Rossum [Thu, 30 Aug 2001 15:54:44 +0000 (15:54 +0000)]
Ah, the joy of writing test cases...

long_subtype_new(): fix a typo (type->ob_size instead of
tmp->ob_size).

23 years agospurious pop
Jeremy Hylton [Thu, 30 Aug 2001 15:50:34 +0000 (15:50 +0000)]
spurious pop

23 years agoAdd news about GC API change. Explain how to upgrade extension modules.
Neil Schemenauer [Thu, 30 Aug 2001 15:38:01 +0000 (15:38 +0000)]
Add news about GC API change.  Explain how to upgrade extension modules.

23 years agoUpdate documentation for GC API. Closes SF patch #421893.
Neil Schemenauer [Thu, 30 Aug 2001 15:24:17 +0000 (15:24 +0000)]
Update documentation for GC API.  Closes SF patch #421893.

23 years agowin_getpass(): if sys.stdin is not sys.__stdin__, use
Guido van Rossum [Thu, 30 Aug 2001 15:07:44 +0000 (15:07 +0000)]
win_getpass(): if sys.stdin is not sys.__stdin__, use
default_getpass().  This should prevent hanging when it is called in
IDLE.

Fixes SF bug #455648.

23 years agofix for part of bug #453523: disable unmarshalling of code objects in
Michael W. Hudson [Thu, 30 Aug 2001 14:50:20 +0000 (14:50 +0000)]
fix for part of bug #453523: disable unmarshalling of code objects in
restricted execution mode.

23 years agoUpdate the links to the FIPS document that defines the Secure Hash
Fred Drake [Thu, 30 Aug 2001 14:42:40 +0000 (14:42 +0000)]
Update the links to the FIPS document that defines the Secure Hash
Algorithm.  This closes SF bug #454917.

23 years agoRemoved unreachable return to silence SGI compiler.
Sjoerd Mullender [Thu, 30 Aug 2001 14:37:07 +0000 (14:37 +0000)]
Removed unreachable return to silence SGI compiler.

23 years agoRemoved an unreachable break statement to silence SGI compiler.
Sjoerd Mullender [Thu, 30 Aug 2001 14:15:38 +0000 (14:15 +0000)]
Removed an unreachable break statement to silence SGI compiler.

23 years agoRemoved unreachable goto statement to silence SGI compiler.
Sjoerd Mullender [Thu, 30 Aug 2001 14:06:45 +0000 (14:06 +0000)]
Removed unreachable goto statement to silence SGI compiler.

23 years agoRemoved some unreachable break statements to silence SGI compiler.
Sjoerd Mullender [Thu, 30 Aug 2001 14:05:20 +0000 (14:05 +0000)]
Removed some unreachable break statements to silence SGI compiler.

23 years agoRemoved some unreachable break statements to silence SGI compiler.
Sjoerd Mullender [Thu, 30 Aug 2001 13:58:58 +0000 (13:58 +0000)]
Removed some unreachable break statements to silence SGI compiler.

23 years agoStarted on the 2.2a2 installer
Jack Jansen [Thu, 30 Aug 2001 13:26:53 +0000 (13:26 +0000)]
Started on the 2.2a2 installer

23 years agoGive the internal immutable list type .extend and .pop methods (they
Tim Peters [Thu, 30 Aug 2001 06:15:32 +0000 (06:15 +0000)]
Give the internal immutable list type .extend and .pop methods (they
"should have" been added here when they were added to lists).

23 years agoAdd a new function imp.lock_held(), and use it to skip test_threaded_import
Tim Peters [Thu, 30 Aug 2001 05:16:13 +0000 (05:16 +0000)]
Add a new function imp.lock_held(), and use it to skip test_threaded_import
when that test is doomed to deadlock.

23 years agoSafety measures now that str and tuple are subclassable:
Guido van Rossum [Thu, 30 Aug 2001 04:43:35 +0000 (04:43 +0000)]
Safety measures now that str and tuple are subclassable:

If tp_itemsize of the basetype is nonzero, only allow empty __slots__
(declaring that no __dict__ should be added), and don't add a weakref
offset.

23 years agoMake 'super' subclassable. (Not sure how useful this is yet. :-)
Guido van Rossum [Thu, 30 Aug 2001 04:37:15 +0000 (04:37 +0000)]
Make 'super' subclassable.  (Not sure how useful this is yet. :-)

23 years agoMake unicode subclassable.
Guido van Rossum [Thu, 30 Aug 2001 03:12:59 +0000 (03:12 +0000)]
Make unicode subclassable.

23 years agoMake str and tuple types subclassable.
Guido van Rossum [Thu, 30 Aug 2001 03:11:59 +0000 (03:11 +0000)]
Make str and tuple types subclassable.

23 years agoMake getset subclassable.
Guido van Rossum [Thu, 30 Aug 2001 03:10:36 +0000 (03:10 +0000)]
Make getset subclassable.

23 years agoFix typo: double semicolons.
Guido van Rossum [Thu, 30 Aug 2001 03:09:31 +0000 (03:09 +0000)]
Fix typo: double semicolons.

23 years agoMake the Py<type>_Check() macro use PyObject_TypeCheck().
Guido van Rossum [Thu, 30 Aug 2001 03:08:07 +0000 (03:08 +0000)]
Make the Py<type>_Check() macro use PyObject_TypeCheck().

23 years agoSquash new compiler wng in debug build.
Tim Peters [Thu, 30 Aug 2001 00:32:51 +0000 (00:32 +0000)]
Squash new compiler wng in debug build.

23 years agogcmodule is now always compiled
Neil Schemenauer [Thu, 30 Aug 2001 00:13:38 +0000 (00:13 +0000)]
gcmodule is now always compiled

23 years agogcmodule is now enabled here
Neil Schemenauer [Thu, 30 Aug 2001 00:12:32 +0000 (00:12 +0000)]
gcmodule is now enabled here

23 years agoMake more things internal to this file. Remove
Neil Schemenauer [Thu, 30 Aug 2001 00:05:51 +0000 (00:05 +0000)]
Make more things internal to this file.  Remove
visit_finalizer_reachable since it's the same as visit_reachable.
Rename visit_reachable to visit_move.  Objects can now have the GC type
flag set, reachable by tp_traverse and not be in a GC linked list.  This
should make the collector more robust and easier to use by extension
module writers.  Add memory management functions for container objects
(new, del, resize).

23 years agoAlways build gcmodule.
Neil Schemenauer [Wed, 29 Aug 2001 23:58:47 +0000 (23:58 +0000)]
Always build gcmodule.

23 years agoFlush output more aggressively. This makes things look better if
Neil Schemenauer [Wed, 29 Aug 2001 23:57:22 +0000 (23:57 +0000)]
Flush output more aggressively.  This makes things look better if
the setup script is running from inside Vim.

23 years agoUse new GC API. Remove usage of BASICSIZE macros.
Neil Schemenauer [Wed, 29 Aug 2001 23:54:54 +0000 (23:54 +0000)]
Use new GC API.  Remove usage of BASICSIZE macros.

23 years agoUse new GC API.
Neil Schemenauer [Wed, 29 Aug 2001 23:54:21 +0000 (23:54 +0000)]
Use new GC API.

23 years agoRemove GC related code. It lives in gcmodule now.
Neil Schemenauer [Wed, 29 Aug 2001 23:54:03 +0000 (23:54 +0000)]
Remove GC related code.  It lives in gcmodule now.

23 years agoMake frames a PyVarObject. Use new GC API.
Neil Schemenauer [Wed, 29 Aug 2001 23:52:17 +0000 (23:52 +0000)]
Make frames a PyVarObject.  Use new GC API.

23 years agoRemove bogus PyGC_HEAD_SIZE.
Neil Schemenauer [Wed, 29 Aug 2001 23:50:42 +0000 (23:50 +0000)]
Remove bogus PyGC_HEAD_SIZE.

23 years agoChange the GC type flag since the API has changed. Allow types using
Neil Schemenauer [Wed, 29 Aug 2001 23:49:28 +0000 (23:49 +0000)]
Change the GC type flag since the API has changed.  Allow types using
the old flag to still compile.  Remove the PyType_BASICSIZE and
PyType_SET_BASICSIZE macros.  Add PyObject_GC_New, PyObject_GC_NewVar,
PyObject_GC_Resize, PyObject_GC_Del, PyObject_GC_Track,
PyObject_GC_UnTrack.  Part of SF patch #421893.

23 years agoChange the GC type flag since the API has changed. Allow types using
Neil Schemenauer [Wed, 29 Aug 2001 23:46:35 +0000 (23:46 +0000)]
Change the GC type flag since the API has changed.  Allow types using
the old flag to still compile.

23 years agoMake frames a PyVarObject instead of a PyObject.
Neil Schemenauer [Wed, 29 Aug 2001 23:45:25 +0000 (23:45 +0000)]
Make frames a PyVarObject instead of a PyObject.

23 years agoAlways compile gcmodule.
Neil Schemenauer [Wed, 29 Aug 2001 23:44:38 +0000 (23:44 +0000)]
Always compile gcmodule.

23 years agoTrack the block stack more reasonably in order to handle continue in
Jeremy Hylton [Wed, 29 Aug 2001 22:30:09 +0000 (22:30 +0000)]
Track the block stack more reasonably in order to handle continue in
try/except or try/finally.

Previous versions had only track SETUP_LOOP blocks and ignored the
exception part.  This meant that it allowed continue inside a
try/except but generated buggy code.  Now it does the right thing.

23 years agoImprove stack depth computation for try/except and try/finally
Jeremy Hylton [Wed, 29 Aug 2001 22:27:14 +0000 (22:27 +0000)]
Improve stack depth computation for try/except and try/finally

Add CONTINUE_LOOP to the list of unconditional transfers

23 years agoAdd __getitem__() handler for use by visitContinue()
Jeremy Hylton [Wed, 29 Aug 2001 22:26:35 +0000 (22:26 +0000)]
Add __getitem__() handler for use by visitContinue()

23 years agoAdded xx and xxsubtype modules, for completeness and because xxsubtype is used by...
Jack Jansen [Wed, 29 Aug 2001 22:08:06 +0000 (22:08 +0000)]
Added xx and xxsubtype modules, for completeness and because xxsubtype is used by the test suite.

23 years agoStarted on release notes and readme for 2.2a2.
Jack Jansen [Wed, 29 Aug 2001 22:04:08 +0000 (22:04 +0000)]
Started on release notes and readme for 2.2a2.

23 years agoSF bug [#456252] Python should never stomp on [u]intptr_t.
Tim Peters [Wed, 29 Aug 2001 21:37:10 +0000 (21:37 +0000)]
SF bug [#456252] Python should never stomp on [u]intptr_t.
pyport.h:  typedef a new Py_intptr_t type.
    DELICATE ASSUMPTION:  That HAVE_UINTPTR_T implies intptr_t is
    available as well as uintptr_t.  If that turns out not to be
    true, things must get uglier (C99 wants both, so I think it's
    an assumption we're *likely* to get away with).
thread_nt.h, PyThread_start_new_thread:  MS _beginthread is documented
    as returning unsigned long; no idea why uintptr_t was being used.
Others:  Always use Py_[u]intptr_t, never [u]intptr_t directly.

23 years agoGenerate SET_LINENO for list and tuple literals when the open paren
Jeremy Hylton [Wed, 29 Aug 2001 20:57:43 +0000 (20:57 +0000)]
Generate SET_LINENO for list and tuple literals when the open paren
starts a new line.

Also fix undetected typo in visitDict() -- uncovered by recent change
to add lineno attrs to atoms.

23 years agoMake sure that atoms (Tuple, List, etc.) have lineno attributes
Jeremy Hylton [Wed, 29 Aug 2001 20:56:30 +0000 (20:56 +0000)]
Make sure that atoms (Tuple, List, etc.) have lineno attributes

23 years agoFix off-by-one errors in code to find depth of stack.
Jeremy Hylton [Wed, 29 Aug 2001 20:55:17 +0000 (20:55 +0000)]
Fix off-by-one errors in code to find depth of stack.

XXX The code is still widely inaccurate, but most (all?) of the time
it's an overestimate.

23 years agoWorkaround by Tim Peters to skip this test if run from test.autotest,
Jack Jansen [Wed, 29 Aug 2001 20:26:24 +0000 (20:26 +0000)]
Workaround by Tim Peters to skip this test if run from test.autotest,
in which case it will hang because the import lock is already held
by the main thread.

23 years agoUndo change from list to dict for handling varnames, consts, etc.
Jeremy Hylton [Wed, 29 Aug 2001 19:45:33 +0000 (19:45 +0000)]
Undo change from list to dict for handling varnames, consts, etc.

As the doc string for _lookupName() explains:

    This routine uses a list instead of a dictionary, because a
    dictionary can't store two different keys if the keys have the
    same value but different types, e.g. 2 and 2L.  The compiler
    must treat these two separately, so it does an explicit type
    comparison before comparing the values.

23 years agoChange default() to use getChildNodes() instead of getChildren()
Jeremy Hylton [Wed, 29 Aug 2001 18:17:22 +0000 (18:17 +0000)]
Change default() to use getChildNodes() instead of getChildren()

23 years agoSupport // and //=
Jeremy Hylton [Wed, 29 Aug 2001 18:14:39 +0000 (18:14 +0000)]
Support // and //=

Generate SET_LINENO for del statements.

Define klass=1 for PyFlowGraph constructor for a class statement.  A
class has no varnames.