]> granicus.if.org Git - python/log
python
23 years agoAdded prototypes to silence gcc strict-prototype warnings.
Jack Jansen [Tue, 4 Sep 2001 22:20:39 +0000 (22:20 +0000)]
Added prototypes to silence gcc strict-prototype warnings.
Fixed a few missing return values.

23 years agoRegenerated without default int return types.
Jack Jansen [Tue, 4 Sep 2001 22:19:18 +0000 (22:19 +0000)]
Regenerated without default int return types.

23 years agoDon't use a default "int" return type, gcc gives a warning about it.
Jack Jansen [Tue, 4 Sep 2001 22:16:33 +0000 (22:16 +0000)]
Don't use a default "int" return type, gcc gives a warning about it.

23 years agoAdded pythonpath.r to the developer distribution. It's
Jack Jansen [Tue, 4 Sep 2001 22:15:05 +0000 (22:15 +0000)]
Added pythonpath.r to the developer distribution. It's
useful to people extending Python. Suggested by
Alexandre Parenteau.

23 years agoAt Guido's suggestion, here's a new C API function, PyObject_Dir(), like
Tim Peters [Tue, 4 Sep 2001 22:08:56 +0000 (22:08 +0000)]
At Guido's suggestion, here's a new C API function, PyObject_Dir(), like
__builtin__.dir().  Moved the guts from bltinmodule.c to object.c.

23 years agoOn MacOSX built the toolbox extension modules iff we're building with
Jack Jansen [Tue, 4 Sep 2001 21:33:12 +0000 (21:33 +0000)]
On MacOSX built the toolbox extension modules iff we're building with
--enable-framework.
Some modules that are also useful outside a fullblown application are
always built.

23 years agoTemplate for an OSX PythonInterpreter application.
Jack Jansen [Tue, 4 Sep 2001 21:28:03 +0000 (21:28 +0000)]
Template for an OSX PythonInterpreter application.

23 years agoCorrection: the Borland C port isn't fully operational yet
Andrew M. Kuchling [Tue, 4 Sep 2001 21:25:58 +0000 (21:25 +0000)]
Correction: the Borland C port isn't fully operational yet

