Skip to content

Commit

Permalink
Merge branch 'master' into 674-raise
Browse files Browse the repository at this point in the history
  • Loading branch information
ale-rt committed Nov 6, 2019
2 parents 55bfe39 + b18549f commit 6616892
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 8 deletions.
2 changes: 0 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,8 @@ matrix:
env: TOXENV=py36
- python: "3.7"
env: TOXENV=py37
dist: xenial
- python: "3.8"
env: TOXENV=py38
dist: xenial

install:
- travis_retry pip install -U pip setuptools
Expand Down
6 changes: 6 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ https://github.com/zopefoundation/Zope/blob/4.x/CHANGES.rst
the argument ``path`` is not something it can work with
(`#674 <https://github.com/zopefoundation/Zope/issues/674>`_)

- Fix error when using database minimize in the ZMI
(`#726 <https://github.com/zopefoundation/Zope/issues/726>`_)

- Fix ``__getattr__`` signature in ``UnauthorizedBinding``
(`#703 <https://github.com/zopefoundation/Zope/issues/703>`_)

- Remove more Python 2 support code
(`#692 <https://github.com/zopefoundation/Zope/issues/692>`_)

Expand Down
4 changes: 2 additions & 2 deletions src/Shared/DC/Scripts/Bindings.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ def __init__(self, name, wrapped):
def __repr__(self):
return '<UnauthorizedBinding: %s>' % self._name

def __getattr__(self, name, default=None):
def __getattr__(self, name):
# Make *extra* sure that the wrapper isn't used to access
# __call__, etc.
if name.startswith('__'):
Expand All @@ -200,7 +200,7 @@ def __getattr__(self, name, default=None):

self.__you_lose()

return guarded_getattr(self._wrapped, name, default)
return guarded_getattr(self._wrapped, name)

def __you_lose(self):
name = self.__dict__['_name']
Expand Down
8 changes: 5 additions & 3 deletions src/ZPublisher/WSGIPublisher.py
Original file line number Diff line number Diff line change
Expand Up @@ -331,9 +331,11 @@ def publish_module(environ, start_response,
with load_app(module_info) as new_mod_info:
with transaction_pubevents(request, response):
response = _publish(request, new_mod_info)
user = getSecurityManager().getUser()
if user is not None and user.getUserName() != 'Anonymous User':
environ['REMOTE_USER'] = user.getUserName()

user = getSecurityManager().getUser()
if user is not None and \
user.getUserName() != 'Anonymous User':
environ['REMOTE_USER'] = user.getUserName()
break
except TransientError:
if request.supports_retry():
Expand Down
1 change: 0 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ envlist =
[testenv]
coverage_run = {env:WIN_COV:coverage run}
commands =
{envbindir}/buildout -c {toxinidir}/buildout.cfg buildout:directory={envdir} buildout:develop={toxinidir} bootstrap
{envbindir}/buildout -c {toxinidir}/buildout.cfg buildout:directory={envdir} buildout:develop={toxinidir} install test alltests
{[testenv]coverage_run} {envdir}/bin/alltests {posargs:-vc}
skip_install = true
Expand Down

0 comments on commit 6616892

Please sign in to comment.