Skip to content

Commit cc4b7de

Browse files
committed
fix(internal): use ModuleType so that sys.modules values can be hashed
Avoids HypothesisWorks/hypothesis#4660
1 parent 632659f commit cc4b7de

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cogapp/cogapp.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ def create_cog_module(self):
167167
Imported Python modules can use "import cog" to get our state.
168168
169169
"""
170-
self.cogmodule = types.SimpleNamespace()
170+
self.cogmodule = types.ModuleType("cog", doc="Auto-generated module for cog")
171171
self.cogmodule.path = []
172172

173173
def open_output_file(self, fname):

0 commit comments

Comments
 (0)