summaryrefslogtreecommitdiffstats
path: root/Objects
Commit message (Collapse)AuthorAgeFilesLines
* #2809 followup: even better split docstring.Georg Brandl2008-05-112-4/+4
|
* Addresses issue 2802: 'n' formatting for integers.Eric Smith2008-05-115-3/+154
| | | | | | | | | | | | | | Adds 'n' as a format specifier for integers, to mirror the same specifier which is already available for floats. 'n' is the same as 'd', but inserts the current locale-specific thousands grouping. I added this as a stringlib function, but it's only used by str type, not unicode. This is because of an implementation detail in unicode.format(), which does its own str->unicode conversion. But the unicode version will be needed in 3.0, and it may be needed by other code eventually in 2.6 (maybe decimal?), so I left it as a stringlib implementation. As long as the unicode version isn't instantiated, there's no overhead for this.
* #2809: elaborate str.split docstring a bit.Georg Brandl2008-05-112-3/+5
|
* Added module stub for copy_reg renaming in 3.0.Alexandre Vassalotti2008-05-111-22/+22
| | | | | | Renamed copy_reg to copyreg in the standard library, to avoid spurious warnings and ease later merging to py3k branch. Public documentation remains intact.
* Backport fast alternate io.BytesIO implementation.Alexandre Vassalotti2008-05-091-2/+2
| | | | | Merged r62778, r62779, r62802, r62806, r62807, r62808, r62809, r62844, r62846, r62952, r62956.
* Issue #2801: fix bug in float.is_integer where ValueErrorMark Dickinson2008-05-091-0/+1
| | | | | | could be incorrectly raised. This is a backport of the Py3k fix in r62939. (Should really have been fixed in the trunk first and svnmerged into py3k.)
* Frozensets do not benefit from autoconversion.Raymond Hettinger2008-05-081-3/+3
|
* A little reformating of Py3k warningsBenjamin Peterson2008-04-277-18/+16
|
* Use PyErr_WarnPy3k throughoutBenjamin Peterson2008-04-2710-49/+26
|
* 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