Commit Graph

34572 Commits

Author SHA1 Message Date
Lars Gustäbel ead70565fc Retouch my last change after a comment on style from Guido. 2007-08-13 09:05:16 +00:00
Martin v. Löwis 0f98d8f8ea Allow str8 in .write(). 2007-08-13 06:26:48 +00:00
Martin v. Löwis 98ff898c46 Expect that source strings are Unicode. 2007-08-13 06:03:15 +00:00
Martin v. Löwis e83395ee79 Make assertion error be more verbose. 2007-08-13 06:02:38 +00:00
Martin v. Löwis 163b717cd3 Fix typo. 2007-08-13 06:02:09 +00:00
Martin v. Löwis 4040fb8961 Create Unicode objects. 2007-08-13 06:01:43 +00:00
Martin v. Löwis 50fb866df8 Use Tcl_SetObjResult instead of Tcl_SetResult. 2007-08-13 05:41:41 +00:00
Neal Norwitz 88b44da944 Cleanup a little.
Use bit fields for flags to reduce memory usage.
Return booleans where they are documented.  Although a boolean for
seekable seems a bit odd when it can be unknown.  Add a comment about this.
2007-08-12 17:23:54 +00:00
Neal Norwitz ab40b30398 Add comment that should be addressed 2007-08-12 17:21:38 +00:00
Neal Norwitz cda5c068a4 Fix memory leak in an error condition 2007-08-12 17:09:36 +00:00
Neal Norwitz fca70054c5 Fix memory leak 2007-08-12 16:56:02 +00:00
Barry Warsaw 72937f3216 Compare what's read from files against proper byte literals. Neither of these
modules have unittests AFAICT, and I'm not improving things here, but these
changes make a bunch of email package tests succeed, and command line testing
against real files seems to make things better.

Added an __main__ section to imghdr.py so that it can be run from the command
line similarly to sndhdr.py.  Someone else can figure out a better -m way of
doing this.

In sndhdr.py do a couple of very minor cleanups, and use a with statement to
not wait for gc to close the file.
2007-08-12 14:37:20 +00:00
Skip Montanaro 46fc337395 PyErr_Warn is deprecated in 2.5 - goes away for 3.0 2007-08-12 11:44:53 +00:00
Neal Norwitz 447e7c3981 Fix memory leak 2007-08-12 07:11:25 +00:00
Martin v. Löwis 646049ec30 Don't try to convert str to Unicode anymore. 2007-08-12 07:06:14 +00:00
Neal Norwitz 9b2a26989d Get pystone working with lazy map. 2007-08-12 07:02:50 +00:00
Neal Norwitz aea70e03c4 Fix the refleak in strftime when converting a %Z with a user defined tzinfo.
I inverted some of the conditionals to reduce indent levels.  Hopefully
this makes it a little easier to read.

This code caused the leak:

    class FixedOffset(datetime.tzinfo):
        def tzname(self, dt): return "UTC"

    datetime.time(12, 47, tzinfo=FixedOffset()).strftime('%Z')

This code is very tricky and I'm not positive it works.  However,
it neither crashes nor leaks.
2007-08-12 04:32:26 +00:00
Kurt B. Kaiser cbbe98f04f 1. Catch TypeError exception when writing to OutputWindow
2. PyShell: shell isn't working due to encoding issues.  Temporarily direct
   exceptions to the terminal.  Also, trap exceptions occurring during write()
   instead of passing.

