Skip to content

Commit

Permalink
pass globals/locals to eval
Browse files Browse the repository at this point in the history
  • Loading branch information
ewdurbin committed Oct 3, 2024
1 parent 1cac177 commit 42d6452
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/packaging/licenses/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def canonicalize_license_expression(

python_expression = " ".join(python_tokens)
try:
invalid = eval(python_expression)
invalid = eval(python_expression, globals(), locals())
except Exception:
invalid = True

Expand Down

0 comments on commit 42d6452

Please sign in to comment.