Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

include code object id into extractors cache key #677

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pony/orm/sqltranslation.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from uuid import UUID

from pony import options, utils
from pony.utils import localbase, is_ident, throw, reraise, copy_ast, between, concat, coalesce
from pony.utils import localbase, is_ident, throw, reraise, copy_ast, between, concat, coalesce, HashableDict
from pony.orm.asttranslation import ASTTranslator, ast2src, TranslationError, create_extractors, get_child_nodes
from pony.orm.decompiling import decompile, DecompileError, operator_mapping
from pony.orm.ormtypes import \
Expand Down Expand Up @@ -2657,7 +2657,7 @@ def __call__(monad, *args, **kwargs):
name_mapping = inspect.getcallargs(monad.func, *(monad.params + args), **kwargs)

func = monad.func
func_id = id(func)
func_id = HashableDict(code=id(func.__code__), func=id(func))
try:
func_ast, external_names, cells = decompile(func)
except DecompileError:
Expand Down