Skip to content

Commit

Permalink
Don't allow module loading by default
Browse files Browse the repository at this point in the history
  • Loading branch information
riconnon committed Nov 1, 2023
1 parent 50f1f0c commit 6d439b4
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions lupa/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,7 @@ def _import_newest_lib():
# prefer Lua over LuaJIT and high versions over low versions.
module_name = max(modules, key=lambda m: (m[1] == 'lua', tuple(map(int, m[2] or '0'))))

# We need to enable global symbol visibility for lupa in order to
# support binary module loading in Lua. If we can enable it here, we
# do it temporarily.
with eager_global_linking():
_newest_lib = __import__(module_name[0], level=1, fromlist="*", globals=globals())
_newest_lib = __import__(module_name[0], level=1, fromlist="*", globals=globals())

return _newest_lib

Expand Down

0 comments on commit 6d439b4

Please sign in to comment.