Thanks to Marc-Antoine Parent.
Sometimes, `git branch` may output in color, which causes the regex search to fail. Specifying --color=never fixes this.
Some drivers have problems with the LEN version, so eliminating use when possible. There is an ODBC GetInfo query to determine if LEN is required. Upon connection, this is cached and LEN is used if this is 'y'. FreeTDS, for example, requires LEN in some cases.
Trying to reproduce Google issue 277
Cursor objects can now be used in "with" statements and will automatically commit the transaction if successful. This is part of the effort to allow programs to be written using only Cursors. There are times when having separate connections and cursors are necessary, but very rare. By duplicating connection functionality in the cursor, most programs can probably use a single Cursor object everywhere.
…xecute. (Lost fix) This was fixed in 2.1.12 and lost during the Python 3 conversion. The saved prepared statement was not cleaned up when a SQLTables or similar function was used. If the next execute used the same SQL, pyodbc did not call SQLPrepare. (cherry picked from commit 7fdec2f)
Removed deprecated Row_slice. The sequence structure changed this from an actual function pointer to a void pointer. GCC 4.6.2 would not allow the assignment of Row_slice to void*. This may not build under 2.5. Also eliminated a bunch of casts to see if newer GCC would uncover other issues.