mirror of
https://github.com/openharmony/third_party_jinja2.git
synced 2026-07-01 10:05:25 -04:00
08a4a6f53a
This fixes a regression in commit c172dd774f that
changed the `__hash__` implementation of Node from the default pointer
hash, to a hash based on the node fields.
Since these fields contains list objects, they are not hashable, making
every call to `Node.__hash__` fail.
This breaks some third-party usage such as in `django-compressor`
(See: https://github.com/django-compressor/django-compressor/issues/1060)
This changed reverts the hash method back to using `object.__hash__` as
the hash implementation.
4 lines
86 B
Python
4 lines
86 B
Python
def test_template_hash(env):
|
|
template = env.parse("hash test")
|
|
hash(template)
|