Hi all,

sorry, had a brain fart when I sent out the patch to deprecate the
SessionManager dict interface; it included some copy-and-pasted
assert statements that didn't work.  (I'd *swear* I made sure it
worked... o well.)

Here's the corrected patch, introducing warn() statements appropriately
and removing internal dependence on the dict-like interface.

--titus
New patches:

[deprecated dictionary interface
[EMAIL PROTECTED] {
hunk ./session.py 24
+from warnings import warn
hunk ./session.py 111
+        warn("SessionManager.keys() is deprecated", DeprecationWarning)
hunk ./session.py 119
+        warn("SessionManager.sorted_keys() is deprecated", DeprecationWarning)
hunk ./session.py 129
+        warn("SessionManager.values() is deprecated", DeprecationWarning)
hunk ./session.py 138
+        warn("SessionManager.items() is deprecated", DeprecationWarning)
hunk ./session.py 147
+        warn("SessionManager.get() is deprecated", DeprecationWarning)
hunk ./session.py 156
+        warn("SessionManager.__getitem__() is deprecated", DeprecationWarning)
hunk ./session.py 165
+        warn("SessionManager.has_key() is deprecated", DeprecationWarning)
hunk ./session.py 168
-    # has_session() is a synonym for has_key() -- if you override
-    # has_key(), be sure to repeat this alias!
-    has_session = has_key
-
hunk ./session.py 173
+        warn("SessionManager.__setitem__() is deprecated", DeprecationWarning)
+        
hunk ./session.py 188
+        warn("SessionManager.__delitem__() is deprecated", DeprecationWarning)
hunk ./session.py 274
-        session = self.get(id) or self._create_session()
+        session = self.sessions.get(id) or self._create_session()
hunk ./session.py 292
-                del self[session.id]
+                del self.sessions[session.id]
hunk ./session.py 300
-            self[session.id] = session
+            
+            self.sessions[session.id] = session
hunk ./session.py 310
-            self[session.id] = session
+            
+            self.sessions[session.id] = session
hunk ./session.py 355
-            del self[request.session.id]
+            del self.sessions[request.session.id]
hunk ./session.py 362
+
+    def has_session(self, session_id):
+        """(session_id : string) -> boolean
+
+        Return true if a session identified by 'session_id' exists in
+        the session manager.
+        """
+        return self.sessions.has_key(session_id)
}

Context:

[doc fixes
[EMAIL PROTECTED] 
[add HEAD support to simple_serverd
[EMAIL PROTECTED]
 Add include_body keyword to response write().
 Modify simple server to avoid duplicate Date headers.
] 
[remove __revision__ variables
[EMAIL PROTECTED] 
[Add changelog entry for htmltag unicode fix.
[EMAIL PROTECTED] 
[merge with 2.0 release from MEMS Exchange
[EMAIL PROTECTED]
 Remove SessionError exception and related code.  Remove src directory.
 Update copyright year.
] 
[make htmltag more unicode friendly
[EMAIL PROTECTED] 
[Make traversal safer.
[EMAIL PROTECTED] 
[prepare for 2.0 release
[EMAIL PROTECTED] 
[Have Session object insert REMOTE_USER environment value.
[EMAIL PROTECTED] 
[Don't set Expires header to -1 for 304 responses.
[EMAIL PROTECTED]
 Instead, have StaticFile set the Expires header for a "304 Not Modified"
 response just like it would for a normal response.
] 
[fix name error
[EMAIL PROTECTED] 
[Switch command-line HTTPS option to lowercase.
[EMAIL PROTECTED] 
[Allow the label for the 'Add row' button to be specified.
[EMAIL PROTECTED]
 The 'Add' part may not always make sense.  Also, add WidgetDict to
 widget.__init__ and fix some comments.
] 
[Add --HTTPS option to simple server.
[EMAIL PROTECTED] 
[add missing quotes to Id keywords
[EMAIL PROTECTED] 
[Fix session_manager in altdemo's call to the Publisher constructor.
[EMAIL PROTECTED] 
[Move PTL related code and html.py into subpackages.
[EMAIL PROTECTED]
 Add quixote.ptl.install: importing this module installs the ptl import
 hooks.  Add quixote.ptl.ptlrun.py, a script for running ptl files from
 the command line.  Gather the quixote.html and support files for
 htmltext into a sub-package.  These changes should be compatible with
 current code, except that quixote.ptl_import is now in
 quixote.ptl.ptl_import, quixote.qx_distutils is now in
 quixote.ptl.qx_distutils, quixote._py_htmltext is now
 quixote.html._py_htmltext, and quixote._c_htmltext is now
 quixote.html._c_htmltext.
] 
[unexpand Subversion keywords
[EMAIL PROTECTED] 
[Rename html_url.  The new name is url_with_query.
[EMAIL PROTECTED] 
[insert forgotten changes included in the 2.0a5 release.
[EMAIL PROTECTED] 
[TAG release 2.0a5+
[EMAIL PROTECTED] 
Patch bundle hash:
d3c4d8ed98b2e7985f6b55adc71b4d4d74988876
_______________________________________________
Quixote-users mailing list
[email protected]
http://mail.mems-exchange.org/mailman/listinfo/quixote-users

Reply via email to