summaryrefslogtreecommitdiffstats
path: root/Misc/NEWS
Commit message (Collapse)AuthorAgeFilesLines
* SF feature request #686323: Minor array module enhancementsRaymond Hettinger2004-03-141-1/+3
| | | | | | | array.extend() now accepts iterable arguments implements as a series of appends. Besides being a user convenience and matching the behavior for lists, this the saves memory and cycles that would be used to create a temporary array object.
* Update the array overallocation scheme to match the approach used forRaymond Hettinger2004-03-141-1/+3
| | | | | | | | lists. Speeds append() operations and reduces memory requirements (because of more conservative overallocation). Paves the way for the feature request for array.extend() to support arbitrary iterable arguments.
* SF bug #910986: copy.copy fails for array.arrayRaymond Hettinger2004-03-131-0/+2
| | | | Added support for the copy module.
* Use a new macro, PySequence_Fast_ITEMS to factor out code common toRaymond Hettinger2004-03-121-0/+3
| | | | | three recent optimizations. Aside from reducing code volume, it increases readability.
* Make buffer objects based on mutable objects (like array) safe.Neil Schemenauer2004-03-111-0/+5
|
* SF patch #907403: Improvements to cStringIO.writelines()Raymond Hettinger2004-03-081-0/+5
| | | | | | | The writelines() method now accepts any iterable argument and writes the lines one at a time rather than using ''.join(lines) followed by a single write. Results in considerable memory savings and makes the method suitable for use with generator expressions.
* SF patch #910929: Optimize list comprehensionsRaymond Hettinger2004-03-071-0/+4
| | | | | Add a new opcode, LIST_APPEND, and apply it to the code generation for list comprehensions. Reduces the per-loop overhead by about a third.
* SF #904720: dict.update should take a 2-tuple sequence like dict.__init_Raymond Hettinger2004-03-041-0/+4
| | | | | | | | (Championed by Bob Ippolito.) The update() method for mappings now accepts all the same argument forms as the dict() constructor. This includes item lists and/or keyword arguments.
* * explain flags in doc stringsSkip Montanaro2004-03-031-0/+5
| | | | | * reverse order of files on the command line in pickle2db.py to make it symmetrical with db2pickle.py in the two-arg case (src, then dest)
* Have strftime() check its time tuple argument to make sure the tuple's valuesBrett Cannon2004-03-021-0/+7
| | | | | | | | | | are within proper boundaries as specified in the docs. This can break possible code (datetime module needed changing, for instance) that uses 0 for values that need to be greater 1 or greater (month, day, and day of year). Fixes bug #897625.
* "Fix" (for certain configurations of the planets, includingMichael W. Hudson2004-02-191-0/+4
| | | | | | | | | | | recent gcc on Linux/x86) [ 899109 ] 1==float('nan') by implementing rich comparisons for floats. Seems to make comparisons involving NaNs somewhat less surprising when the underlying C compiler actually implements C99 semantics.
* Patch #711838: Allow non-anonymous ftp urls in urllib2.Martin v. Löwis2004-02-151-0/+2
| | | | Backported to 2.3.
* * Moved the responsibility for emptying the previous list from list_fillRaymond Hettinger2004-02-151-0/+5
| | | | | | | | | | | | | | | | | | | | | to list_init. * Replaced the code in list_extend with the superior code from list_fill. * Eliminated list_fill. Results: * list.extend() no longer creates an intermediate tuple except to handle the special case of x.extend(x). The saves memory and time. * list.extend(x) runs about the same x is a list or tuple, a little faster when x is an iterable not defining __len__, and twice as fast when x is an iterable defining __len__. * the code is about 15 lines shorter and no longer duplicates functionality.
* Fine tune the speed/space trade-off for overallocating small lists.Raymond Hettinger2004-02-141-2/+2
| | | | | | | | | | | | | | The Py2.3 approach overallocated small lists by up to 8 elements. The last checkin would limited this to one but slowed down (by 20 to 30%) the creation of small lists between 3 to 8 elements. This tune-up balances the two, limiting overallocation to 3 elements (significantly reducing space consumption from Py2.3) and running faster than the previous checkin. The first part of the growth pattern (0, 4, 8, 16) neatly meshes with allocators that trigger data movement only when crossing a power of two boundary. Also, then even numbers mesh well with common data alignments.
* - Fixed #853061: allow BZ2Compressor.compress() to receive an empty stringGustavo Niemeyer2004-02-141-0/+3
| | | | as parameter.
* * Optimized list appends and pops by making fewer calls the underlying systemRaymond Hettinger2004-02-131-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | realloc(). This is achieved by tracking the overallocation size in a new field and using that information to skip calls to realloc() whenever possible. * Simplified and tightened the amount of overallocation. For larger lists, this overallocates by 1/8th (compared to the previous scheme which ranged between 1/4th to 1/32nd over-allocation). For smaller lists (n<6), the maximum overallocation is one byte (formerly it could be upto eight bytes). This saves memory in applications with large numbers of small lists. * Eliminated the NRESIZE macro in favor of a new, static list_resize function that encapsulates the resizing logic. Coverting this back to macro would give a small (under 1%) speed-up. This was too small to warrant the loss of readability, maintainability, and de-coupling. * Some functions using NRESIZE had grown unnecessarily complex in their efforts to bend to the macro's calling pattern. With the new list_resize function in place, those other functions could be simplified. That is being saved for a separate patch. * The ob_item==NULL check could be eliminated from the new list_resize function. This would entail finding each piece of code that sets ob_item to NULL and adding a new line to invalidate the overallocation tracking field. Rather than impose a new requirement on other pieces of list code, it was preferred to leave the NULL check in place and retain the benefits of decoupling, maintainability and information hiding (only PyList_New() and list_sort() need to know about the new field). This approach also reduces the odds of breaking an extension module. (Collaborative effort by Raymond Hettinger, Hye-Shik Chang, Tim Peters, and Armin Rigo.)
* This is my patch #876198 plus a NEWS entry and a header frob.Michael W. Hudson2004-02-121-0/+4
| | | | | Remove the ability to use (from C) arbitrary objects supporting the read buffer interface as the co_code member of code objects.
* remove support for missing ANSI C header files (limits.h, stddef.h, etc).Skip Montanaro2004-02-101-0/+3
|
* Fixed a bug in object.__reduce_ex__ (reduce_2) when using protocolJim Fulton2004-02-081-0/+4
| | | | | 2. Failure to clear the error when attempts to get the __getstate__ attribute fail caused intermittent errors and odd behavior.
* Remove support for --without-universal-newlines (see PEP 11).Skip Montanaro2004-02-071-0/+5
|
* added notes about weakref changesFred Drake2004-02-061-0/+15
|
* Fix input() builtin function to respect compiler flags.Hye-Shik Chang2004-02-021-0/+3
| | | | (SF patch 876178, patch by mwh, unittest by perky)
* Patch #874083: Bluetooth support for socket module.Martin v. Löwis2004-01-311-0/+3
|
* * Move collections.deque() in from the sandboxRaymond Hettinger2004-01-291-0/+7
| | | | | | * Add unittests, newsitem, and whatsnew * Apply to Queue.py mutex.py threading.py pydoc.py and shlex.py * Docs are forthcoming
* add hotshotmain refSkip Montanaro2004-01-271-0/+3
|
* Add news item about change in encodings search function.Marc-André Lemburg2004-01-201-0/+7
|
* Add a news entry for importing of CJK codecs.Hye-Shik Chang2004-01-171-0/+2
|
* document PEP 11 progress so far.Skip Montanaro2004-01-171-0/+8
|
* SF Patch #864863: Bisect C implementationRaymond Hettinger2004-01-051-1/+2
| | | | (Contributed by Dmitry Vasiliev.)
* Add note about new base64.py module support for RFC 3548.Barry Warsaw2004-01-041-0/+3
|
* complete backout of listobject.c v2.171Andrew MacIntyre2003-12-281-8/+0
|
* Performance of list([]) in 2.3 came up in a thread on comp.lang.python,Andrew MacIntyre2003-12-251-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | which can be reviewed via http://coding.derkeiler.com/Archive/Python/comp.lang.python/2003-12/1011.html Duncan Booth investigated, and discovered that an "optimisation" was in fact a pessimisation for small numbers of elements in a source list, compared to not having the optimisation, although with large numbers of elements in the source list the optimisation was quite beneficial. He posted his change to comp.lang.python (but not to SF). Further research has confirmed his assessment that the optimisation only becomes a net win when the source list has more than 100 elements. I also found that the optimisation could apply to tuples as well, but the gains only arrive with source tuples larger than about 320 elements and are nowhere near as significant as the gains with lists, (~95% gain @ 10000 elements for lists, ~20% gain @ 10000 elements for tuples) so I haven't proceeded with this. The code as it was applied the optimisation to list subclasses as well, and this also appears to be a net loss for all reasonable sized sources (~80-100% for up to 100 elements, ~20% for more than 500 elements; I tested up to 10000 elements). Duncan also suggested special casing empty lists, which I've extended to all empty sequences. On the basis that list_fill() is only ever called with a list for the result argument, testing for the source being the destination has now happens before testing source types.
* Guido grants a Christmas wish:Raymond Hettinger2003-12-171-3/+3
| | | | sorted() becomes a regular function instead of a classmethod.
* Fix typo and improve wording a bit.Raymond Hettinger2003-12-151-4/+4
|
* Add an entry for addition of {str,unicode}.rsplit.Hye-Shik Chang2003-12-151-0/+4
|
* Add news item about processor support in urllib2.Jeremy Hylton2003-12-141-0/+4
|
* * Added a new method flag, METH_COEXIST.Raymond Hettinger2003-12-131-0/+6
| | | | | * Used the flag to optimize set.__contains__(), dict.__contains__(), dict.__getitem__(), and list.__getitem__().
* Implement itertools.groupby()Raymond Hettinger2003-12-061-0/+5
| | | | | | | Original idea by Guido van Rossum. Idea for skipable inner iterators by Raymond Hettinger. Idea for argument order and identity function default by Alex Martelli. Implementation by Hye-Shik Chang (with tweaks by Raymond Hettinger).
* distutils compilers now compile source files in the same order as theyThomas Heller2003-12-051-0/+3
| | | | are passed to the compiler.
* Add news about removal of the PendingDeprecationWarning from apply().Fred Drake2003-12-051-0/+3
|
* Add parameters indent, width and depth to pprint.pprint() and pprint.pformat()Walter Dörwald2003-12-031-0/+3
| | | | and pass them along to the PrettyPrinter constructor.
* Patch #750542: pprint now will pretty print subclasses of list, tupleWalter Dörwald2003-12-031-0/+3
| | | | and dict too, as long as they don't overwrite __repr__().
* Py_Finalize(): disabled the second call of cyclic gc, and added extensiveTim Peters2003-12-011-0/+10
| | | | | | | comments about why both calls to cyclic gc here can cause problems. I'll backport to 2.3 maint. Since the calls were introduced in 2.3, that will be the end of it.
* As discussed on python-dev, added two extractor functions to theRaymond Hettinger2003-12-011-0/+5
| | | | operator module.
* Add news item for _winreg fix (SF bug 851056).Guido van Rossum2003-11-301-0/+5
|
* - Removed FutureWarnings related to hex/oct literals and conversionsGuido van Rossum2003-11-291-0/+9
| | | | | | | | | | and left shifts. (Thanks to Kalle Svensson for SF patch 849227.) This addresses most of the remaining semantic changes promised by PEP 237, except for repr() of a long, which still shows the trailing 'L'. The PEP appears to promise warnings for operations that changed semantics compared to Python 2.3, but this is not implemented; we've suffered through enough warnings related to hex/oct literals and I think it's best to be silent now.
* See SF #848614: distutils' msvccompiler now tries to detect that MSVC6Thomas Heller2003-11-281-0/+3
| | | | | | | is installed but the registry settings are incomplete because the gui has never been run. Already backported to release23-maint.
* Patch #849595: Add socket.shutdown() constants.Martin v. Löwis2003-11-271-0/+2
|
* Add optional fillchar argument to ljust(), rjust(), and center() string methods.Raymond Hettinger2003-11-261-0/+4
|
* Expose dict_contains() and PyDict_Contains() with is about 10% fasterRaymond Hettinger2003-11-251-0/+4
| | | | | | | than PySequence_Contains() and more clearly applicable to dicts. Apply the new function in setobject.c where __contains__ checking is ubiquitous.