Skip to content

Commit

Permalink
Merge pull request #388 from zopefoundation/fix_ZODB_issue_208
Browse files Browse the repository at this point in the history
Include fix for ZODB issue 208
  • Loading branch information
Michael Howitz committed Oct 26, 2018
2 parents dc5b929 + 2144553 commit 4375357
Show file tree
Hide file tree
Showing 9 changed files with 36 additions and 31 deletions.
4 changes: 4 additions & 0 deletions CHANGES.rst
Expand Up @@ -28,6 +28,10 @@ Bugfixes
stdlib in Python 3.
(`#368 <https://github.com/zopefoundation/Zope/issues/368>`_)

- Fix KeyError on releasing resources of a Connection when closing the DB.
This requires at least version 2.4 of the `transaction` package.
See `issue 208 <https://github.com/zopefoundation/ZODB/issues/208>`.

- Fix rendering of ordered folder icon in ZMI.

Other changes
Expand Down
16 changes: 8 additions & 8 deletions constraints.txt
Expand Up @@ -20,21 +20,21 @@ WebOb==1.8.3
WebTest==2.0.32
ZConfig==3.3.0
ZEO==5.2.0
ZODB==5.5.0
ZODB==5.5.1
ZServer==4.0b3 ; python_version < '3.0'
Zope2==4.0b1
five.globalrequest==99.1
five.localsitemanager==3.2.1
funcsigs==1.0.2
future==0.16.0
future==0.17.0
ipaddress==1.0.22
mock==2.0.0
pbr==5.0.0
pbr==5.1.0
persistent==4.4.3
pytz==2018.5
pytz==2018.6
shutilwhich==1.1.0
six==1.11.0
transaction==2.3.0
transaction==2.4.0
waitress==1.1.0
z3c.pt==3.1.0
zExceptions==4.1
Expand Down Expand Up @@ -63,9 +63,9 @@ zope.filerepresentation==4.2.0
zope.formlib==4.5.0
zope.globalrequest==1.5
zope.hookable==4.2.0
zope.i18n==4.6.0
zope.i18n==4.6.1
zope.i18nmessageid==4.3.1
zope.interface==4.5.0
zope.interface==4.6.0
zope.lifecycleevent==4.3.0
zope.location==4.2
zope.pagetemplate==4.4.1
Expand All @@ -83,7 +83,7 @@ zope.size==4.3
zope.structuredtext==4.3
zope.tal==4.4
zope.tales==4.3
zope.testbrowser==5.3
zope.testbrowser==5.3.1
zope.testing==4.7
zope.testrunner==4.9
zope.traversing==4.3.1
Expand Down
16 changes: 8 additions & 8 deletions requirements-full.txt
Expand Up @@ -21,20 +21,20 @@ WebOb==1.8.3
WebTest==2.0.32
ZConfig==3.3.0
ZEO==5.2.0
ZODB==5.5.0
ZODB==5.5.1
Zope2==4.0b1
five.globalrequest==99.1
five.localsitemanager==3.2.1
funcsigs==1.0.2
future==0.16.0
future==0.17.0
ipaddress==1.0.22
mock==2.0.0
pbr==5.0.0
pbr==5.1.0
persistent==4.4.3
pytz==2018.5
pytz==2018.6
shutilwhich==1.1.0
six==1.11.0
transaction==2.3.0
transaction==2.4.0
waitress==1.1.0
z3c.pt==3.1.0
zExceptions==4.1
Expand Down Expand Up @@ -63,9 +63,9 @@ zope.filerepresentation==4.2.0
zope.formlib==4.5.0
zope.globalrequest==1.5
zope.hookable==4.2.0
zope.i18n==4.6.0
zope.i18n==4.6.1
zope.i18nmessageid==4.3.1
zope.interface==4.5.0
zope.interface==4.6.0
zope.lifecycleevent==4.3.0
zope.location==4.2
zope.pagetemplate==4.4.1
Expand All @@ -83,7 +83,7 @@ zope.size==4.3
zope.structuredtext==4.3
zope.tal==4.4
zope.tales==4.3
zope.testbrowser==5.3
zope.testbrowser==5.3.1
zope.testing==4.7
zope.testrunner==4.9
zope.traversing==4.3.1
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Expand Up @@ -78,7 +78,7 @@ def _read_file(filename):
'ipaddress ; python_version=="2.7"',
'setuptools >= 36.2',
'six',
'transaction',
'transaction >= 2.4',
'waitress',
'zExceptions >= 3.4',
'z3c.pt',
Expand Down
1 change: 1 addition & 0 deletions sources.cfg
Expand Up @@ -15,6 +15,7 @@ Persistence = git ${remotes:github}/Persistence pushurl=${remotes:github_push}/P
RestrictedPython = git ${remotes:github}/RestrictedPython pushurl=${remotes:github_push}/RestrictedPython
zExceptions = git ${remotes:github}/zExceptions pushurl=${remotes:github_push}/zExceptions
zope.globalrequest = git ${remotes:github}/zope.globalrequest pushurl=${remotes:github_push}/zope.globalrequest
ZODB = git ${remotes:github}/ZODB pushurl=${remotes:github_push}/ZODB

