Commit 41aaa6f2 authored by Hanno Schlichting's avatar Hanno Schlichting

Drop the dependency on the ThreadLock distribution, by using Python's thread module instead.

parent 6e83525c
...@@ -41,7 +41,6 @@ eggs = ...@@ -41,7 +41,6 @@ eggs =
Persistence Persistence
Record Record
RestrictedPython RestrictedPython
ThreadLock
initgroups initgroups
tempstorage tempstorage
ZopeUndo ZopeUndo
......
...@@ -11,6 +11,9 @@ Trunk (unreleased) ...@@ -11,6 +11,9 @@ Trunk (unreleased)
Restructuring Restructuring
+++++++++++++ +++++++++++++
- Drop the dependency on the ThreadLock distribution, by using Python's thread
module instead.
- Removed Zope2's own mkzeoinstance script. If you want to set up ZEO instances - Removed Zope2's own mkzeoinstance script. If you want to set up ZEO instances
please install the zope.mkzeoinstance and use its script. please install the zope.mkzeoinstance and use its script.
......
...@@ -66,7 +66,6 @@ setup(name='Zope2', ...@@ -66,7 +66,6 @@ setup(name='Zope2',
'Persistence', 'Persistence',
'Record', 'Record',
'RestrictedPython', 'RestrictedPython',
'ThreadLock',
'ZConfig', 'ZConfig',
'ZODB3', 'ZODB3',
'ZopeUndo', 'ZopeUndo',
......
...@@ -11,11 +11,13 @@ ...@@ -11,11 +11,13 @@
# #
############################################################################## ##############################################################################
import TM, ThreadLock import thread
import TM
from TM import Surrogate from TM import Surrogate
import transaction import transaction
thunk_lock=ThreadLock.allocate_lock() thunk_lock = thread.allocate_lock()
class THUNKED_TM(TM.TM): class THUNKED_TM(TM.TM):
"""A big heavy hammer for handling non-thread safe DAs """A big heavy hammer for handling non-thread safe DAs
...@@ -35,14 +37,16 @@ class THUNKED_TM(TM.TM): ...@@ -35,14 +37,16 @@ class THUNKED_TM(TM.TM):
def tpc_finish(self, *ignored): def tpc_finish(self, *ignored):
if self._registered: if self._registered:
try: self._finish() try:
self._finish()
finally: finally:
thunk_lock.release() thunk_lock.release()
self._registered=0 self._registered=0
def abort(self, *ignored): def abort(self, *ignored):
if self._registered: if self._registered:
try: self._abort() try:
self._abort()
finally: finally:
thunk_lock.release() thunk_lock.release()
self._registered=0 self._registered=0
...@@ -14,7 +14,6 @@ Persistence = 2.13.1 ...@@ -14,7 +14,6 @@ Persistence = 2.13.1
Record = 2.13.0 Record = 2.13.0
RestrictedPython = 3.5.2 RestrictedPython = 3.5.2
tempstorage = 2.11.2 tempstorage = 2.11.2
ThreadLock = 2.13.0
ZopeUndo = 2.12.0 ZopeUndo = 2.12.0
# Zope2 dependencies # Zope2 dependencies
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment