Skip to content

Commit

Permalink
- Prevent DeprecationWarnings from moved imports in ``AccessContr…
Browse files Browse the repository at this point in the history
…ol``
  • Loading branch information
dataflake committed Jul 28, 2021
1 parent d1c219d commit e9b9302
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 7 deletions.
2 changes: 2 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ https://github.com/zopefoundation/Zope/blob/4.x/CHANGES.rst
5.3 (unreleased)
----------------

- Prevent ``DeprecationWarnings`` from moved imports in ``AccessControl``

- make sure "Manager" users can always modify proxy roles
(`see Products.PythonScripts#50
<https://github.com/zopefoundation/Products.PythonScripts/issues/50>`_)
Expand Down
8 changes: 4 additions & 4 deletions src/OFS/tests/testObjectManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
from AccessControl.SecurityManagement import newSecurityManager
from AccessControl.SecurityManagement import noSecurityManager
from AccessControl.SecurityManager import setSecurityPolicy
from AccessControl.SpecialUsers import emergency_user
from AccessControl.SpecialUsers import nobody
from AccessControl.SpecialUsers import system
from AccessControl.users import User # before SpecialUsers
from AccessControl.users import User
from AccessControl.users import emergency_user
from AccessControl.users import nobody
from AccessControl.users import system
from Acquisition import Implicit
from Acquisition import aq_self
from App.config import getConfiguration
Expand Down
2 changes: 1 addition & 1 deletion src/OFS/tests/test_DTMLMethod.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@


def _lock_item(item):
from AccessControl.SpecialUsers import nobody
from AccessControl.users import nobody
from OFS.LockItem import LockItem
item.wl_setLock('token', LockItem(nobody, token='token'))

Expand Down
2 changes: 1 addition & 1 deletion src/ZPublisher/tests/testBaseRequest.py
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,7 @@ class AclUsers(Implicit):
def validate(self, request, auth='', roles=_noroles):
# always validate access as anonymous, good for checking
# if things are publishable regardless of authorization
from AccessControl.SpecialUsers import nobody
from AccessControl.users import nobody
return nobody.__of__(self)
acl_users = AclUsers()
return acl_users
Expand Down
2 changes: 1 addition & 1 deletion src/Zope2/utilities/zconsole.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

import Zope2
from AccessControl.SecurityManagement import newSecurityManager
from AccessControl.SpecialUsers import system as user
from AccessControl.users import system as user
from Testing.makerequest import makerequest
from Zope2.Startup.run import make_wsgi_app
from zope.globalrequest import setRequest
Expand Down

0 comments on commit e9b9302

Please sign in to comment.