Commit Graph

26613 Commits

Author SHA1 Message Date
Andrew M. Kuchling a52b85262a [Bug #693470] 'licence' as an alias for 'license' doesn't work.
This patch makes it work again.
2003-03-03 20:07:27 +00:00
Kurt B. Kaiser b6aff15183 SF 695861
Eliminate extra blank line in shell output.  Caused by stdout not being
flushed
upon completion of subprocess' Executive.runcode() when user code ends by
outputting an unterminated line, e.g. print "test",
2003-03-03 20:06:48 +00:00
Just van Rossum 2fe07fda2d plugged leak noted by nnorwitz: the 'et' format returns allocated memory 2003-03-03 19:07:13 +00:00
Andrew M. Kuchling a2eaf31727 [Bug #69389] List register command in __all__, so setup.py --help-commands will now list it 2003-03-03 18:37:16 +00:00
Andrew M. Kuchling a9ccce3fee Improve description 2003-03-03 18:26:01 +00:00
Just van Rossum 96b1c903f5 Patch #683592 revisited, after discussions with MvL:
- Implement the behavior as specified in PEP 277, meaning os.listdir()
  will only return unicode strings if it is _called_ with a unicode
  argument.
- And then return only unicode, don't attempt to convert to ASCII.
- Don't switch on Py_FileSystemDefaultEncoding, but simply use the
  default encoding if Py_FileSystemDefaultEncoding is NULL. This means
  os.listdir() can now raise UnicodeDecodeError if the default encoding
  can't represent the directory entry. (This seems better than silcencing
  the error and fall back to a byte string.)
- Attempted to decribe the above in Doc/lib/libos.tex.
- Reworded the Misc/NEWS items to reflect the current situation.

This checkin also fixes bug #696261, which was due to os.listdir() not
using Py_FileSystemDefaultEncoding, like all file system calls are
supposed to.
2003-03-03 17:32:15 +00:00
Ken Manheimer ed6000a993 py-pdbtrack-grub-for-buffer(): Rectified some logic errors i
introduced when shifting around some code, and added some redundancy
to reduce chances of hitting the wrong source code.  (This is
experimental - it will improve the accuracy, but will reduce the
ability of the user to deliberately select the buffer they want the
buffer grubbing stuff to find.  I think the accuracy improvement will
be worth it, but am not sure, so may remove this.)
2003-03-03 17:09:44 +00:00
Jack Jansen 5125c76b68 Gave the text fields a little more space, so they don't get cut off. 2003-03-03 14:56:59 +00:00
Jack Jansen 885d4f6577 Mod to previous checkin: we must require ascii, not system defautl encoding,
because we have no easy way to convert the python encoding string to
a CF encoding parameter.
2003-03-03 13:19:44 +00:00
Jack Jansen d505cab5b3 Accept only the system default encoding when converting Python
strings to CF strings. Fixes 682215.
2003-03-03 13:12:59 +00:00
Michael W. Hudson f008998668 Fix bug
[ 555817 ] Flawed fcntl.ioctl implementation.

with my patch that allows for an array to be mutated when passed
as the buffer argument to ioctl() (details complicated by
backwards compatibility considerations -- read the docs!).
2003-03-03 12:29:42 +00:00
Jack Jansen 122152451e Don't call AEInteractWithUser unconditionally on a quit appleevent. The
EasyDIalogs methods will call it if needed.

Fixes #684975.
2003-03-03 12:28:04 +00:00
Jack Jansen 7451e3b4d5 Call AEInteractWithUser() before bringing up any of the dialogs (with the
exception of the ProgressBar, which I think is okay to show in the background).

This is a prerequisitite for the fix of #684975.
2003-03-03 12:25:02 +00:00
Martin v. Löwis 7f13489bdf Don't crash on _tkinter.createfilehandler in non-threaded Tcl;
disable this function in threaded Tcl. Likewise for creaetetimerhandler.
Fixes #692416.
2003-03-03 10:40:01 +00:00
Martin v. Löwis 4eab486476 Patch #671666: Alias ANSI code page to "mbcs". 2003-03-03 09:34:01 +00:00
Ken Manheimer ad428cd1cd Guard advancing past leading meta-comments. 2003-03-03 04:05:03 +00:00
Ken Manheimer e7aca521db Enhanced pdbtrack to provide for source code that's not findable by
the reported path.  (Eg, precompiled scripts with a file path suitable
for a different host, scripts actually running on a remote system or
with no valid path, like Zope through-the-web python scripts.)

On failing to find the code on the reported path, pdbtrack takes the
function name and looks through the buffers, from most to least
recent, seeking the first python-mode buffer that either is named for
the function or has a definition (def or class) for that function.  So
to get source tracking for code that's not located where the path
indicates, you put a copy of the script in a buffer, and pdbtrack will
find it.

Also, fixed a small bug so pdbtrack now properly presents the overlay
arrow when you run the pdb 'w'here command.
2003-03-03 00:35:32 +00:00
Jack Jansen ad5e76a8fb Use Carbon.File for FSSpec and FSRef conversion, not macfs. 2003-03-02 23:16:50 +00:00
Jack Jansen d79284843a _CG module only needs the ApplicationServices framework, not Carbon. 2003-03-02 21:31:51 +00:00
Guido van Rossum 0df6442ae5 Undo the apply() removals; this code needs to run under Python 1.5.2. 2003-03-02 20:47:29 +00:00
Guido van Rossum 206b9a779a MyComplex now works. 2003-03-02 13:53:18 +00:00
Guido van Rossum 4eadfa2b2e Fix from Greg Chapman from SF bug #695651: a complex subclass
constructor, when passed a single complex argument, returns the
argument unchanged.  This should be done only for the complex base
class; a complex subclass should of course cast the value to the
subclass in this case.

The fix also revealed a segfault in complex_getnewargs(): the argument
for the Py_BuildValue() format code "D" is the *address* of a
Py_complex struct, not the value.  (This corroborated by the API
documentation.)

I expect this needs to be backported to 2.2.3.
2003-03-02 13:51:47 +00:00
Guido van Rossum 41bcbe3050 Commit MvL's doc patch for SF bug #221327. This adds an example of
calling into Python from a C thread.
2003-03-02 13:17:20 +00:00
Tim Peters fc27375d5a test_load_from_canned_string(): Created a DATA2 string to test a canned
proto 2 pickle too.
2003-03-02 04:54:24 +00:00
Andrew M. Kuchling 563389fdee Add updates for alpha2 2003-03-02 02:31:58 +00:00
Andrew M. Kuchling 41c3e00851 Expand itertools paragraph 2003-03-02 02:13:52 +00:00
Tim Peters 6cca754c20 TestOnlySetsInBinaryOps: Simplified the non-inplace tests by using
assertRaises.  Fixed a repeated subtle bug in the inplace tests by
removing the possibilty that a self.fail() call could raise a
TypeError that the test catches by mistake.
2003-03-02 00:36:10 +00:00
Tim Peters b7bfe4bea4 Typo repairs in new code. 2003-03-02 00:31:23 +00:00
Tim Peters 44f14b0399 SF bug 693121: Set == non-Set is a TypeError.
Allow mixed-type __eq__ and __ne__ for Set objects.  This is messier than
I'd like because Set *also* implements __cmp__.  I know of one glitch now:
cmp(s, t) returns 0 now when s and t are both Sets and s == t, despite
that Set.__cmp__ unconditionally raises TypeError (and by intent).  The
rub is that __eq__ gets tried first, and the x.__eq__(y) True result
convinces Python that cmp(x, y) is 0 without even calling Set.__cmp__.
2003-03-02 00:19:49 +00:00
Tim Peters 3ba491e6b1 The doctest was printing Sets, but that's unreliable because set
elements get displayed in undefined dict order.  Use a Set subclass
instead (which arranges to sort the elements for display).
2003-03-01 23:33:34 +00:00
Neal Norwitz f421e81e41 Fix comment, mode really is used 2003-03-01 22:58:00 +00:00
Neal Norwitz 4f959d2c73 Fix SF patch #695581, "returnself" -> "return self" 2003-03-01 15:22:41 +00:00
Neal Norwitz d9efdc5b5a get_completer() takes no args 2003-03-01 15:19:41 +00:00
Guido van Rossum c9fbb72ba5 Added implementation notes for [re]set_exc_info(). 2003-03-01 03:36:33 +00:00
Guido van Rossum d6473d1ac5 Reindent the new code properly. 2003-03-01 03:25:41 +00:00
Guido van Rossum 46d3dc37e4 - New function sys.exc_clear() clears the current exception. This is
rarely needed, but can sometimes be useful to release objects
  referenced by the traceback held in sys.exc_info()[2].  (SF patch
  #693195.)  Thanks to Kevin Jacobs!
2003-03-01 03:20:41 +00:00
Raymond Hettinger d1a283be26 Several of the tools can make direct calls the inner iterators. 2003-03-01 01:48:24 +00:00
Raymond Hettinger 8049dde8d7 Removed duplicate test from inner loop.
The PyIter_Check is already performed by PyObject_GetIter.
2003-03-01 01:44:32 +00:00
Andrew M. Kuchling 6f177d434f Add news item for patch #695090 2003-02-28 22:09:33 +00:00
Andrew M. Kuchling e557f3556f [Patch #695090 from Bernhard Herzog] Allow specifying both py_modules and packages 2003-02-28 22:03:04 +00:00
Neal Norwitz 6156a2d07c Handle iconv initialization erorrs 2003-02-28 20:00:42 +00:00
Neal Norwitz 55b61d21d8 Fix SF bugs #692951 and 692988, test_timeout.py needs 'network' resource
require -u network to run test_timeout since
it fails when not connected to a network.
2003-02-28 19:57:03 +00:00
Neal Norwitz 6e2d1c7ab8 Just pointed out the code was better written with
try: # ...
        except ImportError, why:
        except: # ...
All other changes are re-indenting/formatting.
2003-02-28 17:39:42 +00:00
Neal Norwitz 2c92c6e1f4 Fix SF bug #690012 2003-02-28 17:24:00 +00:00
Neal Norwitz 3f5fcc8acc Fix SF bug #690012 (among others), iconv_codec stops build
Change setup.py to catch all exceptions.
  - Rename module if the exception was an ImportError
  - Only warn if the exception was any other error

Revert _iconv_codec to raising a RuntimeError.
2003-02-28 17:21:39 +00:00
Barry Warsaw edaa071eb4 compile_atom(): Neal's last checkin removing the setting of i broke
the build, so I'm restoring it.  I'm not sure what Neal's intent was,
since the line following the one he removed was "REQN(i, 1)" so i is
obviously used. ;)
2003-02-28 15:27:40 +00:00
Jack Jansen d5532affd8 Check modes on install and temporary directories. Fixes #693230. 2003-02-28 15:19:51 +00:00
Jack Jansen f1728713cc Removed silly print. 2003-02-28 15:18:59 +00:00
Guido van Rossum d41eea05f4 SF doc patch #692001, properties and __getattribute__. I added some
stuff, and changed 'property' to 'descriptor'.
2003-02-28 14:11:45 +00:00
Jack Jansen d00c13a9be Moved the Apple workaround for the guard define for wchar_t out of
the #ifdef HAVE_NCURSES_H: the same problem exists on OSX 10.1 with
a fink-installed curses (which uses curses.h as the include file name).
2003-02-28 12:51:18 +00:00