23 years agoPhotoshop sources for icon files. Not pretty, but hey! I'm not an
Jack Jansen [Tue, 4 Sep 2001 21:25:36 +0000 (21:25 +0000)]
Photoshop sources for icon files. Not pretty, but hey! I'm not an
artist (and a certain artist didn't jump in, yet).

23 years ago[Bug #444589] Record empty directories in the install_data command
Andrew M. Kuchling [Tue, 4 Sep 2001 20:42:08 +0000 (20:42 +0000)]
[Bug #444589] Record empty directories in the install_data command
   Slightly modified version of patch from Jon Nelson (jnelson).

23 years ago[Bug #436732] install.py does not record a created *.pth file in the
Andrew M. Kuchling [Tue, 4 Sep 2001 20:06:43 +0000 (20:06 +0000)]
[Bug #436732] install.py does not record a created *.pth file in the
   INSTALLED_FILES output.  Modified version of a patch from
   Jon Nelson (jnelson)

23 years agoRevert one of the "division fixes" in test_long. It intends to try both
Tim Peters [Tue, 4 Sep 2001 19:48:01 +0000 (19:48 +0000)]
Revert one of the "division fixes" in test_long.  It intends to try both
"/" and "//", and doesn't really care what they *mean*, just that both
are tried (and that, whatever they mean, they act similarly for int and
long arguments).

23 years agoMake pprint more locale-friendly; patch contributed by Denis S. Otkidach.
Fred Drake [Tue, 4 Sep 2001 19:43:26 +0000 (19:43 +0000)]
Make pprint more locale-friendly; patch contributed by Denis S. Otkidach.
This closes SF patch #451538.

23 years ago[Bug #457654] bkgd() used a hard-coded A_NORMAL attribute, when it should
Andrew M. Kuchling [Tue, 4 Sep 2001 19:34:32 +0000 (19:34 +0000)]
[Bug #457654] bkgd() used a hard-coded A_NORMAL attribute, when it should
    have used the attribute argument provided as a parameter

23 years agoConvert docstring to "raw" string.
Fred Drake [Tue, 4 Sep 2001 19:20:06 +0000 (19:20 +0000)]
Convert docstring to "raw" string.

23 years agoThe first batch of changes recommended by the fixdiv tool. These are
Guido van Rossum [Tue, 4 Sep 2001 19:14:14 +0000 (19:14 +0000)]
The first batch of changes recommended by the fixdiv tool.  These are
mostly changes of / operators into //.  Once or twice I did more or
less than recommended.

23 years agoAdded docstrings by Neal Norwitz. This closes SF bug #450980.
Fred Drake [Tue, 4 Sep 2001 19:10:20 +0000 (19:10 +0000)]
Added docstrings by Neal Norwitz.  This closes SF bug #450980.

23 years agoMove call_trace(..., PyTrace_CALL, ...) call to top of eval_frame. That
Neil Schemenauer [Tue, 4 Sep 2001 19:03:35 +0000 (19:03 +0000)]
Move call_trace(..., PyTrace_CALL, ...) call to top of eval_frame.  That
way it's called each time a generator is resumed.  The tracing of normal
functions should be unaffected by this change.

23 years agoAdded docstring by Neal Norwitz. This closes SF bug #450981.
Fred Drake [Tue, 4 Sep 2001 18:55:03 +0000 (18:55 +0000)]
Added docstring by Neal Norwitz.  This closes SF bug #450981.

23 years agoAdded docstring by Neal Norwitz. This closes SF bug #450979.
Fred Drake [Tue, 4 Sep 2001 18:39:45 +0000 (18:39 +0000)]
Added docstring by Neal Norwitz.  This closes SF bug #450979.

23 years agoAdd more detail to the descriptions of the shutil functions.
Fred Drake [Tue, 4 Sep 2001 18:26:27 +0000 (18:26 +0000)]
Add more detail to the descriptions of the shutil functions.
This closes SF bug #458223.

23 years agoAdded documentation for sys.maxunicode and sys.warnoptions.
Fred Drake [Tue, 4 Sep 2001 18:18:36 +0000 (18:18 +0000)]
Added documentation for sys.maxunicode and sys.warnoptions.
Fixed a markup error which caused an em dash to be presented as a minus sign.
This closes SF bug #458350.

23 years agoHTMLParser is allowed to be more strict than sgmllib, so let's not
Fred Drake [Tue, 4 Sep 2001 16:26:03 +0000 (16:26 +0000)]
HTMLParser is allowed to be more strict than sgmllib, so let's not
change their basic behavior:  When parsing something that cannot possibly
be valid in either HTML or XHTML, raise an exception.

23 years ago- Reverse the meaning of the -m option: warnings about multiple /
Guido van Rossum [Tue, 4 Sep 2001 16:22:01 +0000 (16:22 +0000)]
- Reverse the meaning of the -m option: warnings about multiple /
  operators per line or statement are now on by default, and -m turns
  these warnings off.

- Change the way multiple / operators are reported; a regular
  recommendation is always emitted after the warning.

- Report ambiguous warnings (both int|long and float|complex used for
  the same operator).

- Update the doc string again to clarify all this and describe the
  possible messages more precisely.

23 years agoSuppressing all DeprecationWarning messages was a bit of a problem for
Guido van Rossum [Tue, 4 Sep 2001 15:22:02 +0000 (15:22 +0000)]
Suppressing all DeprecationWarning messages was a bit of a problem for
the -Qwarnall option, so I've changed this to only filter out the one
warning that's a problem in practice.

23 years agoSuppress the warning about regex here.
Guido van Rossum [Tue, 4 Sep 2001 15:18:54 +0000 (15:18 +0000)]
Suppress the warning about regex here.

23 years agoEnhanced the test for DOCTYPE declarations, added a test for dealing with
Fred Drake [Tue, 4 Sep 2001 15:13:04 +0000 (15:13 +0000)]
Enhanced the test for DOCTYPE declarations, added a test for dealing with
broken declaration-like things.

23 years agoAdded reasonable parsing of the DOCTYPE declaration, fixed edge cases
Fred Drake [Tue, 4 Sep 2001 15:10:16 +0000 (15:10 +0000)]
Added reasonable parsing of the DOCTYPE declaration, fixed edge cases
regarding bare ampersands in content.

23 years agoOn the mac some library paths returned were outdated, some were outright funny.
Jack Jansen [Tue, 4 Sep 2001 12:01:49 +0000 (12:01 +0000)]
On the mac some library paths returned were outdated, some were outright funny.
Fixed.

23 years agoDisabled _curses modules on MacOSX. The curses version is a 1994 BSD
Jack Jansen [Tue, 4 Sep 2001 09:05:11 +0000 (09:05 +0000)]
Disabled _curses modules on MacOSX. The curses version is a 1994 BSD
curses, far too old for _cursesmodule.c.

23 years agoWhitespace normalization.
Tim Peters [Tue, 4 Sep 2001 06:37:28 +0000 (06:37 +0000)]
Whitespace normalization.

23 years agoFixed a typo and added more tests.
Tim Peters [Tue, 4 Sep 2001 06:33:00 +0000 (06:33 +0000)]
Fixed a typo and added more tests.

23 years agoChange long/long true division to return as many good bits as it can;
Tim Peters [Tue, 4 Sep 2001 06:17:36 +0000 (06:17 +0000)]
Change long/long true division to return as many good bits as it can;
e.g., (1L << 40000)/(1L << 40001) returns 0.5, not Inf or NaN or whatever.

23 years agoMove int_true_divide next to the other division routines.
Tim Peters [Tue, 4 Sep 2001 05:52:47 +0000 (05:52 +0000)]
Move int_true_divide next to the other division routines.

23 years agoMove long_true_divide next to the other division routines (for clarity!).
Tim Peters [Tue, 4 Sep 2001 05:31:47 +0000 (05:31 +0000)]
Move long_true_divide next to the other division routines (for clarity!).

23 years agoRaise OverflowError when appropriate on long->float conversion. Most of
Tim Peters [Tue, 4 Sep 2001 05:14:19 +0000 (05:14 +0000)]
Raise OverflowError when appropriate on long->float conversion.  Most of
the fiddling is simply due to that no caller of PyLong_AsDouble ever
checked for failure (so that's fixing old bugs).  PyLong_AsDouble is much
faster for big inputs now too, but that's more of a happy consequence
than a design goal.

23 years agoPEP 238 documented -Qwarn as warning only for classic int or long
Guido van Rossum [Tue, 4 Sep 2001 03:51:09 +0000 (03:51 +0000)]
PEP 238 documented -Qwarn as warning only for classic int or long
division, and this makes sense.  Add -Qwarnall to warn for all
classic divisions, as required by the fixdiv.py tool.

23 years agoRename the -D option to -Q, to avoid a Jython option name conflict.
Guido van Rossum [Tue, 4 Sep 2001 03:26:15 +0000 (03:26 +0000)]
Rename the -D option to -Q, to avoid a Jython option name conflict.

23 years agoIntroduce new private API function _PyLong_AsScaledDouble. Not used yet,
Tim Peters [Tue, 4 Sep 2001 02:50:49 +0000 (02:50 +0000)]
Introduce new private API function _PyLong_AsScaledDouble.  Not used yet,
but will be the foundation for Good Things:
+ Speed PyLong_AsDouble.
+ Give PyLong_AsDouble the ability to detect overflow.
+ Make true division of long/long nearly as accurate as possible (no
  spurious infinities or NaNs).
+ Return non-insane results from math.log and math.log10 when passing a
  long that can't be approximated by a double better than HUGE_VAL.

23 years agobuiltin_dir(): Treat classic classes like types. Use PyDict_Keys instead
Tim Peters [Tue, 4 Sep 2001 01:20:04 +0000 (01:20 +0000)]
builtin_dir():  Treat classic classes like types.  Use PyDict_Keys instead
of PyMapping_Keys because we know we have a real dict.  Tolerate that
objects may have an attr named "__dict__" that's not a dict (Py_None
popped up during testing).

test_descr.py, test_dir():  Test the new classic-class behavior; beef up
the new-style class test similarly.

test_pyclbr.py, checkModule():  dir(C) is no longer a synonym for
C.__dict__.keys() when C is a classic class (looks like the same thing
that burned distutils! -- should it be *made* a synoym again?  Then it
would be inconsistent with new-style class behavior.).

23 years agoDon't use dir() to find instance attribute names.
Neil Schemenauer [Mon, 3 Sep 2001 15:47:21 +0000 (15:47 +0000)]
Don't use dir() to find instance attribute names.

23 years agoFix the names of _PyObject_GC_TRACK and _PyObject_GC_UNTRACK when the GC is
Neil Schemenauer [Mon, 3 Sep 2001 15:44:48 +0000 (15:44 +0000)]
Fix the names of _PyObject_GC_TRACK and _PyObject_GC_UNTRACK when the GC is
disabled.  Obviously everyone enables the GC. :-)

23 years agoRestore a line deleted by mistake.
Tim Peters [Mon, 3 Sep 2001 08:44:02 +0000 (08:44 +0000)]
Restore a line deleted by mistake.

23 years agoNew restriction on pow(x, y, z): If z is not None, x and y must be of
Tim Peters [Mon, 3 Sep 2001 08:35:41 +0000 (08:35 +0000)]
New restriction on pow(x, y, z):  If z is not None, x and y must be of
integer types, and y must be >= 0.  See discussion at
http://sf.net/tracker/index.php?func=detail&aid=457066&group_id=5470&atid=105470

23 years agoMake dir() wordier (see the new docstring). The new behavior is a mixed
Tim Peters [Mon, 3 Sep 2001 05:47:38 +0000 (05:47 +0000)]
Make dir() wordier (see the new docstring).  The new behavior is a mixed
bag.  It's clearly wrong for classic classes, at heart because a classic
class doesn't have a __class__ attribute, and I'm unclear on whether
that's feature or bug.  I'll repair this once I find out (in the
meantime, dir() applied to classic classes won't find the base classes,
while dir() applied to a classic-class instance *will* find the base
classes but not *their* base classes).

Please give the new dir() a try and see whether you love it or hate it.
The new dir([]) behavior is something I could come to love.  Here's
something to hate:

>>> class C:
...     pass
...
>>> c = C()
>>> dir(c)
['__doc__', '__module__']
>>>

The idea that an instance has a __doc__ attribute is jarring (of course
it's really c.__class__.__doc__ == C.__doc__; likewise for __module__).

OTOH, the code already has too many special cases, and dir(x) doesn't
have a compelling or clear purpose when x isn't a module.

23 years agoMade a doctest out of the examples in Guido's type/class tutorial.
Tim Peters [Mon, 3 Sep 2001 01:24:30 +0000 (01:24 +0000)]
Made a doctest out of the examples in Guido's type/class tutorial.

23 years agoClarify the Borland situation, based on email from Stephen.
Tim Peters [Sun, 2 Sep 2001 23:01:43 +0000 (23:01 +0000)]
Clarify the Borland situation, based on email from Stephen.

23 years agoRepair typo in comment.
Tim Peters [Sun, 2 Sep 2001 18:35:54 +0000 (18:35 +0000)]
Repair typo in comment.

23 years agoAdded the last few missing files, and put everything in the right packages.
Jack Jansen [Sun, 2 Sep 2001 14:48:32 +0000 (14:48 +0000)]
Added the last few missing files, and put everything in the right packages.
Tested, too:-)

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).