| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
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.
|
|
|
|
| |
not in os.linesep
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
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.)
|
|
|
|
|
|
| |
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").
|
| |
|
|
|
|
|
|
| |
and my own interpretation).
Don't pass the newline= flag to StringIO in SpooledTemporaryFile.
This avoids doubling newlines when the file is rolled over.
|
|
|
|
| |
errors in test_urllib2net on the MIPS buildbot.
|
|
|
|
| |
ord()s in Lib/plat-mac/ic.py need to be removed.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Changed bytes.fromhex to take a str argument, as the docstring promises.
Added str8.fromhex (untested so far).
|
|
|
|
|
| |
about whether it's testing str8 or str... The stuff that matters is already
tested in test_unicode.py anyway.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Move most of the messiness with truncate() on Windows into _fileio.c.
Still keep the flush() call in io.py though.
|
|
|
|
|
| |
The patch fixes some of the problems on Windows. It doesn't introduce
addition problems on Linux.
|
|
|
|
|
| |
The patch fixes the output for profile and cProfile. Another patch from
Alexandre and me added additional calls to the UTF-8 codec.
|
|
|
|
|
|
| |
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...
|
|
|
|
| |
and os.tmpfile().
|
| |
|
|
|
|
| |
issues with <ctype.h> on various platforms. We no longer use <ctype.h>.
|
|
|
|
| |
Added unittest for calling a function with paramflags.
|
| |
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
characters as mapping keys and invalid mapping keys are recognized
and raise an error.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Make PyString's indexing and iteration return integers.
(I changed a few of Alexandre's decisions -- GvR.)
|
| |
|
|
|
|
| |
in random rowid strings, pass txn using a keyword where possible.
|
|
|
|
| |
I like this because it makes the code shorter! :-)
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
'newline' argument is not a jumbled mess of newlines.
|
| |
|
| |
|
| |
|
|
|
|
| |
Adds a DBShelf __repr__ method to not raise an exception when the DB is closed.
|
| |
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
| |
with a bytes instance (as this will soon print something differently).
|