summaryrefslogtreecommitdiffstats
path: root/meta-python/recipes-devtools/python/python3-portion_2.3.1.bb
Commit message (Collapse)AuthorAgeFilesLines
* python3-portion: upgrade 2.3.1 -> 2.4.0Wang Mingyu2023-03-171-16/+0
| | | | | | | | | | | | | | | | | | | | | Changelog: ========== Added ------ An AbstractDiscreteInterval class to ease the creation of specialized discrete intervals (experimental). A create_api function to generate an API similar to the one of portion but configured to use a given subclass of Interval (experimental, see Specialize & customize intervals). Changed ------- Speed up repr and to_string for Interval instances (see #76, adm271828). Some internal changes to ease subclassing: from_string and from_data accepts a klass parameter to specify which class should be used to create Interval instances (default is Interval). Add a klass parameter for open, closed, openclosed, closedopen, singleton and empty (default is Interval). Add a _klass class attribute in IntervalDict to specify how to create Interval instances (default is Interval). IntervalDict uses self.__class__ to preserve subclasses when creating new instances. Signed-off-by: Wang Mingyu <wangmy@fujitsu.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
* python3-portion: Upgrade 2.3.0 -> 2.3.1Wang Mingyu2023-02-111-0/+16
Changed ======= Speed up lookups in IntervalDict for non-interval keys. Speed up iterate by no longer creating singleton instances under the hood. Drop official support for Python 3.6. Fixed ===== Infinite recursion when a subclass of an Interval is compared using > with an Interval instance (see #75). Signed-off-by: Wang Mingyu <wangmy@fujitsu.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>