pyodbc: Update to 4.0.24
authorRosen Penev <redacted>
Sun, 26 Aug 2018 16:49:49 +0000 (09:49 -0700)
committerRosen Penev <redacted>
Tue, 18 Sep 2018 01:29:45 +0000 (18:29 -0700)
Fixes compilation on buildbots.

Removed upstreamed patch.

Changed URL to a sensical one.

Signed-off-by: Rosen Penev <redacted>
lang/python/pyodbc/Makefile
lang/python/pyodbc/patches/100-connection-assume-SQL_C_WCHAR-is-native-endian.patch [deleted file]

index aec3e7e6329b70de3e3d05ec4d6161e8e95f5407..dc0760d9afa0d72c48ddf08d6fb1a03c7d96046c 100644 (file)
@@ -5,12 +5,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=pyodbc
-PKG_VERSION:=4.0.21
+PKG_VERSION:=4.0.24
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://pypi.python.org/packages/0f/04/c5638a4636fb8117fdc45685f489864459d193b1d892b61dce785ddf58f9
-PKG_HASH:=9655f84ca9e5cb2dfffff705601017420c840d55271ba62dd44f05383eff0329
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/p/pyodbc
+PKG_HASH:=4326abb737dec36156998d52324921673d30f575e1e0998f0c5edd7de20e61d4
 PKG_BUILD_DEPENDS:=python python3 unixodbc
 PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=LICENSE.txt
diff --git a/lang/python/pyodbc/patches/100-connection-assume-SQL_C_WCHAR-is-native-endian.patch b/lang/python/pyodbc/patches/100-connection-assume-SQL_C_WCHAR-is-native-endian.patch
deleted file mode 100644 (file)
index 0819a6d..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
---- a/src/connection.cpp
-+++ b/src/connection.cpp
-@@ -18,6 +18,14 @@
- #include "cnxninfo.h"
- #include "sqlwchar.h"
-+#ifdef WORDS_BIGENDIAN
-+# define OPTENC_UTF16NE OPTENC_UTF16BE
-+# define ENCSTR_UTF16NE "utf-16be"
-+#else
-+# define OPTENC_UTF16NE OPTENC_UTF16LE
-+# define ENCSTR_UTF16NE "utf-16le"
-+#endif
-+
- #if PY_MAJOR_VERSION < 3
- static bool IsStringType(PyObject* t) { return (void*)t == (void*)&PyString_Type; }
- static bool IsUnicodeType(PyObject* t) { return (void*)t == (void*)&PyUnicode_Type; }
-@@ -90,7 +98,7 @@ static bool Connect(PyObject* pConnectSt
-         // indication that we can handle Unicode.  We are going to use the same unicode ending
-         // as we do for binding parameters.
--        SQLWChar wchar(pConnectString, SQL_C_WCHAR, encoding, "utf-16le");
-+        SQLWChar wchar(pConnectString, SQL_C_WCHAR, encoding, ENCSTR_UTF16NE);
-         if (!wchar)
-             return false;
-@@ -216,24 +224,24 @@ PyObject* Connection_New(PyObject* pConn
-     // single-byte text we don't actually know what the encoding is.  For example, with SQL
-     // Server the encoding is based on the database's collation.  We ask the driver / DB to
-     // convert to SQL_C_WCHAR and use the ODBC default of UTF-16LE.
--    cnxn->sqlchar_enc.optenc = OPTENC_UTF16LE;
--    cnxn->sqlchar_enc.name   = _strdup("utf-16le");
-+    cnxn->sqlchar_enc.optenc = OPTENC_UTF16NE;
-+    cnxn->sqlchar_enc.name   = _strdup(ENCSTR_UTF16NE);
-     cnxn->sqlchar_enc.ctype  = SQL_C_WCHAR;
--    cnxn->sqlwchar_enc.optenc = OPTENC_UTF16LE;
--    cnxn->sqlwchar_enc.name   = _strdup("utf-16le");
-+    cnxn->sqlwchar_enc.optenc = OPTENC_UTF16NE;
-+    cnxn->sqlwchar_enc.name   = _strdup(ENCSTR_UTF16NE);
-     cnxn->sqlwchar_enc.ctype  = SQL_C_WCHAR;
--    cnxn->metadata_enc.optenc = OPTENC_UTF16LE;
--    cnxn->metadata_enc.name   = _strdup("utf-16le");
-+    cnxn->metadata_enc.optenc = OPTENC_UTF16NE;
-+    cnxn->metadata_enc.name   = _strdup(ENCSTR_UTF16NE);
-     cnxn->metadata_enc.ctype  = SQL_C_WCHAR;
-     // Note: I attempted to use UTF-8 here too since it can hold any type, but SQL Server fails
-     // with a data truncation error if we send something encoded in 2 bytes to a column with 1
-     // character.  I don't know if this is a bug in SQL Server's driver or if I'm missing
-     // something, so we'll stay with the default ODBC conversions.
--    cnxn->unicode_enc.optenc = OPTENC_UTF16LE;
--    cnxn->unicode_enc.name   = _strdup("utf-16le");
-+    cnxn->unicode_enc.optenc = OPTENC_UTF16NE;
-+    cnxn->unicode_enc.name   = _strdup(ENCSTR_UTF16NE);
-     cnxn->unicode_enc.ctype  = SQL_C_WCHAR;
- #if PY_MAJOR_VERSION < 3
git clone https://git.99rst.org/PROJECT