Skip to content

Commit

Permalink
Merge pull request #310 from zopefoundation/zope-interface-fix-incons…
Browse files Browse the repository at this point in the history
…istent-iro

Fix inconsistent resolution order with zope.interface v5.
  • Loading branch information
jmuchemb committed Jun 2, 2020
2 parents bb9bf53 + 463fc5a commit 5ce50c3
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 11 deletions.
4 changes: 4 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
language: python

env:
global:
ZOPE_INTERFACE_STRICT_IRO: 1

python:
- 2.7
- 3.5
Expand Down
2 changes: 2 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@

- Fix tests with transaction 3.0.

- Fix inconsistent resolution order with zope.interface v5.

5.5.1 (2018-10-25)
==================

Expand Down
3 changes: 2 additions & 1 deletion buildout.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,9 @@ eggs =
${sphinx_egg:eggs}
docutils
ZODB
j1m.sphinxautointerface
sphinxcontrib_zopeext
j1m.sphinxautozconfig
sphinx_rtd_theme
scripts =
sphinx-build
interpreter = stxpy
4 changes: 2 additions & 2 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
'sphinx.ext.doctest',
'sphinx.ext.intersphinx',
'sphinx.ext.viewcode',
'j1m.sphinxautointerface',
'sphinxcontrib.zopeext.autointerface',
'j1m.sphinxautozconfig',
]

Expand Down Expand Up @@ -126,7 +126,7 @@
# The name of an image file (within the static path) to use as favicon of the
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
# pixels large.
html_favicon = 'zodb.ico'
html_favicon = '.static/zodb.ico'

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
Expand Down
2 changes: 1 addition & 1 deletion doc/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ Sphinx
pygments<2.6
docutils
ZODB
j1m.sphinxautointerface
sphinxcontrib_zopeext
j1m.sphinxautozconfig
sphinx_rtd_theme
2 changes: 1 addition & 1 deletion src/ZODB/FileStorage/FileStorage.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,12 +127,12 @@ def __init__(self, afile):
self._file = afile

@implementer(
IStorage,
IStorageRestoreable,
IStorageIteration,
IStorageUndoable,
IStorageCurrentRecordIteration,
IExternalGC,
IStorage,
)
class FileStorage(
FileStorageFormatter,
Expand Down
10 changes: 4 additions & 6 deletions src/ZODB/blob.py
Original file line number Diff line number Diff line change
Expand Up @@ -754,12 +754,10 @@ def __init__(self, base_directory, storage, layout='automatic'):
self._blobs_pack_is_in_progress = False

if ZODB.interfaces.IStorageRestoreable.providedBy(storage):
iblob = ZODB.interfaces.IBlobStorageRestoreable
else:
iblob = ZODB.interfaces.IBlobStorage

zope.interface.directlyProvides(
self, iblob, zope.interface.providedBy(storage))
zope.interface.directlyProvides(
self,
ZODB.interfaces.IBlobStorageRestoreable,
zope.interface.providedBy(storage))

def __getattr__(self, name):
return getattr(self.__storage, name)
Expand Down
2 changes: 2 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ commands =
zope-testrunner --test-path=src []
deps =
.[test]
setenv =
ZOPE_INTERFACE_STRICT_IRO = 1

[testenv:coverage]
basepython = python3.7
Expand Down

0 comments on commit 5ce50c3

Please sign in to comment.