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

Fix inconsistent resolution order with zope.interface v5. #310

Merged
merged 4 commits into from Jun 2, 2020
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
4 changes: 4 additions & 0 deletions .travis.yml
@@ -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
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
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
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
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
Expand Up @@ -127,12 +127,12 @@ def __init__(self, afile):
self._file = afile

@implementer(
IStorage,
IStorageRestoreable,
IStorageIteration,
IStorageUndoable,
IStorageCurrentRecordIteration,
IExternalGC,
IStorage,
janjaapdriessen marked this conversation as resolved.
Show resolved Hide resolved
)
class FileStorage(
FileStorageFormatter,
Expand Down
10 changes: 4 additions & 6 deletions src/ZODB/blob.py
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
Expand Up @@ -13,6 +13,8 @@ commands =
zope-testrunner --test-path=src []
deps =
.[test]
setenv =
ZOPE_INTERFACE_STRICT_IRO = 1
janjaapdriessen marked this conversation as resolved.
Show resolved Hide resolved

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