<feed xmlns='http://www.w3.org/2005/Atom'>
<title>django.git/tests/utils_tests/test_functional.py, branch main</title>
<subtitle>django
</subtitle>
<id>http://cgit.adnoto.dev/django.git/atom?h=main</id>
<link rel='self' href='http://cgit.adnoto.dev/django.git/atom?h=main'/>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/django.git/'/>
<updated>2025-07-23T23:17:55Z</updated>
<entry>
<title>Refs #36500 -- Rewrapped long docstrings and block comments via a script.</title>
<updated>2025-07-23T23:17:55Z</updated>
<author>
<name>django-bot</name>
<email>ops@djangoproject.com</email>
</author>
<published>2025-07-23T03:41:41Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/django.git/commit/?id=69a93a88edb56ba47f624dac7a21aacc47ea474f'/>
<id>urn:sha1:69a93a88edb56ba47f624dac7a21aacc47ea474f</id>
<content type='text'>
Rewrapped long docstrings and block comments to 79 characters + newline
using script from https://github.com/medmunds/autofix-w505.
</content>
</entry>
<entry>
<title>Fixed #36005 -- Dropped support for Python 3.10 and 3.11.</title>
<updated>2025-01-20T13:07:28Z</updated>
<author>
<name>Mariusz Felisiak</name>
<email>felisiak.mariusz@gmail.com</email>
</author>
<published>2025-01-17T21:09:56Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/django.git/commit/?id=f5772de69679efb54129ac1cbca3579b512778af'/>
<id>urn:sha1:f5772de69679efb54129ac1cbca3579b512778af</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Allowed custom formatting of lazy() objects.</title>
<updated>2023-06-12T04:09:20Z</updated>
<author>
<name>Nick Pope</name>
<email>nick@nickpope.me.uk</email>
</author>
<published>2023-06-07T11:34:35Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/django.git/commit/?id=e042024b28fcef43606557554714352781fc1d13'/>
<id>urn:sha1:e042024b28fcef43606557554714352781fc1d13</id>
<content type='text'>
This allows for formatting of lazy objects which have a custom formatter
defined by overriding the default implementation from `object`.
</content>
</entry>
<entry>
<title>Allowed multiplication of lazy() objects with int return type.</title>
<updated>2023-06-12T03:59:40Z</updated>
<author>
<name>Nick Pope</name>
<email>nick@nickpope.me.uk</email>
</author>
<published>2023-06-07T11:13:34Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/django.git/commit/?id=fd97b0471b19cb45c4346e4947dfa7e69ff06158'/>
<id>urn:sha1:fd97b0471b19cb45c4346e4947dfa7e69ff06158</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Made proxy class in lazy() prepare eagerly.</title>
<updated>2023-06-12T03:45:44Z</updated>
<author>
<name>Ran Benita</name>
<email>ran@unusedvar.com</email>
</author>
<published>2020-04-26T18:42:07Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/django.git/commit/?id=ae94077e7d884c26fc92b4b0d248a3b4a541ee44'/>
<id>urn:sha1:ae94077e7d884c26fc92b4b0d248a3b4a541ee44</id>
<content type='text'>
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.
</content>
</entry>
<entry>
<title>Added more tests for django.utils.functional.lazy().</title>
<updated>2023-06-12T03:29:30Z</updated>
<author>
<name>Nick Pope</name>
<email>nick@nickpope.me.uk</email>
</author>
<published>2023-06-08T13:43:13Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/django.git/commit/?id=e0e0204477e47a9f8c3302236a31a42514b94c25'/>
<id>urn:sha1:e0e0204477e47a9f8c3302236a31a42514b94c25</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Made bytes and str return types no longer mutually exclusive in lazy().</title>
<updated>2023-06-08T07:15:40Z</updated>
<author>
<name>Ran Benita</name>
<email>ran234@gmail.com</email>
</author>
<published>2019-05-03T10:03:14Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/django.git/commit/?id=a57d5d9bbc27a7c3f18e14f68cfc74477b50eda0'/>
<id>urn:sha1:a57d5d9bbc27a7c3f18e14f68cfc74477b50eda0</id>
<content type='text'>
They are no longer special cased.
</content>
</entry>
<entry>
<title>Refs #34445 -- Fixed string-casting of non-string lazy objects when value may be bytes.</title>
<updated>2023-06-08T04:38:11Z</updated>
<author>
<name>Ran Benita</name>
<email>ran234@gmail.com</email>
</author>
<published>2019-05-03T10:12:54Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/django.git/commit/?id=f5817c24f44aa90188757ddca1e5e63ba6f5df75'/>
<id>urn:sha1:f5817c24f44aa90188757ddca1e5e63ba6f5df75</id>
<content type='text'>
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.
</content>
</entry>
<entry>
<title>Refs #34118 -- Fixed FunctionalTests.test_cached_property_reuse_different_names() on Python 3.12+.</title>
<updated>2023-05-23T10:56:33Z</updated>
<author>
<name>Mariusz Felisiak</name>
<email>felisiak.mariusz@gmail.com</email>
</author>
<published>2023-05-23T10:56:33Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/django.git/commit/?id=fc9c90d9c4611d441d2617a7d74f622b1f520f7c'/>
<id>urn:sha1:fc9c90d9c4611d441d2617a7d74f622b1f520f7c</id>
<content type='text'>
Python 3.12+ no longer wraps exceptions in __set_name__, see
https://github.com/python/cpython/commit/55c99d97e14618dfce41472dd4446f763b0da13f</content>
</entry>
<entry>
<title>Fixed #34445 -- Fixed string-casting of non-string lazy objects.</title>
<updated>2023-03-30T09:42:10Z</updated>
<author>
<name>Ran Benita</name>
<email>ran234@gmail.com</email>
</author>
<published>2019-05-03T09:58:12Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/django.git/commit/?id=066aabcb77579cf8d549119c860d11cd15e3eef1'/>
<id>urn:sha1:066aabcb77579cf8d549119c860d11cd15e3eef1</id>
<content type='text'>
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 &lt;shang.xiao.sanders@gmail.com&gt;
</content>
</entry>
</feed>
