mirror of
				https://github.com/psycopg/psycopg2.git
				synced 2025-11-04 01:37:31 +03:00 
			
		
		
		
	Various fixes.
This commit is contained in:
		
							parent
							
								
									65a4b86fa2
								
							
						
					
					
						commit
						b1745ff139
					
				| 
						 | 
					@ -1,5 +1,12 @@
 | 
				
			||||||
2005-05-09  Federico Di Gregorio  <fog@debian.org>
 | 
					2005-05-09  Federico Di Gregorio  <fog@debian.org>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						* psycopg/typecast_datetime.c (typecast_PYDATETIME_cast): fixed a
 | 
				
			||||||
 | 
						typo (pyDateTimeModuleP->pyDateTimeTypeP) that was causing errors
 | 
				
			||||||
 | 
						with infinite datetime values.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						* psycopg/adapter_binary.c (binary_str): Py_XINCREF on the buffer
 | 
				
			||||||
 | 
						that can be NULL on error.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	* psycopg/typecast_binary.*: applied slightly modified
 | 
						* psycopg/typecast_binary.*: applied slightly modified
 | 
				
			||||||
	chunk/buffer object patch to allow round-trip of buffer objects
 | 
						chunk/buffer object patch to allow round-trip of buffer objects
 | 
				
			||||||
	(BYTEA columns.) 
 | 
						(BYTEA columns.) 
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										27
									
								
								NEWS
									
									
									
									
									
								
							
							
						
						
									
										27
									
								
								NEWS
									
									
									
									
									
								
							| 
						 | 
					@ -1,3 +1,30 @@
 | 
				
			||||||
 | 
					What's new in psycopg 2.0 beta 1
 | 
				
			||||||
 | 
					--------------------------------
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					* Officially in beta (i.e., no new features will be added.)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					* Array support: list objects can be passed as bound variables and are
 | 
				
			||||||
 | 
					  correctly returned for array columns.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					* Added the psycopg.psycopg1 compatibility module (if you want instant
 | 
				
			||||||
 | 
					  psycopg 1 compatibility just "from psycopg import psycopg1 as psycopg".)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					* Complete support for BYTEA columns and buffer objects.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					* The AsIs adapter is now exported by default (also Decimal objects are
 | 
				
			||||||
 | 
					  adapter using the AsIs adapter (when str() is called on them they
 | 
				
			||||||
 | 
					  already format themselves using the right precision and scale.)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					* The connect() function now takes "connection_factory" instead of
 | 
				
			||||||
 | 
					  "factory" as keyword argument.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					* New setup.py code to build on win32 using mingw and better error
 | 
				
			||||||
 | 
					  messages on missing datetime headers,
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					* Internal changes that allow much better user-defined type casters.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					* A lot of bugfixes (binary, datetime, 64 bit arches, GIL, .executemany())
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
What's new in psycopg 1.99.13
 | 
					What's new in psycopg 1.99.13
 | 
				
			||||||
-----------------------------
 | 
					-----------------------------
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -154,7 +154,7 @@ binary_str(binaryObject *self)
 | 
				
			||||||
    if (self->buffer == NULL) {
 | 
					    if (self->buffer == NULL) {
 | 
				
			||||||
        binary_quote(self);
 | 
					        binary_quote(self);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    Py_INCREF(self->buffer);
 | 
					    Py_XINCREF(self->buffer);
 | 
				
			||||||
    return self->buffer;
 | 
					    return self->buffer;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -81,10 +81,10 @@ typecast_PYDATETIME_cast(unsigned char *str, int len, PyObject *curs)
 | 
				
			||||||
    /* check for infinity */
 | 
					    /* check for infinity */
 | 
				
			||||||
    if (!strcmp(str, "infinity") || !strcmp(str, "-infinity")) {
 | 
					    if (!strcmp(str, "infinity") || !strcmp(str, "-infinity")) {
 | 
				
			||||||
        if (str[0] == '-') {
 | 
					        if (str[0] == '-') {
 | 
				
			||||||
            obj = PyObject_GetAttrString(pyDateTimeModuleP, "min");
 | 
					            obj = PyObject_GetAttrString(pyDateTimeTypeP, "min");
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        else {
 | 
					        else {
 | 
				
			||||||
            obj = PyObject_GetAttrString(pyDateTimeModuleP, "max");
 | 
					            obj = PyObject_GetAttrString(pyDateTimeTypeP, "max");
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user