mirror of
				https://github.com/psycopg/psycopg2.git
				synced 2025-11-04 01:37:31 +03:00 
			
		
		
		
	
							parent
							
								
									34d45aea87
								
							
						
					
					
						commit
						755a128ffb
					
				
							
								
								
									
										7
									
								
								NEWS
									
									
									
									
									
								
							
							
						
						
									
										7
									
								
								NEWS
									
									
									
									
									
								
							| 
						 | 
				
			
			@ -1,6 +1,13 @@
 | 
			
		|||
Current release
 | 
			
		||||
---------------
 | 
			
		||||
 | 
			
		||||
What's new in psycopg 2.8.1
 | 
			
		||||
---------------------------
 | 
			
		||||
 | 
			
		||||
- Fixed "there's no async cursor" error polling a connection with no cursor
 | 
			
		||||
  (:ticket:`#887`).
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
What's new in psycopg 2.8
 | 
			
		||||
-------------------------
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1045,12 +1045,6 @@ static cursorObject *
 | 
			
		|||
_conn_get_async_cursor(connectionObject *self) {
 | 
			
		||||
    PyObject *py_curs;
 | 
			
		||||
 | 
			
		||||
    if (!(self->async_cursor)) {
 | 
			
		||||
        PyErr_SetString(PyExc_SystemError,
 | 
			
		||||
            "unexpectedly, there's no async cursor here");
 | 
			
		||||
        goto error;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    if (!(py_curs = PyWeakref_GetObject(self->async_cursor))) {
 | 
			
		||||
        PyErr_SetString(PyExc_SystemError,
 | 
			
		||||
            "got null dereferencing cursor weakref");
 | 
			
		||||
| 
						 | 
				
			
			@ -1108,7 +1102,7 @@ conn_poll(connectionObject *self)
 | 
			
		|||
        Dprintf("conn_poll: status -> CONN_STATUS_*");
 | 
			
		||||
        res = _conn_poll_query(self);
 | 
			
		||||
 | 
			
		||||
        if (res == PSYCO_POLL_OK && self->async) {
 | 
			
		||||
        if (res == PSYCO_POLL_OK && self->async && self->async_cursor) {
 | 
			
		||||
            cursorObject *curs;
 | 
			
		||||
 | 
			
		||||
            /* An async query has just finished: parse the tuple in the
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -495,6 +495,10 @@ class AsyncTests(ConnectingTestCase):
 | 
			
		|||
 | 
			
		||||
        self.assert_(polls >= 8, polls)
 | 
			
		||||
 | 
			
		||||
    def test_poll_noop(self):
 | 
			
		||||
        self.conn.poll()
 | 
			
		||||
        self.conn.poll()
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def test_suite():
 | 
			
		||||
    return unittest.TestLoader().loadTestsFromName(__name__)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue
	
	Block a user