From e6e9cb86154807899131286203105c398a65e41f Mon Sep 17 00:00:00 2001 From: v-makouz Date: Fri, 9 Sep 2022 12:09:39 -0700 Subject: [PATCH] merge with master (#21) * Add support for Python 3.10, drop EOL 3.5 (#952) * Remove duplicate entry in pyi stub (#979) * Replace deprecated SafeConfigParser with ConfigParser (#953) * Designate connection string as optional (#987) * Fix spelling typos (#985) Co-authored-by: Gord Thompson * Fix for DSN Names with non-ASCII chars (#951) * Fix for DSN Names with non-ASCII chars Fixes: #948 Co-authored-by: bamboo Co-authored-by: Gord Thompson * Added InterfaceError to pyodbc.pyi. (#1013) Co-authored-by: Benjamin Holder * Upgrade deprecated unicode encoding calls (#792) * Do not include .pyc artifacts in source tarball #742 * Build wheels with cibuildwheels on GitHub Actions Fixes #175 Ref #688 Closes #668 Closes #685 Fixes #441 and pretty much most issues that mention ` sql.h: No such file or directory` This also need to setup some PyPI keys for automated uploads. * Install unixodbc-dev for Linux wheels * Enable GitHub Actions for pull requests * Use Debian based `manylinux_2_24` image * `apt-get` update before installing in wheel build * Use PEP 440 version name required for wheels * Skip building 32-bit wheels * 4.0.dev0 for default version, because test_version() wants 3 parts here Checked this won't shadow released minor version (credit goes to @hugovk) >>> from packaging.version import Version >>> Version("4.0.dev0") > Version("4.0.24") False * Had to use Debian image for PyPy too * Disable PyPy wheels https://cibuildwheel.readthedocs.io/en/stable/options/#build-selection PyPy is missing some C functions that `pyodbc` needs. * Update README.md * Avoid error when testing with DSN= connection Fixes: #1000 * Disable setencoding/setdecoding in tests3/pgtests.py Fixes: #1004 * Adjust test_columns() in tests3/pgtests.py for newer driver versions Fixes: #1003 * Move driver version check out of function * Add comment to _get_column_size() * Fix memory leak with decimal parameters Fixes: #1026 * Create codeql-analysis.yml * Bugfix/sql param data memory leak (#703) * Updated .gitignore * * Created a test file for the specific scenario * * Updated doc of test file for the specific SQLParamData scenario * * Fixed the test file for the specific SQLParamData scenario by Py_XDECREF the PyObject with 1 reference. * * Improved the test to close the cursor and set it to None, then forcing the gc * * Changed the fix of the memory leak and updated the test. * * Removed redundant empty line * * Converted tabs to spaces * * Moved variable out of conn's scope * Update gitignore, remove duplicated * Replace deprecated PyUnicode_FromUnicode(NULL, size) calls (#998) Current versions of Python write a deprecation warning message to stderr, which breaks CGI scripts running under web servers which fold stderr into stdout. Likely breaks other software. This change replaces the deprecated calls with PyUnicode_New(size, maxchar). The accompanying code to populate the new objects has also been rewritten to use the new PyUnicode APIs. * Making pyodbc compatible with PostgreSQL infinity dates, returning MINYEAR and MAXYEAR to python, instead of values out of python's limits * Removing autoformat from code * Removing autoformat from code * Add odbc_config support on mac and m1 homebrew dir * Note EOL of 2.7 support in README (#945) * Fix version of CI generated wheels The CI system is checking out exact tags like "git checkout 4.0.33", which results in a detached HEAD. The version calculation was adding the commit hash. * Fix for #1082 libraries in Linux wheels (#1084) * use argparse instead of optparse (#1089) Co-authored-by: Hugo van Kemenade Co-authored-by: Alex Nelson Co-authored-by: Kian Meng, Ang Co-authored-by: Gord Thompson Co-authored-by: bamboo Co-authored-by: Gord Thompson Co-authored-by: bdholder Co-authored-by: Benjamin Holder Co-authored-by: Inada Naoki Co-authored-by: Michael Fladischer Co-authored-by: Anatoli Babenia Co-authored-by: Francisco Morales <51379487+jose598@users.noreply.github.com> Co-authored-by: Gord Thompson Co-authored-by: Michael Kleehammer Co-authored-by: Gilad Leifman Co-authored-by: Bob Kline Co-authored-by: Leandro Scott Co-authored-by: Jordan Mendelson Co-authored-by: Keith Erskine