summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 283da79)
raw | patch | inline | side by side (parent: 283da79)
author | richard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2> | |
Thu, 3 Jul 2003 23:46:34 +0000 (23:46 +0000) | ||
committer | richard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2> | |
Thu, 3 Jul 2003 23:46:34 +0000 (23:46 +0000) |
git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@1785 57a73879-2fb5-44c3-a270-3262357dd7e2
diff --git a/CHANGES.txt b/CHANGES.txt
index d0fc5c688a85da1617cddf14d03f1ca30bd1de6d..9434fe223ccd7e0ec5d7d75c53c483fee52813bc 100644 (file)
--- a/CHANGES.txt
+++ b/CHANGES.txt
- plugged cross-site-scripting hole (thanks Jeff Epler)
- handle deprecation of FCNTL in python2.2+ (sf bug 756756)
- handle missing Subject: line (sf bug 755331)
-- handle New User creation (sf bug 754510)
+- fix New User creation (sf bug 754510)
- fix hackish message escaping (sf bug 757128)
- fix :required ordering problem (sf bug 740214)
- audit some user properties for valid values (roles, address) (sf bugs
- fix HTML file detection (hence history xref linking) (sf bug 741478)
- session database caches it's type, rather than calling whichdb each time
around.
-- changed rdbms_common to fix sql backends under Py2.3
+- changed rdbms_common to fix sql backends for new Boolean types under Py2.3
2003-06-10 0.6.0b3
index 45223286a6e9d01074f438c6fa0b492647c620c9..36833d0e1a2914d7ab7e29abe1be91b509b83b2b 100644 (file)
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
-# $Id: locking.py,v 1.6 2003-02-20 22:56:49 richard Exp $
+# $Id: locking.py,v 1.7 2003-07-03 23:43:46 richard Exp $
'''This module provides a generic interface to acquire and release
exclusive access to a file.
It should work on Unix and Windows.
'''
-# portalocker has a 0xffff0000 constant, and I don't need to know about it
-# being positive in 2.4+ :)
-try:
- x=FutureWarning
- import warnings
- warnings.filterwarnings("ignore",
- r'hex/oct constants > sys\.maxint .*', FutureWarning,
- 'portalocker', 0)
- del x
-except:
- pass
-
import portalocker
def acquire_lock(path, block=1):
index a062701dcd5de78b7f5b3c08852a41751fda136c..47ab263a2a2f157ddaea2860fa815e4e53e24cdd 100644 (file)
# Requires python 1.5.2 or better.
# ID line added by richard for Roundup file tracking
-# $Id: portalocker.py,v 1.5 2003-02-20 22:56:49 richard Exp $
+# $Id: portalocker.py,v 1.6 2003-07-03 23:43:46 richard Exp $
""" Cross-platform (posix/nt) API for flock-style file locking.
raise RuntimeError("PortaLocker only defined for nt and posix platforms")
if os.name == 'nt':
+ # eugh, but trying to suppress the warning doesn't work :(
+ FFFF0000 = 0xffff000 << 4
def lock(file, flags):
hfile = win32file._get_osfhandle(file.fileno())
# LockFileEx is not supported on all Win32 platforms (Win95, Win98, WinME).
# Try LockFileEx first, as it has more functionality and handles
# blocking locks more efficiently.
try:
- win32file.LockFileEx(hfile, flags, 0, 0xffff0000, __overlapped)
+ win32file.LockFileEx(hfile, flags, 0, FFFF0000, __overlapped)
except win32file.error, e:
import winerror
# Propagate upwards all exceptions other than not-implemented.
warnings.warn("PortaLocker does not support shared locking on Win9x", RuntimeWarning)
# LockFile only supports immediate-fail locking.
if flags & LOCK_NB:
- win32file.LockFile(hfile, 0, 0, 0xffff0000, 0)
+ win32file.LockFile(hfile, 0, 0, FFFF0000, 0)
else:
# Emulate a blocking lock with a polling loop.
import time
while 1:
# Attempt a lock.
try:
- win32file.LockFile(hfile, 0, 0, 0xffff0000, 0)
+ win32file.LockFile(hfile, 0, 0, FFFF0000, 0)
break
except win32file.error, e:
# Propagate upwards all exceptions other than lock violation.
# UnlockFileEx is not supported on all Win32 platforms (Win95, Win98, WinME).
# If it's not supported, win32file will raise an api_error exception.
try:
- win32file.UnlockFileEx(hfile, 0, 0xffff0000, __overlapped)
+ win32file.UnlockFileEx(hfile, 0, FFFF0000, __overlapped)
except win32file.error, e:
import winerror
# Propagate upwards all exceptions other than not-implemented.
# UnlockFileEx is not supported. Use UnlockFile.
# Care: the low/high length params are reversed compared to UnLockFileEx.
- win32file.UnlockFile(hfile, 0, 0, 0xffff0000, 0)
+ win32file.UnlockFile(hfile, 0, 0, FFFF0000, 0)
elif os.name =='posix':
def lock(file, flags):
index cb234ae9057db66bdf84c07452ccfd2f2e39376e..9d7f3333583cdc07445a2ac4a3afd640daff49b6 100644 (file)
-# $Id: rdbms_common.py,v 1.56 2003-06-24 08:06:27 anthonybaxter Exp $
+# $Id: rdbms_common.py,v 1.57 2003-07-03 23:43:46 richard Exp $
''' Relational database (SQL) backend common code.
Basics:
'''
# flip the sense of the 'retired' flag if we don't want all of them
if retired is not None:
- args = (((retired==0) and 1) or 0, )
+ if retired:
+ args = (0, )
+ else:
+ args = (1, )
sql = 'select id from _%s where __retired__ <> %s'%(self.classname,
self.db.arg)
else:
diff --git a/roundup/cgi/client.py b/roundup/cgi/client.py
index 397c2fe87147db7263ee9225bcf79d77a2ed27a2..7b7d86cf9fea1a40b25976e2d93dd07151dbcad1 100644 (file)
--- a/roundup/cgi/client.py
+++ b/roundup/cgi/client.py
-# $Id: client.py,v 1.124 2003-06-24 05:00:43 richard Exp $
+# $Id: client.py,v 1.125 2003-07-03 23:43:47 richard Exp $
__doc__ = """
WWW request handler (also used in the stand-alone server).
'''
# clean age sessions
self.clean_sessions()
+
# make sure we have the session Class
sessions = self.db.sessions