Guido van Rossum
5424df2f7e
Patch suggested Paul Colomiets fixes test_threaded_import.py.
2007-08-13 19:06:38 +00:00
Guido van Rossum
fc9ba9318f
Don't mess with string.letters any more. It is most likely going to disappear.
...
Even if it isn't, it shouldn't be changed based on the locale setting IMO.
(Incidentally, this makes test_csv.py pass again on my box.)
2007-08-13 18:43:36 +00:00
Guido van Rossum
c934128162
Improved patches for sndhdr and imghdr by Victor Stinner, who writes:
...
- fix "h[sbseek] == b'\1'" and "ratecode = ord(h[sbseek+4])" in test_voc()
- avoid division by zero
- use startswith method: replace h[:2] == b'BM' by h.startswith(b'BM')
- use aifc.open() instead of old aifc.openfp()
- use ord(b'P') instead of ord('P')
2007-08-13 17:50:00 +00:00
Guido van Rossum
4c269c5928
Fix two obvious 2.xisms.
2007-08-13 17:39:20 +00:00
Martin v. Löwis
4d9ed9fc33
Enable basic load/store again.
2007-08-13 13:30:04 +00:00
Hye-Shik Chang
caf871ad32
Fix a failing test on FreeBSD: ttys are seekable in FreeBSD, too.
2007-08-13 13:21:33 +00:00
Hye-Shik Chang
49d90bc9ef
Fix a test failure on non-UTF-8 locales: bad_coding2.py is encoded
...
in utf-8.
2007-08-13 13:11:39 +00:00
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