Skip to content
Snippets Groups Projects
Commit d83b8578 authored by Gavin M. Roy's avatar Gavin M. Roy
Browse files

Dont let Session and TornadoSession share connections

parent f0159b92
No related branches found
No related tags found
No related merge requests found
Version History
===============
- 1.7.5 2015-09-03
- Dont let Session and TornadoSession share connections
- 1.7.1 2015-03-25
- Fix TornadoSession's use of cleanup (#8) - Fix by Oren Itamar
- 1.7.0 2015-01-13
Loading
Loading
Loading
Loading
@@ -8,7 +8,7 @@ The core `queries.Queries` class will automatically register support for UUIDs,
Unicode and Unicode arrays.
 
"""
__version__ = '1.7.4'
__version__ = '1.7.5'
version = __version__
 
import logging
Loading
Loading
Loading
Loading
@@ -186,7 +186,8 @@ class Session(object):
:rtype: str
 
"""
return str(hashlib.md5(self._uri.encode('utf-8')).hexdigest())
return hashlib.md5(':'.join([self.__class__.__name__,
self._uri]).encode('utf-8')).hexdigest()
 
def query(self, sql, parameters=None):
"""A generator to issue a query on the server, mogrifying the
Loading
Loading
Loading
Loading
@@ -30,7 +30,7 @@ classifiers = ['Development Status :: 5 - Production/Stable',
'Topic :: Software Development :: Libraries']
 
setup(name='queries',
version='1.7.4',
version='1.7.5',
description="Simplified PostgreSQL client built upon Psycopg2",
maintainer="Gavin M. Roy",
maintainer_email="gavinmroy@gmail.com",
Loading
Loading
Loading
Loading
@@ -119,7 +119,8 @@ class SessionTestCase(unittest.TestCase):
self.assertListEqual(self.obj.notices, [1, 2, 3])
 
def test_pid_value(self):
expectation = str(hashlib.md5(self.URI.encode('utf-8')).hexdigest())
expectation = hashlib.md5(':'.join([self.obj.__class__.__name__,
self.URI]).encode('utf-8')).hexdigest()
self.assertEqual(self.obj.pid, expectation)
 
def test_query_invokes_cursor_execute(self):
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment