Commit Graph

19396 Commits

Author SHA1 Message Date
Jack Jansen e9fb3d6db3 Include Carbon/Carbon.h if we're on OSX. 2001-09-01 23:38:13 +00:00
Jack Jansen 0de279b9cd Updated the Popt resources for the applets to the newest version. 2001-09-01 23:37:28 +00:00
Jack Jansen ff5d8aaa28 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.
2001-09-01 22:37:54 +00:00
Jack Jansen a5ffeb69ab Added preferences/startup options for division warning
and accepting unix-style newlines on input.
2001-09-01 22:36:29 +00:00
Guido van Rossum 822218b400 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! :-)
2001-09-01 21:55:58 +00:00
Guido van Rossum a0adb92b23 Add Listbox.itemconfig[ure] call. (A "recent" addition to Tk -- 8.0
doesn't have it.)  This is from SF bug #457487 by anonymous.
2001-09-01 18:29:55 +00:00
Fred Drake 481cf2c064 Added the "Host" header to the "GET" example.
This closes SF bug #457100.
2001-09-01 02:35:23 +00:00
Guido van Rossum ae45714ed3 Add various and sundry news items -- most mine, one Barry's, one
Michael Hudson's.
2001-08-31 18:31:35 +00:00
Guido van Rossum 97741a3041 Oops. The -W option takes args, not -X. 2001-08-31 18:17:13 +00:00
Guido van Rossum 8031bbec4a 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.
2001-08-31 17:46:35 +00:00
Guido van Rossum 393661d15f 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.
2001-08-31 17:40:15 +00:00
Guido van Rossum 29d55a38ce Fix a memory leak in str_subtype_new(). (All the other
xxx_subtype_new() functions are OK, but I goofed up in this one. :-( )
2001-08-31 16:11:15 +00:00
Guido van Rossum bfa47b0725 Correct name mangling algorithm, and add a comment. 2001-08-31 04:35:14 +00:00
Guido van Rossum 41eb14dffa 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.
2001-08-30 23:13:11 +00:00
Jack Jansen 7561d9ead9 Added all the new files in the right packages and file groups (I think, untested). 2001-08-30 22:10:10 +00:00
Tim Peters 54a14a373e 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.
2001-08-30 22:05:26 +00:00
Andrew M. Kuchling 0e03f588f5 Add Jack Jansen's explanation of the MacOS X changes 2001-08-30 21:30:16 +00:00
Jack Jansen 1da6eb091a Superseded by the (generated) xx.mcp. 2001-08-30 21:29:57 +00:00
Jack Jansen ba0ba411d1 Case mismatch in "import Types". Apparently nobody has looked at this for a looooong time. Reported by Chris Smith. 2001-08-30 21:22:10 +00:00
Jack Jansen b214c36d0a We should look in the directory containing the module, not in the module itself, when we're looking for the resource file. 2001-08-30 21:19:42 +00:00
Guido van Rossum eb9f384c28 Group some projects into "Done" and "To do". Get rid of Tim's merge
scratchpad -- the merge is long behind us.
2001-08-30 21:18:04 +00:00
Guido van Rossum 91ee798892 metaclass(): add some more examples of metaclasses, including one
using cooperative multiple inheritance.

inherits(): add a test for subclassing the unicode type.
2001-08-30 20:52:40 +00:00
Tim Peters d507dab91f SF patch #455966: Allow leading 0 in float/imag literals.
Consequences for Jython still unknown (but raised on Jython-Dev).
2001-08-30 20:51:59 +00:00
Guido van Rossum 21922aa939 PyObject_Repr(): add missing ">" back at end of format string: "<%s
object at %p>".
2001-08-30 20:26:05 +00:00
Jeremy Hylton 71ebc3359b 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
2001-08-30 20:25:55 +00:00
Tim Peters 017cb2c7d8 Squash new compiler wng. 2001-08-30 20:07:55 +00:00
Guido van Rossum caa9f43779 Add testcases for inheritance from tricky builtins (numbers, strings,
tuples).
2001-08-30 20:06:08 +00:00
Guido van Rossum 6fb3fdec7c 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.
2001-08-30 20:00:07 +00:00
Fred Drake 702ca4ffcb 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.
2001-08-30 19:15:20 +00:00
Fred Drake d256271c55 Added a regression test for the negation-of-exponentiation optimization
bug from compile.c.  (SF bug #456756.)
2001-08-30 18:56:30 +00:00
Fred Drake 14ef244dfe 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.
2001-08-30 18:53:25 +00:00
Guido van Rossum 4b8c0f6d7d 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.
2001-08-30 18:31:30 +00:00
Guido van Rossum 46add98758 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__.
2001-08-30 16:06:23 +00:00
Guido van Rossum 13228a6f09 Ah, the joy of writing test cases...
long_subtype_new(): fix a typo (type->ob_size instead of
tmp->ob_size).
2001-08-30 15:54:44 +00:00
Jeremy Hylton f71b5fec43 spurious pop 2001-08-30 15:50:34 +00:00
Neil Schemenauer 4042c69b5e Add news about GC API change. Explain how to upgrade extension modules. 2001-08-30 15:38:01 +00:00
Neil Schemenauer 55cdc88c09 Update documentation for GC API. Closes SF patch #421893. 2001-08-30 15:24:17 +00:00
Guido van Rossum 60250e2859 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.
2001-08-30 15:07:44 +00:00
Michael W. Hudson 8019913e4a fix for part of bug #453523: disable unmarshalling of code objects in
restricted execution mode.
2001-08-30 14:50:20 +00:00
Fred Drake 3c0fc84b15 Update the links to the FIPS document that defines the Secure Hash
Algorithm.  This closes SF bug #454917.
2001-08-30 14:42:40 +00:00
Sjoerd Mullender 89dfe9e292 Removed unreachable return to silence SGI compiler. 2001-08-30 14:37:07 +00:00
Sjoerd Mullender 6f848c175f Removed an unreachable break statement to silence SGI compiler. 2001-08-30 14:15:38 +00:00
Sjoerd Mullender a2c2ae62df Removed unreachable goto statement to silence SGI compiler. 2001-08-30 14:06:45 +00:00
Sjoerd Mullender 2f38f81fec Removed some unreachable break statements to silence SGI compiler. 2001-08-30 14:05:20 +00:00
Sjoerd Mullender 38b88c233a Removed some unreachable break statements to silence SGI compiler. 2001-08-30 13:58:58 +00:00
Jack Jansen 34eaf86e95 Started on the 2.2a2 installer 2001-08-30 13:26:53 +00:00
Tim Peters 52e0717215 Give the internal immutable list type .extend and .pop methods (they
"should have" been added here when they were added to lists).
2001-08-30 06:15:32 +00:00
Tim Peters 692323488b Add a new function imp.lock_held(), and use it to skip test_threaded_import
when that test is doomed to deadlock.
2001-08-30 05:16:13 +00:00
Guido van Rossum c41418751f 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.
2001-08-30 04:43:35 +00:00
Guido van Rossum 31bcff8815 Make 'super' subclassable. (Not sure how useful this is yet. :-) 2001-08-30 04:37:15 +00:00