summaryrefslogtreecommitdiffstats
path: root/Objects
Commit message (Collapse)AuthorAgeFilesLines
* I finally got the time to update and merge Mark's and my trunk-math branch. ↵Christian Heimes2008-04-185-729/+167
| | | | | | The patch is collaborated work of Mark Dickinson and me. It was mostly done a few months ago. The patch fixes a lot of loose ends and edge cases related to operations with NaN, INF, very small values and complex math. The patch also adds acosh, asinh, atanh, log1p and copysign to all platforms. Finally it fixes differences between platforms like different results or exceptions for edge cases. Have fun :)
* Fix for possible signed overflow: the behaviour of -LONG_MIN isMark Dickinson2008-04-151-6/+19
| | | | undefined in ANSI C.
* Prevent namespace pollution, add static for internal functionsNeal Norwitz2008-04-152-5/+5
|
* Backport manually r62342 from the py3k branch to the trunk.Alexandre Vassalotti2008-04-141-17/+23
|
* get rid of assert (size >= 0) now that an explicit if (size < 0) is in the code.Gregory P. Smith2008-04-103-3/+0
|
* Raise SystemError when size < 0 is passed into PyString_FromStringAndSize,Gregory P. Smith2008-04-093-0/+18
| | | | PyBytes_FromStringAndSize or PyUnicode_FromStringAndSize. [issue2587]
* Bug #2388: Fix gcc warnings when compiling with --enable-unicode=ucs4.Martin v. Löwis2008-04-073-6/+25
|
* Make file objects as thread safe as the underlying libc FILE* implementation.Gregory P. Smith2008-04-061-81/+164
| | | | | | | | | | | close() will now raise an IOError if any operations on the file object are currently in progress in other threads. Most code was written by Antoine Pitrou (pitrou). Additional testing, documentation and test suite cleanup done by me (gregory.p.smith). Fixes issue 815646 and 595601 (as well as many other bugs and references to this problem dating back to the dawn of Python).
* Fix compiler warning about finite() missing on Solaris.Neal Norwitz2008-03-282-0/+8
|
* Revert r61969 which added casts to Py_CHARMASK to avoid compiler warnings.Neal Norwitz2008-03-282-7/+7
| | | | | | Rather than sprinkle casts throughout the code, change Py_CHARMASK to always cast it's result to an unsigned char. This should ensure we do the right thing when accessing an array with the result.
* Pluralss only need one s, not 2 (intss -> ints)Neal Norwitz2008-03-272-2/+2
|
* Fix warnings about using char as an array subscript. This is not portableNeal Norwitz2008-03-272-7/+7
| | | | since char is signed on some platforms and unsigned on others.
* Fix memory leaksNeal Norwitz2008-03-271-2/+6
|
* Fix bytes so it works on 64-bit platforms.Neal Norwitz2008-03-271-14/+5
| | | | (Also remove some #if 0 code that is already handled in _getbytevalue.)
* Merged revisions ↵Christian Heimes2008-03-269-2/+4489
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 61750,61752,61754,61756,61760,61763,61768,61772,61775,61805,61809,61812,61819,61917,61920,61930,61933-61934 via svnmerge from svn+ssh://pythondev@svn.python.org/python/branches/trunk-bytearray ........ r61750 | christian.heimes | 2008-03-22 20:47:44 +0100 (Sat, 22 Mar 2008) | 1 line Copied files from py3k w/o modifications ........ r61752 | christian.heimes | 2008-03-22 20:53:20 +0100 (Sat, 22 Mar 2008) | 7 lines Take One * Added initialization code, warnings, flags etc. to the appropriate places * Added new buffer interface to string type * Modified tests * Modified Makefile.pre.in to compile the new files * Added bytesobject.c to Python.h ........ r61754 | christian.heimes | 2008-03-22 21:22:19 +0100 (Sat, 22 Mar 2008) | 2 lines Disabled bytearray.extend for now since it causes an infinite recursion Fixed serveral unit tests ........ r61756 | christian.heimes | 2008-03-22 21:43:38 +0100 (Sat, 22 Mar 2008) | 5 lines Added PyBytes support to several places: str + bytearray ord(bytearray) bytearray(str, encoding) ........ r61760 | christian.heimes | 2008-03-22 21:56:32 +0100 (Sat, 22 Mar 2008) | 1 line Fixed more unit tests related to type('') is not unicode ........ r61763 | christian.heimes | 2008-03-22 22:20:28 +0100 (Sat, 22 Mar 2008) | 2 lines Fixed more unit tests Fixed bytearray.extend ........ r61768 | christian.heimes | 2008-03-22 22:40:50 +0100 (Sat, 22 Mar 2008) | 1 line Implemented old buffer interface for bytearray ........ r61772 | christian.heimes | 2008-03-22 23:24:52 +0100 (Sat, 22 Mar 2008) | 1 line Added backport of the io module ........ r61775 | christian.heimes | 2008-03-23 03:50:49 +0100 (Sun, 23 Mar 2008) | 1 line Fix str assignement to bytearray. Assignment of a str of size 1 is interpreted as a single byte ........ r61805 | christian.heimes | 2008-03-23 19:33:48 +0100 (Sun, 23 Mar 2008) | 3 lines Fixed more tests Fixed bytearray() comparsion with unicode() Fixed iterator assignment of bytearray ........ r61809 | christian.heimes | 2008-03-23 21:02:21 +0100 (Sun, 23 Mar 2008) | 2 lines str(bytesarray()) now returns the bytes and not the representation of the bytearray object Enabled and fixed more unit tests ........ r61812 | christian.heimes | 2008-03-23 21:53:08 +0100 (Sun, 23 Mar 2008) | 3 lines Clear error PyNumber_AsSsize_t() fails Use CHARMASK for ob_svall access disabled a test with memoryview again ........ r61819 | christian.heimes | 2008-03-23 23:05:57 +0100 (Sun, 23 Mar 2008) | 1 line Untested updates to the PCBuild directory ........ r61917 | christian.heimes | 2008-03-26 00:57:06 +0100 (Wed, 26 Mar 2008) | 1 line The type system of Python 2.6 has subtle differences to 3.0's. I've removed the Py_TPFLAGS_BASETYPE flags from bytearray for now. bytearray can't be subclasses until the issues with bytearray subclasses are fixed. ........ r61920 | christian.heimes | 2008-03-26 01:44:08 +0100 (Wed, 26 Mar 2008) | 2 lines Disabled last failing test I don't understand what the test is testing and how it suppose to work. Ka-Ping, please check it out. ........ r61930 | christian.heimes | 2008-03-26 12:46:18 +0100 (Wed, 26 Mar 2008) | 1 line Re-enabled bytes warning code ........ r61933 | christian.heimes | 2008-03-26 13:20:46 +0100 (Wed, 26 Mar 2008) | 1 line Fixed a bug in the new buffer protocol. The buffer slots weren't copied into a subclass. ........ r61934 | christian.heimes | 2008-03-26 13:25:09 +0100 (Wed, 26 Mar 2008) | 1 line Re-enabled bytearray subclassing - all tests are passing. ........
* Move declarations to block start.Georg Brandl2008-03-251-4/+4
|
* Fix tabs.Georg Brandl2008-03-252-2/+2
|
* Make Py3k warnings consistent w.r.t. punctuation; also respect theGeorg Brandl2008-03-259-33/+42
| | | | EOL 80 limit and supply more alternatives in warning messages.
* #2355: py3k warning for buffer().Georg Brandl2008-03-251-0/+5
|
* Try to fix a bunch of compiler warnings on Win64.Neal Norwitz2008-03-251-1/+1
|
* Issue2469: Correct a typo I introduced at r61793: compilation error with ↵Amaury Forgeot d'Arc2008-03-241-1/+1
| | | | | | UCS4 builds. All buildbots compile with UCS2...
* #1477: ur'\U0010FFFF' raised in narrow unicode builds.Amaury Forgeot d'Arc2008-03-231-4/+42
| | | | | Corrected the raw-unicode-escape codec to use UTF-16 surrogates in this case, just like the unicode-escape codec.
* Remove compiler warnings (on Alpha at least) about using chars asNeal Norwitz2008-03-231-4/+4
| | | | | array subscripts. Using chars are dangerous b/c they are signed on some platforms and unsigned on others.
* #2348: add py3k warning for file.softspace.Georg Brandl2008-03-211-2/+34
|
* #2346/#2347: add py3k warning for __methods__ and __members__. Patch by Jack ↵Georg Brandl2008-03-212-1/+18
| | | | Diederich.
* Remove unnecessary traceback save/restore pair.Raymond Hettinger2008-03-191-4/+2
|
* Issue 2354: Fix-up compare warning. Patch contributed by Jeff Balogh.Raymond Hettinger2008-03-191-1/+1
|
* Fix compiler warning.Raymond Hettinger2008-03-191-1/+1
|
* Issue: 2354: Add 3K warning for the cmp argument to list.sort() and sorted().Raymond Hettinger2008-03-181-0/+5
|
* Speed-up isinstance() for one easy case.Raymond Hettinger2008-03-181-0/+5
|
* Add py3k warnings for code and method inequality comparisons. This should ↵Steven Bethard2008-03-182-2/+102
| | | | resolve issue 2373. The codeobject.c and methodobject.c changes are both just backports of the Python 3 code.
* cell_compare needs to return -2 instead of NULL.Steven Bethard2008-03-181-1/+1
|
* Add py3k warnings for object, type, cell and dict comparisons. This should ↵Steven Bethard2008-03-184-3/+67
| | | | resolve issue2342 and partly resolve issue2373.
* Remove all traces of HAVE_STRERROR.Brett Cannon2008-03-181-8/+0
| | | | | The removal of strerror.c led to the function check being removed from configure.in.
* Issue 2332: add new attribute names for instance method objectsNeal Norwitz2008-03-181-0/+4
|
* Finish backporting new buffer API to Python 2.6. Left to do: memoryview ↵Travis E. Oliphant2008-03-182-0/+374
| | | | object and structmodule. But, these need to be finished in Python 3.0 first. No objects support the new buffer API in Python 2.6 as of yet, and except for the memoryview object, I don't think they will.
* - Issue 2379: Raise a Py3K warning for __getitem__ or __getslice__ onGuido van Rossum2008-03-181-0/+12
| | | | exception instances.
* Fix build on platforms that don't have intptr_t. Patch by Joseph Armbruster.Jeffrey Yasskin2008-03-182-2/+2
|
* Fix the IOError message text when opening a file with an invalid filename.Gregory P. Smith2008-03-181-2/+5
| | | | Error reported by Ilan Schnell.
* Issue 2321: reduce memory usage (increase the memory that is returnedNeal Norwitz2008-03-171-17/+21
| | | | | | to the system) by using pymalloc for the data of unicode objects. Will backport.
* Finished backporting PEP 3127, Integer Literal Support and Syntax.Eric Smith2008-03-171-1/+14
| | | | | | | | Added 0b and 0o literals to tokenizer. Modified PyOS_strtoul to support 0b and 0o inputs. Modified PyLong_FromString to support guessing 0b and 0o inputs. Renamed test_hexoct.py to test_int_literal.py and added binary tests. Added upper and lower case 0b, 0O, and 0X tests to test_int_literal.py
* Issue 2264: empty float presentation type needs to have at least one digit ↵Eric Smith2008-03-171-1/+6
| | | | | | | | | past the decimal point. Added "Z" format_char to PyOS_ascii_formatd to support empty float presentation type. Renamed buf_size in PyOS_ascii_formatd to more accurately reflect it's meaning. Modified format.__float__ to use the new "Z" format as the default. Added test cases.
* Issue 705836: Fix struct.pack(">f", 1e40) to behave consistentlyMark Dickinson2008-03-141-8/+8
| | | | | | | | | | across platforms: it should now raise OverflowError on all platforms. (Previously it raised OverflowError only on non IEEE 754 platforms.) Also fix the (already existing) test for this behaviour so that it actually raises TestFailed instead of just referencing it.
* Fix the overflows in expandtabs(). "This time for sure!"Guido van Rossum2008-03-112-50/+65
| | | | (Exploit at request.)
* Move abc._Abstract into object by adding a new flag Py_TPFLAGS_IS_ABSTRACT,Jeffrey Yasskin2008-02-281-0/+103
| | | | | | | | which forbids constructing types that have it set. The effect is to speed ./python.exe -m timeit -s 'import abc' -s 'class Foo(object): __metaclass__ = abc.ABCMeta' 'Foo()' up from 2.5us to 0.201us. This fixes issue 1762.
* Corrected assert to check for correct type in py3k.Eric Smith2008-02-241-1/+1
|
* Use PY_FORMAT_SIZE_T instead of z for string formatting. Thanks Neal.Christian Heimes2008-02-242-4/+8
|
* Issue 1742669. Now %d accepts very big float numbers.Facundo Batista2008-02-242-29/+88
| | | | Thanks Gabriel Genellina.
* #2067: file.__exit__() now calls subclasses' close() method.Georg Brandl2008-02-231-2/+2
|
* Now that PyOS_ascii_formatd supports the 'n' format, simplify the float ↵Eric Smith2008-02-201-40/+15
| | | | formatting code to just call it.