summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Patch 1329 (partial) by Christian Heimes.Guido van Rossum2007-10-3010-31/+63
| | | | | | | | 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.)
* Bug #1356: Avoid using the C99 keyword 'restrict'.Martin v. Löwis2007-10-291-4/+4
|
* 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-272-2/+2
| | | | ord()s in Lib/plat-mac/ic.py need to be removed.
* Get the locale and pwd tests working on the Solaris box where thereNeal Norwitz2007-10-272-4/+9
| | | | | are some unicode values used. I'm not sure if this is the correct on all operating systems, but this works on Linux w/o unicode.
* Try to get this test to pass on Win64 by making clean for ssize_tNeal Norwitz2007-10-271-4/+6
|
* Get rid of more uses of string and use unicodeNeal Norwitz2007-10-277-21/+18
|
* 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.
* Use unicode in more places. Fixes a problem with str8 + str in test.Neal Norwitz2007-10-272-7/+11
|
* Sort the method lists for str8 and bytes so differences are more apparent.Guido van Rossum2007-10-263-157/+187
| | | | | Changed bytes.fromhex to take a str argument, as the docstring promises. Added str8.fromhex (untested so far).
* Kill PyString_Encode(), which isn't used anywhere.Guido van Rossum2007-10-262-27/+8
| | | | | (We should also kill the other PyString_ encode/decode APIs, but they still have some users.)
* 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-262-3/+121
| | | | | | | 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-262-17/+26
| | | | | Move most of the messiness with truncate() on Windows into _fileio.c. Still keep the flush() call in io.py though.
* Fix some Py_ssize_t warnings on Win64 that were probably bugsNeal Norwitz2007-10-262-4/+4
|
* Try to fix some of the failing tests on Win64. PY_SSIZE_T_MAX (8 bytes)Neal Norwitz2007-10-261-1/+1
| | | | | | | is larger than what can fit into a long (4 bytes). Hopefully this will fix more problems than it creates. There are many, many compile warnings on Win64. Each of these should be investigated to determine if they are real problems or not. Many of these presumably affect the trunk too.
* Add a missing news entry about how str8's constructor signature now matches theBrett Cannon2007-10-261-0/+2
| | | | bytes type.
* 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-252-12/+48
| | | | | 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-255-255/+4
| | | | and os.tmpfile().
* Remove a test case which is no longer valid.Georg Brandl2007-10-241-1/+1
|
* Fix a refleak for `filename', introduced in rev. 58466.Georg Brandl2007-10-241-4/+0
| | | | Also remove an unnecessary incref/decref for `name'.
* Fix a broken format in a PyErr_Format() call: %lx is not supported.Guido van Rossum2007-10-241-1/+1
| | | | | | (It's still technically broken since the va_args code assumes %x is an int while we're passing a long, but that's mostly theoretical, and it's done all over the place.)
* 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-242-1/+19
| | | | Added unittest for calling a function with paramflags.
* Patch #1303: Adapt str8 constructor to bytes (now buffer) one.Georg Brandl2007-10-2415-75/+215
|
* Patch #1318 by Amaury Forgeot d'Arc.Guido van Rossum2007-10-2414-108/+106
| | | | | | | | | 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 #1314 by Christian Heimes.Guido van Rossum2007-10-231-3/+2
| | | | | Fix failing unittests for time and strptime on German and probably other localized Windows installations.
* #1316: remove redundant PyLong_Check calls when PyInt_Check was already called.Georg Brandl2007-10-237-31/+24
|
* Remove duplicate entry for PyObject_AsFileDescriptor.Georg Brandl2007-10-232-6/+7
|
* Remove redundant PyInt/PyLong checks.Georg Brandl2007-10-231-9/+2
|
* Update Pygments version from externals.Georg Brandl2007-10-231-1/+1
|
* Update w.r.t. PEP 3137.Georg Brandl2007-10-231-176/+54
|
* Patch #1071: Improve unicode.translate() so that you can pass unicodeGeorg Brandl2007-10-233-6/+52
| | | | | 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-234-17/+133
|
* Patch 1304, by Amaury Forgeot d'Arc.Guido van Rossum2007-10-223-3/+33
| | | | | Add md5module.c and sha1module.c to the project files, and in some cases bytes_methods.c and related .h files.
* Make str/str8 comparisons return True/False for !=/==.Brett Cannon2007-10-2211-205/+169
| | | | | | | | | | | | | | | 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-223-7/+9
|
* ssue 1309: fix by Christian Heimes to be able to build on Windows.Guido van Rossum2007-10-221-1/+4
|
* Fix exception indexing.Georg Brandl2007-10-221-1/+1
|
* Issue 1267, continued.Guido van Rossum2007-10-2212-63/+93
| | | | | | 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.
* Make sure the malloc'ed string has space for the null byte.Brett Cannon2007-10-211-1/+1
|
* Fix PyTokenizer_FindEncoding() for OS X 10.4. Turns out that seeking to theBrett Cannon2007-10-201-4/+11
| | | | | | | | | beginning of a file through a file pointer is not reflected when reading from a file descriptor. Using both fflush() and fpurge() does not solve it. One must use lseek() directly on the file descriptor to get the desired effect. This might suggest that we standardize on either file pointers (FILE) or file descriptors (int) for all C code used.
* Fix a memory leak caused by PyTokenizer_FindEncoding() returning a char * thatBrett Cannon2007-10-201-3/+8
| | | | was PyMem_MALLOC'ed.
* Plug a memory leak where a struct tok_state was not being freed.Brett Cannon2007-10-201-3/+11
| | | | Also tweak a comparison that was going farther than needed.
* Tweak the version *string* to clarify that this isn't your father's 3.0a1. :-)Guido van Rossum2007-10-201-1/+1
|