Checking (2)  in temporarily to aid finding the encoding problem in
IOBinding.py
2007-08-12 01:52:35 +00:00
Neal Norwitz 801c89be5d Add -s/--start option that makes it easier to run the tests in batches
when one test fails and you want to start running from that point onwards.
2007-08-12 01:31:40 +00:00
Neal Norwitz dcb46eda32 Remove docs for builtin file.
Move docs for: long -> int, unichr -> chr, unicode -> str.
2007-08-12 01:12:18 +00:00
Neal Norwitz 016880229a Kill execfile(), use exec() instead 2007-08-12 00:43:29 +00:00
Neal Norwitz 41eaedd361 Fix refleaks from execfile('file that contains a # coding: line')
Also simplify logic a bit in fp_setreadl.
2007-08-12 00:03:22 +00:00
Neal Norwitz bb217d9ed8 Make sure to flush output when writing dots during -R runs 2007-08-12 00:00:44 +00:00
Martin v. Löwis 2614e1dc63 Remove obsolete ifdef. 2007-08-11 21:58:46 +00:00
Neal Norwitz f7f28fc46b Fix problem when exec'ing a string with a coding 2007-08-11 21:31:25 +00:00
Martin v. Löwis 7ac971243b Change module to produce and consume bytes. 2007-08-11 19:28:53 +00:00
Neal Norwitz 03fc7799b0 Remove unnecessary import 2007-08-11 19:27:13 +00:00
Neal Norwitz 1e50a9f7cc Fix test_wsgiref that used StringIO and a BufferedReader rather than
real files.  This code assumed that fileno() would succeed which wasn't
the case.
2007-08-11 18:37:05 +00:00
Guido van Rossum 9264ecd799 Quick fix for a new problem here -- using string.lowercase somehow caused
problems.
2007-08-11 16:40:13 +00:00
Georg Brandl 0eaa940638 Fix automatic replacing mistake. 2007-08-11 15:39:18 +00:00
Martin v. Löwis d78d3b4541 Fall back to ascii if the locale module cannot be loaded. 2007-08-11 15:36:45 +00:00
Guido van Rossum 10f07c41e6 A few sqlite files were still using RO instead of READONLY. 2007-08-11 15:32:55 +00:00
Martin v. Löwis a291c8fed2 Fix reference leak. 2007-08-11 14:25:27 +00:00
Martin v. Löwis d1cd4d4176 Set sys.stdout.encoding properly.
Always set LC_CTYPE on interpreter startup.
Add device_encoding function.
2007-08-11 14:02:14 +00:00
Martin v. Löwis 79c320898d Change shelve to require a bytes-oriented dict as
the underlying storage, and yet provide string keys.
2007-08-11 06:57:14 +00:00
Neal Norwitz 8dfc4a9bac Remove support for __members__ and __methods__. There still might be
some cleanup to do on this.  Particularly in Python/traceback.c with
getting rid of the getattr if possible and Demo/*metaclasses/Enum.py.
2007-08-11 06:39:53 +00:00
Martin v. Löwis 32ca442b13 Fix test_bsddb3. 2007-08-11 06:13:20 +00:00
Neal Norwitz 2cde0eb922 Fix refleaks 2007-08-11 04:58:43 +00:00
Neal Norwitz 9edcc2e2fd Handle error 2007-08-11 04:58:26 +00:00
Kurt B. Kaiser 7378df7822 Fix what appears to be a very old bug. Tkinter in struni is more intolerant
of non-existant text widget 'marks', it seems.
2007-08-11 04:20:51 +00:00
Guido van Rossum efdca3e071 Use an event variable to wait for the server to be ready, rather than sleep(0.1). 2007-08-10 21:28:41 +00:00
Kurt B. Kaiser 6ae6ba09ea Remove the None tag from tagdefs dict for now, appears inoperative and
causes a _tkinter error in py3k.
2007-08-10 19:45:35 +00:00
Guido van Rossum e9fb515d46 Fix refcount bug in make_Zreplacement(). 2007-08-10 19:26:04 +00:00
Jeremy Hylton e6b59c5550 Make sure the mock object passed to finish_request() is buffered. 2007-08-10 19:13:33 +00:00
Jeremy Hylton 7ffe2998cd Allow rfc822 to process headers from an incoming HTTP request. 2007-08-10 18:49:32 +00:00
Jeremy Hylton 4b878bd3d5 Style 2007-08-10 18:49:01 +00:00
Guido van Rossum 6e69f7faa3 Fix a bit of code that wasn't converted properly, causing a segfault. 2007-08-10 18:35:04 +00:00
Gerhard Häring 6d21456137 Make the sqlite tests pass. 2007-08-10 18:15:11 +00:00
Guido van Rossum bd4a63e091 A small tweak to avoid calling traceback.format_exception_only() with
a bogus (tuple) value.  This should fix the "make install" issue Neal
reported.
2007-08-10 17:36:34 +00:00
Lars Gustäbel 5590d8cc8a RFC 1952 requires the FNAME field to be Latin-1. Do not include
filenames that cannot be represented that way.
2007-08-10 12:02:32 +00:00