Changelog for “iteration_utilities”¶
Version 0.13.0 (2024-10-08)¶
Python 3.13 compatibility: A few optimizations are not possible anymore in Python 3.13. This means the performance of some functions (most notably
groupedby) will be slightly slower.
Version 0.12.1 (2024-03-03)¶
Source distribution now includes all files needed to run the tests from the tarball
Version 0.12.0 (2023-10-13)¶
Improve performance of
ipartitionby evaluating the predicate only once per item.Add benchmarks comparing some functions with other libraries.
Python 3.12 compatibility
Dropped Python 3.5 and 3.6 compatibility
The top level
__version__property was removed.importlib.metadata.versionfrom the Python standard library should be used if you need the version ofiteration_utilities.
Version 0.11.0 (2020-11-19)¶
The functions implemented in C now parse boolean arguments based on their truth value instead of their integer value. This should be unnoticeable in typical usage.
Added
always_iterablewhich wraps non-iterable inputs with an iterable.Added
emptyas singleton representing an empty iterable.The type of
Placeholderwhich was previously accessible asPlaceholderTypeprivate.Added Python 3.9 support.
Version 0.10.1 (2019-11-20)¶
Fixed reference counting bugs in
merge,minmax, andsideeffects.
Version 0.10.0 (2019-11-16)¶
Exception message for
oneif the iterable contains more than one element does show the first two elements.Fixed a bug in
grouperthat lead to a fatal exception.
Version 0.9.0 (2019-11-02)¶
This library does not support Python 2.7 anymore. Attempting to install
iteration_utilities on Python <= 3.4 should not work anymore.
Add the statistics functions introduced in Python 3.6 and 3.8 as methods on the
Iterableclass. This includes:fmean(Python >= 3.8)geometric_mean(Python >= 3.8)harmonic_mean(Python >= 3.6)multimode(Python >= 3.8)quantiles(Python >= 3.8)
Add a new recipe from the
itertoolsdocumentation:nth_combination.
Version 0.8.0 (2019-10-27)¶
Support for Python 3.3 and 3.4 was dropped. But it now supports Python 3.7 and 3.8. This will be the last release supporting Python 2.
Iterable.islicewill raise a more appropriateTypeErrorwhen called without arguments.partialonly allows plainstras keyword-names in CPython 3.8.Some constants have been available in the module namespace that were intended to be private. These have been removed. This includes
EQ_PY2,GE_PY3and similar constants.Added support for PyPy (3.5 and 3.6).
Use experimental vectorcall protocol (PEP 590) in a few places.
Contributors:
Solomon Ucko (@sollyucko)
Version 0.7.0 (2018-01-28)¶
Add
__sizeof__method forpartialto return a more accurate size for the instance.Fixed a problem when creating
mergeinstances depending on the compiler.
Version 0.6.1 (2017-04-15)¶
The
__next__ornextmethod of the processed iterator is not cached in theiteration_utilitiesiterators anymore. This correctly handles the (rare) case that this method is reassigned or deleted.
Version 0.6.0 (2017-04-08)¶
Renamed
funcparameter name ofpartitiontopred.Renamed
functionparameter name oftabulatetofunc.The
keyattribute ofItemIdxKeythrows anAttributeErrorif it is not set and an attempt is made to get or delete it.Added several attributes to classes.
Fixed a Bug in
deepflattenwhenisinstancefails for the classes given astypesorignoreparameter.Changed internal package structure (shouldn’t affect end-users that imported everything from
iteration_utilitiesdirectly).improved performance of
all_isinstanceandany_isinstance.improved performance of
replicate.replicatenow throws an exception if thetimesargument is smaller or equal to 1.corrected handling of exceptions and overflow in
__length_hint__methods.
Version 0.5.2 (2017-03-30)¶
fix release (again).
Version 0.5.1 (2017-03-30)¶
fixed major mistake that made 0.5.0 unusable. (
%Rformatter isn’t allowed inPyErr_Format).
Version 0.5.0 (2017-03-30)¶
minor speedup for
next(merge).removed unused
keyparameter fromcombinations_from_relations.replaced
Iterable.as_stringparameterseperaror(sic!) byseperator.included signature for
__reduce__,__setstate__and__length_hint__methods.fixed
Seen.contains_addmethod signature.fixed potential segfault in
ItemIdxKey.__repr__.removed unnecessary
__setstate__method forItemIdxKey.various
__setstate__and__reduce__methods were changed so they can’t used to cause segmentation faults,SystemErroror blatantly wrong behaviour. However, serializing or copying such an instance can significantly slower as a result of this change. Unpickling these instances from previous versions could be impossible andcopy.copyis not supported (and probably won’t be ever becauseitertools.teeinteracts with__copy__methods). Affected iterators:chained,deepflatten,duplicates,grouper,intersperse,merge,roundrobin,sideeffects,split,successive,unique_everseen,unique_justseen.added
__repr__method forchained,complement,constant,flip,nthandpacked.fixed a bug with
partialwhen the function kept the arguments and a call only provided exactly the number of arguments as there are placeholders in the partial.Applying
flipon anotherflipinstance now simply returns the original function.chainednow unwraps (if possible) otherchainedinstances when creating a new instance. This is only done if this won’t change the current behaviour.
Version 0.4.0 (2017-03-20)¶
SeenandItemIdxKeycan detect recursive objects in theirrepr.The representation for
SeenandItemIdxKeynow uses the classname even for subclasses.added
partialcallback class, which is essentiallyfunctools.partialbut also allows positional placeholders.several functions now interpret
Noneas if that argument for the function wasn’t given:keyargument forminmax,merge,argminandargmax.reduceargument forgroupedby.all arguments for
Seen.__new__.
Version 0.3.0 (2017-03-09)¶
implemented
__length_hint__method forclamp. However sensible results (!= 0) are only possible ifremove=Falseor bothlowandhighwere not set.fixed
SystemErrorin several functions when accessing the next item of the iterable resulted in an Exception different fromStopIteration.added
starfilteriterator.added
packedcallback class.fixed a segfault in
complement.__call__method when the function raised an Exception.fixed a segfault in
partitionwhenbool(item)raised an Exception.included a missing
ValueErrorinsplitwhen two of thekeep*parameters are True. The case where all three were given already raised the correct exception.clampnow interpretslow=Noneorhigh=Noneas if the corresponding value wasn’t given. Before it tried to compare the items withNone.
Version 0.2.1 (2017-03-01)¶
fixed segfault in
nthwhenretpred=True.
Version 0.2.0 (2017-02-27)¶
added
removeparameter toclamp.made
deepflattenstring-aware. For other recursive-iterable classes aRecursionException(orRuntimeExceptionon python < 3.5) is raised instead of freezing.
Version 0.1.0 (2017-01-25)¶
initial release