summaryrefslogtreecommitdiffstats
path: root/Lib
Commit message (Collapse)AuthorAgeFilesLines
* Added unit test for bug http://bugs.python.org/issue1293Christian Heimes2007-11-011-1/+11
|
* Fixed unit tests for os.environ. Some of the tests didn't test at all ↵Christian Heimes2007-11-012-8/+48
| | | | | | because os.environ was empty. Added import test for sys.path entries with non ASCII characters. The tests are passing on my Ubuntu box with utf-8 locales but they aren't passing on Windows XP.
* Oh, I missed the output part of the test ...Christian Heimes2007-10-311-2/+2
|
* Fixed test_dumbdbmChristian Heimes2007-10-311-2/+5
| | | | The test failed on Windows. I hope the change follows the spirit of the test. On Unix it checks if dumbdbm can handle Windows line separators and on Windows it tests with Unix line separators.
* Fixed gettext module for Windows. The metadata lines always end in \n and ↵Christian Heimes2007-10-312-1/+2
| | | | not in os.linesep
* make sure to write bytes instead of strings to underlying socket channelBill Janssen2007-10-301-6/+6
|
* remove ord() calls on what are now integers rather than charactersBill Janssen2007-10-301-7/+7
|
* Fix typo.Georg Brandl2007-10-301-1/+1
|
* Patch 1329 (partial) by Christian Heimes.Guido van Rossum2007-10-303-10/+20
| | | | | | | | Add a closefd flag to open() which can be set to False to prevent closing the file descriptor when close() is called or when the object is destroyed. Useful to ensure that sys.std{in,out,err} keep their file descriptors open when Python is uninitialized. (This was always a feature in 2.x, it just wasn't implemented in 3.0 yet.)
* Patch 1341 by Amaury Forgeot d'Arc.Guido van Rossum2007-10-291-3/+5
| | | | | | This patch corrects test_fileinput on Windows: when redirecting stdout, os.open should be given O_BINARY, because the file descriptor is then wrapped in a text-mode file; os.fdopen(fd, "w").
* fix typoFred Drake2007-10-291-1/+1
|
* Issue 1340 by Amaury Forgeot d'Arc (with help from Christian Heimes,Guido van Rossum2007-10-291-1/+4
| | | | | | and my own interpretation). Don't pass the newline= flag to StringIO in SpooledTemporaryFile. This avoids doubling newlines when the file is rolled over.
* URLError now takes only a single parameter. This was causingNeal Norwitz2007-10-271-2/+2
| | | | errors in test_urllib2net on the MIPS buildbot.
* Get a bunch of tests working on Mac OS. I suspect that a bunch of theNeal Norwitz2007-10-271-1/+1
| | | | ord()s in Lib/plat-mac/ic.py need to be removed.
* Get test_email to pass. There is a problem reading the data file andNeal Norwitz2007-10-271-1/+1
| | | | | | | making it unicode with the default encoding. I'm not sure if this is a problem in and of itself. However, the test seems to be testing something different, so at least get that working. Need to revisit the unicode problem.
* Sort the method lists for str8 and bytes so differences are more apparent.Guido van Rossum2007-10-261-12/+10
| | | | | Changed bytes.fromhex to take a str argument, as the docstring promises. Added str8.fromhex (untested so far).
* Delete test_str.py. There's not much there I care about, and it is confusedGuido van Rossum2007-10-261-66/+0
| | | | | about whether it's testing str8 or str... The stuff that matters is already tested in test_unicode.py anyway.
* Patch 1335 by Christian Heimes.Guido van Rossum2007-10-261-2/+0
| | | | | | | Add a bytes iterator (copied from stringobject.c and reindented :-). I (Guido) added a small change to _abcoll.py to remove the registration of bytes as a virtual subtype of Iterator -- the presence of __iter__ will handle that now.
* Patch 1330 by Christian Heimes (with some TLC applied by myself).Guido van Rossum2007-10-261-14/+4
| | | | | Move most of the messiness with truncate() on Windows into _fileio.c. Still keep the flush() call in io.py though.
* Patch # 1331 by Christian Heimes.Guido van Rossum2007-10-267-15/+25
| | | | | The patch fixes some of the problems on Windows. It doesn't introduce addition problems on Linux.
* Patch # 1302 by Christian Heimes (with some love from me :-).Guido van Rossum2007-10-251-0/+9
| | | | | The patch fixes the output for profile and cProfile. Another patch from Alexandre and me added additional calls to the UTF-8 codec.
* Patch # 1323 by Amaury Forgeot d'Arc.Guido van Rossum2007-10-252-9/+23
| | | | | | This patch corrects a problem in test_file.py on Windows: f.truncate() seeks to the truncation point, but does not empty the buffers. In the test, f.tell() returns -1...
* Patch 1318 by Christian Heimes: remove os.tmpnam(), os.tempnam(),Guido van Rossum2007-10-252-86/+1
| | | | and os.tmpfile().
* Remove a test case which is no longer valid.Georg Brandl2007-10-241-1/+1
|
* Make test_locale pass by removing tests that were designed to handleGuido van Rossum2007-10-241-39/+0
| | | | issues with <ctype.h> on various platforms. We no longer use <ctype.h>.
* A 'PyObject *' parameter in PyErr_Format must use %S parameter, not %s.Thomas Heller2007-10-241-0/+18
| | | | Added unittest for calling a function with paramflags.
* Patch #1303: Adapt str8 constructor to bytes (now buffer) one.Georg Brandl2007-10-2414-70/+75
|
* Patch #1318 by Amaury Forgeot d'Arc.Guido van Rossum2007-10-2410-56/+58
| | | | | | | | | Updates to ctypes for python 3.0 to make the tests pass. Notable changes are: - return bytes instead of str8 - integers in range(256) are accepted as "one char string": libc.strchr("abcdef", 98) is now valid. - directly use the wide-char version of the win32 function LoadLibrary.
* Patch #1071: Improve unicode.translate() so that you can pass unicodeGeorg Brandl2007-10-231-1/+3
| | | | | characters as mapping keys and invalid mapping keys are recognized and raise an error.
* #1061 (mainly by Thomas Wouters): use weak sets for abc caches.Georg Brandl2007-10-232-4/+110
|
* Make str/str8 comparisons return True/False for !=/==.Brett Cannon2007-10-228-193/+161
| | | | | | | | | | | | | | | Code that has been returning str8 becomes much more apparent thanks to this (e.g., struct module returning str8 for all string-related formats or sqlite3 passing in str8 instances when converting objects that had a __conform__ method). One also has to watch out in C code when making a key from char * using PyString in the C code but a str instance in Python code as that will not longer compare equal. Once str8 gains a constructor like the current bytes type then test_modulefinder needs a cleanup as the fix is a little messy in that file. Thanks goes to Thomas Lee for writing the patch for the change giving an initial run-down of why most of the tests were failing.
* In followup to #1310: Remove more exception indexing.Georg Brandl2007-10-222-6/+7
|
* Fix exception indexing.Georg Brandl2007-10-221-1/+1
|
* Issue 1267, continued.Guido van Rossum2007-10-221-0/+17
| | | | | | Additional patch by Christian Heimes to deal more cleanly with the FILE* vs file-descriptor issues. I cleaned up his code a bit, and moved the lseek() call into import.c.
* Patch 1267 by Christian Heimes.Guido van Rossum2007-10-193-18/+19
| | | | | | 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.
* Patch 1280, by Alexandre Vassalotti.Guido van Rossum2007-10-198-25/+34
| | | | | Make PyString's indexing and iteration return integers. (I changed a few of Alexandre's decisions -- GvR.)
* Merge 58539: squelch the warning that this test is intended to raise.Gregory P. Smith2007-10-191-2/+7
|
* Merge 58532, 58533, 58534: bsddb.dbtables bug fixes - don't allow null bytesGregory P. Smith2007-10-181-13/+14
| | | | in random rowid strings, pass txn using a keyword where possible.
* Patch# 1258 by Christian Heimes: kill basestring.Guido van Rossum2007-10-1672-155/+158
| | | | I like this because it makes the code shorter! :-)
* For PEP3137: Adds missing methods to the mutable PyBytes object (soonGregory P. Smith2007-10-162-10/+244
| | | | | | | | 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
* Make the docstring for io.open() a raw string so that the explanation for theBrett Cannon2007-10-151-1/+1
| | | | 'newline' argument is not a jumbled mess of newlines.
* Finish bug fix applied at 58398. I missed a piece, Tal Einat found the error.Kurt B. Kaiser2007-10-151-1/+1
|
* Fix yet another stray 2.x-ism (maybe merged?).Guido van Rossum2007-10-151-2/+1
|
* Make it possible to run this test stand-alone.Guido van Rossum2007-10-151-0/+3
|
* Merge 58450: fix uncollectable reference caused by bsddb.db.DBShelf.appendGregory P. Smith2007-10-131-2/+19
| | | | Adds a DBShelf __repr__ method to not raise an exception when the DB is closed.
* Make _load_testfile() use its encoding argument when __loader__ is defined.Brett Cannon2007-10-121-1/+2
|
* Merge r58434:Gregory P. Smith2007-10-122-23/+79
| | | | | | 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.
* Remove self-referential import.Brett Cannon2007-10-111-2/+1
|
* remove hotshot profiler from Py3kFred Drake2007-10-115-524/+0
|
* Two changes that are definitely problem-free and avoid calling print()Guido van Rossum2007-10-102-6/+4
| | | | with a bytes instance (as this will soon print something differently).