summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris McDonough <chrism@plope.com>2012-02-07 01:11:19 -0500
committerChris McDonough <chrism@plope.com>2012-02-07 01:17:05 -0500
commit22e0aae7ebb0963b1322af146c52830226941f60 (patch)
treed12cbe90c811e70bbc6c90cd8fa6724a6e82a8f4
parent9399c12f561a74cdba7a5758c78173083625e6a9 (diff)
downloadpyramid-22e0aae7ebb0963b1322af146c52830226941f60.tar.gz
pyramid-22e0aae7ebb0963b1322af146c52830226941f60.tar.bz2
pyramid-22e0aae7ebb0963b1322af146c52830226941f60.zip
- Internal: catch unhashable discriminators early (raise an error instead of
allowing them to find their way into resolveConflicts).
-rw-r--r--CHANGES.txt3
-rw-r--r--pyramid/config/__init__.py4
2 files changed, 7 insertions, 0 deletions
diff --git a/CHANGES.txt b/CHANGES.txt
index 9edcbdbe8..7d20796e1 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -7,6 +7,9 @@ Features
- More informative error message when a ``config.include`` cannot find an
``includeme``. See https://github.com/Pylons/pyramid/pull/392.
+- Internal: catch unhashable discriminators early (raise an error instead of
+ allowing them to find their way into resolveConflicts).
+
Bug Fixes
---------
diff --git a/pyramid/config/__init__.py b/pyramid/config/__init__.py
index 57ab7e13a..bd3a80ad3 100644
--- a/pyramid/config/__init__.py
+++ b/pyramid/config/__init__.py
@@ -533,6 +533,10 @@ class Configurator(
``extra`` provides a facility for inserting extra keys and values
into an action dictionary.
"""
+ # catch nonhashable discriminators here; most unit tests use
+ # autocommit=False, which won't catch unhashable discriminators
+ assert hash(discriminator)
+
if kw is None:
kw = {}