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

re #60: remove duplicate guard against * imports #65

Merged
merged 2 commits into from
Oct 3, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ For changes before version 3.0, see ``HISTORY.rst``.

- Add support for Python 3.7.

- Remove duplicate guard against * imports. (#60)

4.0b4 (2018-04-16)
------------------

Expand Down
4 changes: 0 additions & 4 deletions src/AccessControl/ZopeGuards.py
Original file line number Diff line number Diff line change
Expand Up @@ -390,8 +390,6 @@ def guarded_import(mname, globals=None, locals=None, fromlist=None,
level=import_default_level):
if fromlist is None:
fromlist = ()
if '*' in fromlist:
raise Unauthorized("'from %s import *' is not allowed")
if globals is None:
globals = {}
if locals is None:
Expand All @@ -406,8 +404,6 @@ def guarded_import(mname, globals=None, locals=None, fromlist=None,
module = load_module(None, None, mnameparts, validate, globals, locals)
if module is None:
raise Unauthorized("import of '%s' is unauthorized" % mname)
if fromlist is None:
fromlist = ()
for name in fromlist:
v = getattr(module, name, None)
if v is None:
Expand Down