# Optional dependencies
five.localsitemanager = git ${remotes:github}/five.localsitemanager pushurl=${remotes:github_push}/five.localsitemanager
Expand Down
2 changes: 1 addition & 1 deletion src/ZPublisher/WSGIPublisher.py
Expand Up @@ -223,7 +223,7 @@ def load_app(module_info):
try:
yield (app, realm, debug_mode)
finally:
if transaction.manager._txn is not None:
if transaction.manager.manager._txn is not None:
# Only abort a transaction, if one exists. Otherwise the
# abort creates a new transaction just to abort it.
transaction.abort()
Expand Down
8 changes: 4 additions & 4 deletions src/ZPublisher/tests/test_WSGIPublisher.py
Expand Up @@ -584,10 +584,10 @@ def test_open_transaction_is_aborted(self):
load_app = self._getTarget()

transaction.begin()
self.assertIsNotNone(transaction.manager._txn)
self.assertIsNotNone(transaction.manager.manager._txn)
with load_app(self._makeModuleInfo()):
pass
self.assertIsNone(transaction.manager._txn)
self.assertIsNone(transaction.manager.manager._txn)

def test_no_second_transaction_is_created_if_closed(self):
load_app = self._getTarget()
Expand Down Expand Up @@ -615,11 +615,11 @@ def counts(self):
transaction.manager.registerSynch(counter)

transaction.begin()
self.assertIsNotNone(transaction.manager._txn)
self.assertIsNotNone(transaction.manager.manager._txn)
with load_app(self._makeModuleInfo()):
transaction.abort()

self.assertIsNone(transaction.manager._txn)
self.assertIsNone(transaction.manager.manager._txn)
self.assertEqual(counter.counts(), (1, 1))


Expand Down
16 changes: 8 additions & 8 deletions versions-prod.cfg
Expand Up @@ -15,24 +15,24 @@ ExtensionClass = 4.4
five.globalrequest = 99.1
five.localsitemanager = 3.2.1
funcsigs = 1.0.2
future = 0.16.0
future = 0.17.0
ipaddress = 1.0.22
Missing = 4.1
mock = 2.0.0
MultiMapping = 4.1
PasteDeploy = 1.5.2
pbr = 5.0.0
pbr = 5.1.0
Persistence = 3.0b4
persistent = 4.4.3
Products.BTreeFolder2 = 4.1
Products.ZCatalog = 4.2
Products.ZCTextIndex = 4.0.2
pytz = 2018.5
pytz = 2018.6
Record = 3.5
RestrictedPython = 4.0b6
shutilwhich = 1.1.0
six = 1.11.0
transaction = 2.3.0
transaction = 2.4.0
waitress = 1.1.0
WebOb = 1.8.3
WebTest = 2.0.32
Expand All @@ -43,7 +43,7 @@ ZConfig = 3.3.0
zdaemon = 4.2.0
ZEO = 5.2.0
zExceptions = 4.1
ZODB = 5.5.0
ZODB = 5.5.1
zodbpickle = 1.0.2
zope.annotation = 4.7.0
zope.browser = 2.3
Expand All @@ -67,9 +67,9 @@ zope.filerepresentation = 4.2.0
zope.formlib = 4.5.0
zope.globalrequest = 1.5
zope.hookable = 4.2.0
zope.i18n = 4.6.0
zope.i18n = 4.6.1
zope.i18nmessageid = 4.3.1
zope.interface = 4.5.0
zope.interface = 4.6.0
zope.lifecycleevent = 4.3.0
zope.location = 4.2
zope.pagetemplate = 4.4.1
Expand All @@ -87,7 +87,7 @@ zope.size = 4.3
zope.structuredtext = 4.3
zope.tal = 4.4
zope.tales = 4.3
zope.testbrowser = 5.3
zope.testbrowser = 5.3.1
zope.testing = 4.7
zope.testrunner = 4.9
zope.traversing = 4.3.1
Expand Down
2 changes: 1 addition & 1 deletion versions.cfg
Expand Up @@ -39,7 +39,7 @@ pycparser = 2.19
Pygments = 2.2.0
pyparsing = 2.2.2
python-gettext = 3.0
readme-renderer = 22.0
readme-renderer = 23.0
requests = 2.20.0
requests-toolbelt = 0.8.0
snowballstemmer = 1.2.1
Expand Down

0 comments on commit 4375357

Please sign in to comment.