<feed xmlns='http://www.w3.org/2005/Atom'>
<title>chango.git/tests/utils_tests/test_tree.py, branch devmain</title>
<subtitle>django
</subtitle>
<id>http://cgit.adnoto.dev/chango.git/atom?h=devmain</id>
<link rel='self' href='http://cgit.adnoto.dev/chango.git/atom?h=devmain'/>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/chango.git/'/>
<updated>2022-07-27T08:06:24Z</updated>
<entry>
<title>Refs #32948 -- Renamed Node._new_instance() to Node.create().</title>
<updated>2022-07-27T08:06:24Z</updated>
<author>
<name>Nick Pope</name>
<email>nick@nickpope.me.uk</email>
</author>
<published>2021-09-20T22:34:24Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/chango.git/commit/?id=ddf0002bb760e5f1df664a81bd2a554c522f2c0f'/>
<id>urn:sha1:ddf0002bb760e5f1df664a81bd2a554c522f2c0f</id>
<content type='text'>
Node._new_instance() was added in
6dd2b5468fa275d53aa60fdcaff8c28bdc5e9c25 to work around Q.__init__()
having an incompatible signature with Node.__init__().

It was intended as a hook that could be overridden if subclasses needed
to change the behaviour of instantiation of their specialised form of
Node. In practice this doesn't ever seem to have been used for this
purpose and there are very few calls to Node._new_instance() with other
code, e.g. Node.__deepcopy__() calling Node and overriding __class__ as
required.

Rename this to Node.create() to make it a more "official" piece of
private API that we can use to simplify a lot of other areas internally.

The docstring and nearby comment have been reworded to read more
clearly.
</content>
</entry>
<entry>
<title>Refs #32948 -- Added more tests for django.utils.tree.Node.</title>
<updated>2022-07-27T05:58:29Z</updated>
<author>
<name>Nick Pope</name>
<email>nick@nickpope.me.uk</email>
</author>
<published>2022-07-23T12:18:04Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/chango.git/commit/?id=cc52e02c96e9e26d59c6512f18516657e353cbe1'/>
<id>urn:sha1:cc52e02c96e9e26d59c6512f18516657e353cbe1</id>
<content type='text'>
The tests for creating new instances or copying instances of Node and
its subclasses didn't fully capture the behaviour of the implementation,
particularly around whether the `children` list or is contents were the
same as the source.
</content>
</entry>
<entry>
<title>Used AND, OR, XOR constants instead of hard-coded values.</title>
<updated>2022-07-27T05:55:09Z</updated>
<author>
<name>Nick Pope</name>
<email>nick@nickpope.me.uk</email>
</author>
<published>2022-07-23T12:31:35Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/chango.git/commit/?id=769d7cce4aedfcbba59f1b68577225d07701c206'/>
<id>urn:sha1:769d7cce4aedfcbba59f1b68577225d07701c206</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Refs #33476 -- Reformatted code with Black.</title>
<updated>2022-02-07T19:37:05Z</updated>
<author>
<name>django-bot</name>
<email>ops@djangoproject.com</email>
</author>
<published>2022-02-03T19:24:19Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/chango.git/commit/?id=9c19aff7c7561e3a82978a272ecdaad40dda5c00'/>
<id>urn:sha1:9c19aff7c7561e3a82978a272ecdaad40dda5c00</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Fixed #32717 -- Fixed filtering of querysets combined with the | operator.</title>
<updated>2021-05-13T05:26:52Z</updated>
<author>
<name>Simon Charette</name>
<email>charette.s@gmail.com</email>
</author>
<published>2021-05-11T05:19:44Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/chango.git/commit/?id=b81c7562fc33f50166d5120138d6398dc42b13c3'/>
<id>urn:sha1:b81c7562fc33f50166d5120138d6398dc42b13c3</id>
<content type='text'>
Address a long standing bug in a Where.add optimization to discard
equal nodes that was surfaced by implementing equality for Lookup
instances in bbf141bcdc31f1324048af9233583a523ac54c94.

Thanks Shaheed Haque for the report.
</content>
</entry>
<entry>
<title>Fixed #29838 -- Fixed crash when combining Q objects with __in lookups and lists.</title>
<updated>2018-10-17T15:34:49Z</updated>
<author>
<name>aspalding</name>
<email>aspalding@procuredhealth.com</email>
</author>
<published>2018-10-16T15:02:52Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/chango.git/commit/?id=dc5e75d419893bde33b7e439b59bdf271fc1a3f2'/>
<id>urn:sha1:dc5e75d419893bde33b7e439b59bdf271fc1a3f2</id>
<content type='text'>
Regression in fc6528b25ab1834be1a478b405bf8f7ec5cf860c.
</content>
</entry>
<entry>
<title>Fixed #29643 -- Fixed crash when combining Q objects with __in lookups and lists.</title>
<updated>2018-08-08T06:51:20Z</updated>
<author>
<name>Mariusz Felisiak</name>
<email>felisiak.mariusz@gmail.com</email>
</author>
<published>2018-08-08T06:51:20Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/chango.git/commit/?id=9fee229874367beafd532dad6d0f9ff9676ded0b'/>
<id>urn:sha1:9fee229874367beafd532dad6d0f9ff9676ded0b</id>
<content type='text'>
Regression in fc6528b25ab1834be1a478b405bf8f7ec5cf860c.</content>
</entry>
<entry>
<title>Fixed #28629 -- Made tree.Node instances hashable.</title>
<updated>2017-09-28T16:07:19Z</updated>
<author>
<name>Mariusz Felisiak</name>
<email>felisiak.mariusz@gmail.com</email>
</author>
<published>2017-09-28T16:07:19Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/chango.git/commit/?id=fc6528b25ab1834be1a478b405bf8f7ec5cf860c'/>
<id>urn:sha1:fc6528b25ab1834be1a478b405bf8f7ec5cf860c</id>
<content type='text'>
Regression in 508b5debfb16843a8443ebac82c1fb91f15da687 which
added Node.__eq__().</content>
</entry>
<entry>
<title>Refs #11964 -- Made Q objects deconstructible.</title>
<updated>2017-02-24T01:47:48Z</updated>
<author>
<name>Ian Foote</name>
<email>python@ian.feete.org</email>
</author>
<published>2016-11-06T10:37:07Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/chango.git/commit/?id=508b5debfb16843a8443ebac82c1fb91f15da687'/>
<id>urn:sha1:508b5debfb16843a8443ebac82c1fb91f15da687</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Fixed #22531 -- Added tree.Node.__repr__ and tests for the class.</title>
<updated>2014-05-16T13:30:25Z</updated>
<author>
<name>Moayad Mardini</name>
<email>moayad.m@gmail.com</email>
</author>
<published>2014-05-16T12:20:12Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/chango.git/commit/?id=393ddc10a78354b573b9e746247df013f7bd6151'/>
<id>urn:sha1:393ddc10a78354b573b9e746247df013f7bd6151</id>
<content type='text'>
While Node class has a useful `__str__`, its `__repr__` is not that
useful. Added a `__repr__` that makes use of the current `__str__`.
This is especially useful since the more popular `Q` class inherits
`tree.Node`. Also created new tests that cover most of `Node` class
functionality.
</content>
</entry>
</feed>
