Brett Cannon
d5ec98c7fb
Plug a memory leak where a struct tok_state was not being freed.
...
Also tweak a comparison that was going farther than needed.
2007-10-20 02:54:14 +00:00
Guido van Rossum
6643cb2a7a
Tweak the version *string* to clarify that this isn't your father's 3.0a1. :-)
2007-10-20 00:05:19 +00:00
Guido van Rossum
ce3a72aec6
Patch 1267 by Christian Heimes.
...
Move the initialization of sys.std{in,out,err} and __builtin__.open
to C code.
This solves the problem that "python -S" wouldn't work.
2007-10-19 23:16:50 +00:00
Guido van Rossum
75a902db78
Patch 1280, by Alexandre Vassalotti.
...
Make PyString's indexing and iteration return integers.
(I changed a few of Alexandre's decisions -- GvR.)
2007-10-19 22:06:24 +00:00
Guido van Rossum
21431e85d5
This is the uncontroversial half of patch 1263 by Thomas Lee:
...
changes to codecs.c and structmember.c to use PyUnicode instead of
PyString.
2007-10-19 21:48:41 +00:00
Gregory P. Smith
630e46424a
Merge 58539: squelch the warning that this test is intended to raise.
2007-10-19 07:34:48 +00:00
Gregory P. Smith
66077d8e61
Merge 58532, 58533, 58534: bsddb.dbtables bug fixes - don't allow null bytes
...
in random rowid strings, pass txn using a keyword where possible.
2007-10-18 16:55:12 +00:00
Guido van Rossum
3172c5d263
Patch# 1258 by Christian Heimes: kill basestring.
...
I like this because it makes the code shorter! :-)
2007-10-16 18:12:55 +00:00
Gregory P. Smith
60d241f135
For PEP3137: Adds missing methods to the mutable PyBytes object (soon
...
to be called a buffer). Shares code with stringobject when possible.
Adds unit tests with common code that should be usable to test the PEPs
mutable buffer() and immutable bytes() types.
http://bugs.python.org/issue1261
2007-10-16 06:31:30 +00:00
Alexandre Vassalotti
3d2fd7f923
Fix a small typo in the comment of unicode_default_encoding[].
2007-10-16 00:26:33 +00:00
Brett Cannon
7648ba83f2
Make the docstring for io.open() a raw string so that the explanation for the
...
'newline' argument is not a jumbled mess of newlines.
2007-10-15 20:52:41 +00:00
Neal Norwitz
e20ad358fd
Move decl so it compiles with C89.
2007-10-15 16:08:26 +00:00
Guido van Rossum
8d2ef875ec
Update what the locale module documents about string operations.
2007-10-15 15:42:31 +00:00
Guido van Rossum
00bc0e0a2d
Patch #1272 , by Christian Heimes and Alexandre Vassalotti.
...
Changes to make __file__ a proper Unicode object, using the default
filesystem encoding.
This is a bit tricky because the default filesystem encoding isn't
set by the time we import the first modules; at that point we fudge
things a bit. This is okay since __file__ isn't really used much
except for error reporting.
Tested on OSX and Linux only so far.
2007-10-15 02:52:41 +00:00
Kurt B. Kaiser
cdadf242ba
Finish bug fix applied at 58398. I missed a piece, Tal Einat found the error.
2007-10-15 02:40:08 +00:00
Guido van Rossum
d4ee167b83
Fix yet another stray 2.x-ism (maybe merged?).
2007-10-15 01:27:53 +00:00
Guido van Rossum
3b7210d336
Make it possible to run this test stand-alone.
2007-10-15 00:25:56 +00:00
Guido van Rossum
7c4c6c5d8a
Fix typo: formats -> format. (Only mattered in wide unicode builds.)
2007-10-14 20:46:15 +00:00
Neal Norwitz
6c91378011
Fix some more memory leaks (in error conditions) introduced in r58455.
...
Also fix some indentation.
2007-10-14 03:23:09 +00:00
Alexandre Vassalotti
4167ebcfee
Fix the memory leak introduced in r58455. The buffer reference
...
returned by 'et' need to be freed after usage.
2007-10-14 02:54:41 +00:00
Alexandre Vassalotti
70a237179f
Remove the buffer API from PyUnicode as specified by PEP 3137. Also,
...
fix the error message of the 't' format unit, in getargs.c, so that it
asks for bytes, instead of string.
2007-10-14 02:05:51 +00:00
Gregory P. Smith
659e7f44e2
Merge 58450: fix uncollectable reference caused by bsddb.db.DBShelf.append
...
Adds a DBShelf __repr__ method to not raise an exception when the DB is closed.
2007-10-13 23:23:58 +00:00
Travis E. Oliphant
ddacf96868
Eliminate use of PyBUF_CHARACTER flag which is no longer part of the buffer interface. Fix up array module to export the correct format for wide-builds.
2007-10-13 21:03:27 +00:00
Guido van Rossum
d417a154e4
Fix typo in arraymodule.c (?) -- it's PyBUF_LOCK, not PyBUF_LOCKDATA.
2007-10-13 21:01:08 +00:00
Neal Norwitz
c05d384bf7
Remove more hotshot cruft.
2007-10-13 18:56:00 +00:00
Travis E. Oliphant
fe9bed02e4
Fix problems with memoryview object. There is still more to do to finish PEP 3118. The memory-view object needs to be fleshed out and the struct module needs to be modified.
2007-10-12 23:27:53 +00:00
Travis E. Oliphant
9b30784ab2
Add macros for checking for long double and defining the size of long double on the platform. Ctypes and Struct module will both need them.
2007-10-12 22:06:37 +00:00
Travis E. Oliphant
d5c0add332
Fix Issue 1268 with the array module by backing-out the 'w' addition. All builds will continue to use 'u' for unicode.
2007-10-12 22:05:15 +00:00
Brett Cannon
e9fd23165c
Make _load_testfile() use its encoding argument when __loader__ is defined.
2007-10-12 19:18:19 +00:00
Gregory P. Smith
5c5f1703e5
Merge r58434:
...
Fixes http://bugs.python.org/issue1233 - bsddb.dbshelve.DBShelf.append
was useless due to inverted logic. Also adds a test case for RECNO dbs
to test_dbshelve.
2007-10-12 19:13:19 +00:00
Brett Cannon
041683df42
Remove self-referential import.
2007-10-11 23:08:53 +00:00
Fred Drake
f12088b9b3
clean out some hotshot-related build turds
2007-10-11 18:05:38 +00:00
Fred Drake
0e474a801a
remove hotshot profiler from Py3k
2007-10-11 18:01:43 +00:00
Guido van Rossum
b62e8a8062
Two changes that are definitely problem-free and avoid calling print()
...
with a bytes instance (as this will soon print something differently).
2007-10-10 22:48:24 +00:00
Guido van Rossum
c5724deb1a
get rid of some more PyString uses.
...
Only the filename is still a PyString now.
(We'll need to deal with the default filesystem encoding to do it right.)
2007-10-10 21:38:59 +00:00
Guido van Rossum
ebe8f8a8ff
Minor cleanup of the comment for PyErr_ProgramText() and a tweak to the code
...
to guarantee the claim that it doesn't set an exception.
2007-10-10 18:53:36 +00:00
Guido van Rossum
df4ce10276
Fix another stray PyString reference that should be PyBytes; and its comment.
2007-10-10 18:49:50 +00:00
Guido van Rossum
641591cffe
Fix an issue in PyTokenizer_RestoreEncoding() which was treating a PyBytes
...
object with PyString calls and not checking errors. This caused the display
of syntax errors to be deformed.
2007-10-10 18:44:39 +00:00
Guido van Rossum
feea0786a2
Random changes having to do with readline() and bytes.
2007-10-10 18:00:50 +00:00
Kurt B. Kaiser
8d5c8b525e
the default class attr is needed!
2007-10-10 00:36:38 +00:00
Guido van Rossum
49f21743be
Don't depend on str8.splitlines() in test_chunkcoding().
2007-10-10 00:12:46 +00:00
Kurt B. Kaiser
3e623ba3ec
Windows EOL sequence not converted correctly, encoding error.
...
Caused file save to fail. Bug 1130.
M idlelib/IOBinding.py
M idlelib/NEWS.txt
2007-10-09 23:12:31 +00:00
Guido van Rossum
e518bf3c49
PyFile_WriteObject() should use PyObject_Repr(), not _ReprStr8().
2007-10-09 21:55:58 +00:00
Gregory P. Smith
762d4a4164
use a reliable host
2007-10-09 18:35:13 +00:00
Guido van Rossum
174ce20865
Silly script I'd rather not throw away.
2007-10-09 17:30:03 +00:00
Guido van Rossum
1e35e76532
Patch #1049 by Thomas Lee.
...
Changes comparisons between PyBytes and PyUnicode to return unequal
instead of raising TypeError.
2007-10-09 17:21:10 +00:00
Guido van Rossum
6ccd3f2dbc
Replace all (locale-dependent) uses of isupper(), tolower(), etc., by
...
locally-defined macros that assume ASCII and only consider ASCII letters.
2007-10-09 03:46:30 +00:00
Brett Cannon
6733d701f1
Change the default encoding for ftplib.FTP to latin1 so that bytes can be in
...
the range of 255 instead of only 128.
2007-10-08 19:48:15 +00:00
Georg Brandl
9f2c39a775
#1228 : new comparison behavior.
2007-10-08 14:08:36 +00:00
Georg Brandl
9f27df56f8
Remove buffer() from the docs.
2007-10-08 07:00:29 +00:00