Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This fixes a regression in commit 6029341 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: django-compressor/django-compressor#1060) This changed reverts the hash method back to using `object.__hash__` as the hash implementation.
- Loading branch information
Showing
3 changed files
with
6 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
class TestHashing: | ||
def test_template_hash(self, env): | ||
template = env.parse("hash test") | ||
assert hash(template) |