| Age | Commit message (Collapse) | Author | |
|---|---|---|---|
| 2023-06-12 | Allowed custom formatting of lazy() objects. | Nick Pope | |
| This allows for formatting of lazy objects which have a custom formatter defined by overriding the default implementation from `object`. | |||
| 2023-06-12 | Allowed multiplication of lazy() objects with int return type. | Nick Pope | |
| 2023-06-12 | Made proxy class in lazy() prepare eagerly. | Ran Benita | |
| Previously, the proxy class was prepared lazily: lazy_identity = lazy(identity, int) lazy_identity(10) # prepared here lazy_identity(10) This has a slight advantage that if the lazy doesn't end up getting used, the preparation work is skipped, however that's not very likely. Besides this laziness, it is also inconsistent in that the methods which are wrapped directly (__str__ etc.) are prepared already when __proxy__ is defined, and there is a weird half-initialized state. This change it so that everything is prepared already on the first line of the example above. | |||
| 2023-06-12 | Added more tests for django.utils.functional.lazy(). | Nick Pope | |
| 2023-06-08 | Made bytes and str return types no longer mutually exclusive in lazy(). | Ran Benita | |
| They are no longer special cased. | |||
| 2023-06-08 | Refs #34445 -- Fixed string-casting of non-string lazy objects when value ↵ | Ran Benita | |
| may be bytes. If the result type is bytes, then calling bytes() on it does nothing. If the result type is not bytes, we should not cast to bytes, just because the return value may be bytes. | |||
| 2023-05-23 | Refs #34118 -- Fixed ↵ | Mariusz Felisiak | |
| FunctionalTests.test_cached_property_reuse_different_names() on Python 3.12+. Python 3.12+ no longer wraps exceptions in __set_name__, see https://github.com/python/cpython/commit/55c99d97e14618dfce41472dd4446f763b0da13f | |||
| 2023-03-30 | Fixed #34445 -- Fixed string-casting of non-string lazy objects. | Ran Benita | |
| This removes __text_cast() as it's the same as __cast(). _delegate_bytes and __delegate_text are mutually exclusive so the `if self._delegate_bytes` branch in __cast() is unreachable. Co-Authored-By: David Sanders <shang.xiao.sanders@gmail.com> | |||
| 2023-01-17 | Refs #30127 -- Removed name argument for ↵ | Mariusz Felisiak | |
| django.utils.functional.cached_property(). Per deprecation timeline. | |||
| 2022-02-07 | Refs #33476 -- Reformatted code with Black. | django-bot | |
| 2021-12-16 | Fixed #30127 -- Deprecated name argument of cached_property(). | mgaligniana | |
| 2021-03-15 | Refs #32508 -- Raised ValueError instead of using "assert" in lazy(). | Hasan Ramezani | |
| 2020-12-21 | Fixed #32208 -- Allowed adding lazy() objects. | Hasan Ramezani | |
| Co-authored-by: Claude Paroz <claude@2xlibre.net> | |||
| 2019-10-21 | Fixed #30876 -- Moved classproperty() decorator to the django.utils.functional. | André Ericson | |
| 2019-05-22 | Fixed #30498 -- Fixed proxy class caching in lazy(). | Ran Benita | |
| lazy() should prepare the proxy class only once (the first time it's used) not on every call. Regression in b4e76f30d12bfa8a53cc297c60055c6f4629cc4c. | |||
| 2019-01-30 | Fixed #30116 -- Dropped support for Python 3.5. | Tim Graham | |
| 2018-11-19 | Fixed #29478 -- Added support for mangled names to cached_property. | Thomas Grainger | |
| Co-Authored-By: Sergey Fedoseev <fedoseev.sergey@gmail.com> | |||
| 2017-01-19 | Refs #23919 -- Stopped inheriting from object to define new style classes. | Simon Charette | |
| 2017-01-18 | Refs #23919 -- Removed six.<various>_types usage | Claude Paroz | |
| Thanks Tim Graham and Simon Charette for the reviews. | |||
| 2017-01-18 | Refs #23919 -- Removed six.PY2/PY3 usage | Claude Paroz | |
| Thanks Tim Graham for the review. | |||
| 2017-01-18 | Refs #23919 -- Removed encoding preambles and future imports | Claude Paroz | |
| 2016-11-29 | Fixed #27555 -- Removed django.utils.functional.lazy_property. | Adam Chainz | |
| 2016-11-10 | Refs #27392 -- Removed "Tests that", "Ensures that", etc. from test docstrings. | za | |
| 2016-06-14 | Removed usage of a few deprecated unittest assertions. | Ville Skyttä | |
| 2016-06-04 | Fixed #24781 -- Fixed repr() for lazy objects. | Chesco Igual | |
| 2016-01-29 | Refs #26022 -- Used context manager version of assertRaises in tests. | Hasan | |
| 2015-06-23 | Fixed #25000 -- Fixed cast to string for lazy objects. | Marten Kenbeek | |
| Implemented __str__() to return the string-representation of the proxied object, not the proxy itself, if the lazy object didn't have a string-like object in its resultclasses. | |||
| 2015-02-06 | Sorted imports with isort; refs #23860. | Tim Graham | |
| 2014-12-26 | Fixed #23346 -- Fixed lazy() to lookup methods on the real object, not ↵ | Gavin Wahl | |
| resultclasses. Co-Authored-By: Rocky Meza <rmeza@fusionbox.com> | |||
| 2014-11-03 | Fixed #23620 -- Used more specific assertions in the Django test suite. | Berker Peksag | |
| 2014-10-20 | Fixed #23688 -- Updated cached_property to preserve docstring of original ↵ | John-Scott Atlakson | |
| function | |||
| 2014-07-01 | Fixed #22691 -- Added aliasing to cached_property. | Curtis | |
| 2013-10-23 | Fixed #21298 -- Fixed E301 pep8 warnings | Alasdair Nicol | |
| 2013-07-02 | Merge branch 'master' into schema-alteration | Andrew Godwin | |
| 2013-07-01 | Stopped using django.utils.unittest in the test suite. | Aymeric Augustin | |
| Refs #20680. | |||
| 2013-05-29 | Add test for new __ne__ method on Promise. | Andrew Godwin | |
| 2013-04-12 | Modified utils_tests for unittest2 discovery. | Preston Timmons | |
