Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-pymssql for openSUSE:Factory checked in at 2023-12-15 21:49:50 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-pymssql (Old) and /work/SRC/openSUSE:Factory/.python-pymssql.new.25432 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-pymssql" Fri Dec 15 21:49:50 2023 rev:4 rq:1133363 version:2.2.11 Changes: -------- --- /work/SRC/openSUSE:Factory/python-pymssql/python-pymssql.changes 2023-10-31 20:26:16.463206408 +0100 +++ /work/SRC/openSUSE:Factory/.python-pymssql.new.25432/python-pymssql.changes 2023-12-15 21:50:11.748576898 +0100 @@ -1,0 +2,13 @@ +Thu Dec 14 13:31:54 UTC 2023 - Martin Hauke <mar...@gmx.de> + +- Update to version 2.2.11 + General + * Add datetime.date to SQLDATE conversion. + * Add encryption parameter to connect. + Bug fixes + * Fix version parsing in development. + * Add missing charset parameter when formatting query. + * Use four digits for the year in SP args binding. + * Fix convert_python_value to work with datetime.date. + +------------------------------------------------------------------- Old: ---- pymssql-2.2.10.tar.gz New: ---- pymssql-2.2.11.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-pymssql.spec ++++++ --- /var/tmp/diff_new_pack.GLX8yI/_old 2023-12-15 21:50:12.480603832 +0100 +++ /var/tmp/diff_new_pack.GLX8yI/_new 2023-12-15 21:50:12.480603832 +0100 @@ -17,7 +17,7 @@ Name: python-pymssql -Version: 2.2.10 +Version: 2.2.11 Release: 0 Summary: A simple database interface to MS-SQL for Python License: LGPL-2.1-only ++++++ pymssql-2.2.10.tar.gz -> pymssql-2.2.11.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pymssql-2.2.10/.github/workflows/test_linux.yml new/pymssql-2.2.11/.github/workflows/test_linux.yml --- old/pymssql-2.2.10/.github/workflows/test_linux.yml 2023-10-26 23:49:27.000000000 +0200 +++ new/pymssql-2.2.11/.github/workflows/test_linux.yml 2023-12-04 04:56:18.000000000 +0100 @@ -9,6 +9,7 @@ - ChangeLog* - .github/workflows/test_macos.yml - .github/workflows/test_windows.yml + - .github/workflows/test_linux_aarch64.yml tags: - 'v[0-9]+.[0-9]+.[0-9]+' - 'v[0-9]+.[0-9]+.[0-9]+rc[0-9]+' @@ -20,6 +21,7 @@ - ChangeLog* - .github/workflows/test_macos.yml - .github/workflows/test_windows.yml + - .github/workflows/test_linux_aarch64.yml jobs: @@ -45,6 +47,7 @@ - uses: actions/checkout@v3 with: fetch-depth: 0 + - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v4 with: @@ -58,7 +61,7 @@ python dev/build.py \ --ws-dir=./freetds \ --dist-dir=./dist \ - --freetds-version="1.4.3" \ + --freetds-version="1.4.9" \ --with-openssl=yes \ --enable-krb5 \ --sdist \ @@ -68,6 +71,8 @@ - name: Test with pytest run: | + pip install twine --upgrade + twine check dist/* pytest -sv wheels: @@ -105,7 +110,6 @@ run: | docker pull $DOCKER_IMAGE docker run --rm --net="host" -w=/io -v `pwd`:/io -e MANYLINUX=${{ matrix.manylinux }} $DOCKER_IMAGE /io/dev/build_manylinux_wheels.sh - ls -la dist - name: Archive wheels and sdist uses: actions/upload-artifact@v3 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pymssql-2.2.10/.github/workflows/test_linux_aarch64.yml new/pymssql-2.2.11/.github/workflows/test_linux_aarch64.yml --- old/pymssql-2.2.10/.github/workflows/test_linux_aarch64.yml 1970-01-01 01:00:00.000000000 +0100 +++ new/pymssql-2.2.11/.github/workflows/test_linux_aarch64.yml 2023-12-04 04:56:18.000000000 +0100 @@ -0,0 +1,132 @@ +name: Linux-aarch64 + +on: + push: + branches: + - '**' + paths-ignore: + - docs/** + - ChangeLog* + - .github/workflows/test_macos.yml + - .github/workflows/test_windows.yml + - .github/workflows/test_linux.yml + tags: + - 'v[0-9]+.[0-9]+.[0-9]+' + - 'v[0-9]+.[0-9]+.[0-9]+rc[0-9]+' + pull_request: + branches: + - '**' + paths-ignore: + - docs/** + - ChangeLog* + - .github/workflows/test_macos.yml + - .github/workflows/test_windows.yml + - .github/workflows/test_linux.yml + +jobs: + + build: + + runs-on: ${{ matrix.os }} + strategy: + matrix: + python-version: ['3.6', '3.7', '3.8', '3.9', '3.10', '3.11', '3.12'] + os: [ubuntu-20.04] + + services: + SQLServer: + image: mcr.microsoft.com/mssql/server:2017-latest + env: + ACCEPT_EULA: Y + SA_PASSWORD: sqlServerPassw0rd + ports: + - 1433:1433 + + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + + - name: build & install + run: | + sudo apt-get update + sudo apt-get install libssl-dev libkrb5-dev + python -m pip install --upgrade pip + pip install -r dev/requirements-dev.txt + python dev/build.py \ + --ws-dir=./freetds \ + --dist-dir=./dist \ + --freetds-version="1.4.9" \ + --with-openssl=yes \ + --enable-krb5 \ + --sdist \ + --static-freetds + pip install pymssql --no-index -f dist + python -c "import pymssql; print(pymssql.version_info())" + + - name: Test with pytest + run: | + pip install twine --upgrade + twine check dist/* + pytest -sv + + wheels: + + services: + SQLServer: + image: mcr.microsoft.com/mssql/server:2017-latest + env: + ACCEPT_EULA: Y + SA_PASSWORD: sqlServerPassw0rd + ports: + - 1433:1433 + + runs-on: ubuntu-latest + strategy: + matrix: + arch: [aarch64] + manylinux: [manylinux2014] + + steps: + + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Set up Python + uses: actions/setup-python@v4 + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + with: + platforms: arm64 + + - name: Build and test wheels + env: + DOCKER_IMAGE: quay.io/pypa/${{ matrix.manylinux }}_${{ matrix.arch }} + run: | + docker pull $DOCKER_IMAGE + docker run --rm --net="host" -w=/io -v `pwd`:/io -e MANYLINUX=${{ matrix.manylinux }} $DOCKER_IMAGE /io/dev/build_manylinux_wheels.sh + + - name: Archive wheels and sdist + uses: actions/upload-artifact@v3 + with: + name: pymssql-${{ runner.os }}-${{ matrix.manylinux }}_${{ matrix.arch }}-${{ github.sha }} + path: dist + + - name: Publish wheels and sdist + if: github.repository_owner == 'pymssql' && startsWith(github.ref, 'refs/tags/v') + run: | + pip install twine --upgrade + twine upload --skip-existing -u __token__ -p ${{secrets.PYMSSQL_PYPI_TOKEN}} dist/* + + - name: Publish wheels and sdist on test.pypi.org + if: github.repository_owner == 'pymssql' && github.ref == 'refs/heads/master' + run: | + pip install twine --upgrade + twine upload --skip-existing -u __token__ -p ${{secrets.PYMSSQL_TEST_PYPI_TOKEN}} --repository-url=https://test.pypi.org/legacy/ dist/* diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pymssql-2.2.10/.github/workflows/test_macos.yml new/pymssql-2.2.11/.github/workflows/test_macos.yml --- old/pymssql-2.2.10/.github/workflows/test_macos.yml 2023-10-26 23:49:27.000000000 +0200 +++ new/pymssql-2.2.11/.github/workflows/test_macos.yml 2023-12-04 04:56:18.000000000 +0100 @@ -9,6 +9,7 @@ - ChangeLog* - .github/workflows/test_linux.yml - .github/workflows/test_windows.yml + - .github/workflows/test_linux_aarch64.yml - dev/build_manylinux_wheels.sh tags: - 'v[0-9]+.[0-9]+.[0-9]+' @@ -21,6 +22,7 @@ - ChangeLog* - .github/workflows/test_linux.yml - .github/workflows/test_windows.yml + - .github/workflows/test_linux_aarch64.yml - dev/build_manylinux_wheels.sh jobs: @@ -58,7 +60,7 @@ python dev/build.py \ --ws-dir=./freetds \ --dist-dir=./dist \ - --freetds-version="1.4.3" \ + --freetds-version="1.4.9" \ --with-openssl=yes \ --sdist \ --static-freetds @@ -70,6 +72,8 @@ - name: Test with pytest run: | + pip install twine --upgrade + twine check dist/* pytest -sv - name: Archive wheels and sdist diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pymssql-2.2.10/.github/workflows/test_windows.yml new/pymssql-2.2.11/.github/workflows/test_windows.yml --- old/pymssql-2.2.10/.github/workflows/test_windows.yml 2023-10-26 23:49:27.000000000 +0200 +++ new/pymssql-2.2.11/.github/workflows/test_windows.yml 2023-12-04 04:56:18.000000000 +0100 @@ -9,6 +9,7 @@ - ChangeLog* - .github/workflows/test_macos.yml - .github/workflows/test_linux.yml + - .github/workflows/test_linux_aarch64.yml - dev/build_manylinux_wheels.sh tags: - 'v[0-9]+.[0-9]+.[0-9]+' @@ -21,6 +22,7 @@ - ChangeLog* - .github/workflows/test_macos.yml - .github/workflows/test_linux.yml + - .github/workflows/test_linux_aarch64.yml - dev/build_manylinux_wheels.sh jobs: @@ -60,12 +62,14 @@ choco install gperf python -m pip install --upgrade pip pip install -r dev/requirements-dev.txt - python dev/build.py --ws-dir=freetds --dist-dir=dist --sdist --freetds-version="1.4.3" + python dev/build.py --ws-dir=freetds --dist-dir=dist --sdist --freetds-version="1.4.9" pip install pymssql --no-index -f dist python -c "import pymssql; print(pymssql.version_info())" - name: Test with pytest run: | + pip install twine --upgrade + twine check dist/* pytest -sv - name: Archive wheels and sdist diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pymssql-2.2.10/ChangeLog.rst new/pymssql-2.2.11/ChangeLog.rst --- old/pymssql-2.2.10/ChangeLog.rst 2023-10-26 23:49:27.000000000 +0200 +++ new/pymssql-2.2.11/ChangeLog.rst 2023-12-04 04:56:18.000000000 +0100 @@ -1,6 +1,25 @@ Recent Changes ============== +Version 2.2.11 - 2023-12-03 - Mikhail Terekhov +=============================================== + +General +------- + +- Use FreeTDS-1.4.9 for official wheels on PyPi. +- Add workflow for aarch64 wheel. Thanks to juntangc (fix #692, #759, #791, #819, #826, #858). +- Add datetime.date to SQLDATE conversion. +- Add encription parameter to connect (fix #797). + +Bug fixes +--------- + +- Fix version parsing in development. +- Add missing `charset` parameter when formatting query (fix #650). +- Use four digits for the year in SP args binding (fix #454). +- Fix convert_python_value to work with datetime.date (fix #811). + Version 2.2.10 - 2023-10-20 - Mikhail Terekhov =============================================== diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pymssql-2.2.10/PKG-INFO new/pymssql-2.2.11/PKG-INFO --- old/pymssql-2.2.10/PKG-INFO 2023-10-26 23:53:45.686357700 +0200 +++ new/pymssql-2.2.11/PKG-INFO 2023-12-04 04:59:26.600410700 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: pymssql -Version: 2.2.10 +Version: 2.2.11 Summary: DB-API interface to Microsoft SQL Server for Python. (new Cython-based version) Author: Damien Churchill Author-email: dam...@gmail.com @@ -112,21 +112,29 @@ Recent Changes ============== -Version 2.2.10 - 2023-10-20 - Mikhail Terekhov +Version 2.2.11 - 2023-12-03 - Mikhail Terekhov =============================================== General ------- -- Publish Linux wheels for Python-3.12 +- Use FreeTDS-1.4.9 for official wheels on PyPi. +- Add workflow for aarch64 wheel. Thanks to juntangc (fix #692, #759, #791, #819, #826, #858). +- Add datetime.date to SQLDATE conversion. +- Add encription parameter to connect (fix #797). + +Bug fixes +--------- + +- Fix version parsing in development. +- Add missing `charset` parameter when formatting query (fix #650). +- Use four digits for the year in SP args binding (fix #454). +- Fix convert_python_value to work with datetime.date (fix #811). -Version 2.2.9 - 2023-10-13 - Mikhail Terekhov -============================================== +Version 2.2.10 - 2023-10-20 - Mikhail Terekhov +=============================================== General ------- -- Use FreeTDS-1.4.3 for official wheels on PyPi (fix #847). -- Build wheels for Python-3.12. Thanks to Raphael Jacob (fix #851, #855). -- Use manylinux_2_28 instead of manylinux_2_24 when building wheels in GitHub actions. -- Fix build with OpenSSL on Windows. Thanks to PrimozGodec (fix #839). +- Publish Linux wheels for Python-3.12 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pymssql-2.2.10/dev/build_manylinux_wheels.sh new/pymssql-2.2.11/dev/build_manylinux_wheels.sh --- old/pymssql-2.2.10/dev/build_manylinux_wheels.sh 2023-10-26 23:49:27.000000000 +0200 +++ new/pymssql-2.2.11/dev/build_manylinux_wheels.sh 2023-12-04 04:56:18.000000000 +0100 @@ -48,7 +48,7 @@ --ws-dir=./freetds \ --dist-dir=. \ --prefix=/usr/local \ - --freetds-version="1.4.3" \ + --freetds-version="1.4.9" \ --with-openssl=yes \ --enable-krb5 \ --static-freetds diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pymssql-2.2.10/docs/ref/_mssql.rst new/pymssql-2.2.11/docs/ref/_mssql.rst --- old/pymssql-2.2.10/docs/ref/_mssql.rst 2023-10-26 23:49:27.000000000 +0200 +++ new/pymssql-2.2.11/docs/ref/_mssql.rst 2023-12-04 04:56:18.000000000 +0100 @@ -79,6 +79,15 @@ * ``'SQLHOST,5000'`` -- If you have set up an instance to listen on port 5000 * ``'SQLHOST:5000'`` -- The same as above + :param str encryption: Specify if encryption is desired. Supported for + Microsoft servers. Possible values are: + + * ``'off'`` -- disables encryption + * ``'request'`` -- means use if available + * ``'require'`` -- means create and allow encrypted connections only + + .. versionadded:: 2.2.8 + :param str user: Database user to connect as :param str password: User's password diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pymssql-2.2.10/src/pymssql/_mssql.pyx new/pymssql-2.2.11/src/pymssql/_mssql.pyx --- old/pymssql-2.2.10/src/pymssql/_mssql.pyx 2023-10-26 23:49:27.000000000 +0200 +++ new/pymssql-2.2.11/src/pymssql/_mssql.pyx 2023-12-04 04:56:18.000000000 +0100 @@ -94,7 +94,7 @@ # Store the module version __full_version__ = PYMSSQL_VERSION.decode('ascii') __version__ = '.'.join(__full_version__.split('.')[:3]) -VERSION = tuple(int(c) for c in __full_version__.split('.')[:3]) +VERSION = tuple(int(c) if c.isdigit() else c for c in __full_version__.split('.')[:3]) ############################# ## DB-API type definitions ## @@ -139,6 +139,17 @@ SQLTIME = 41 SQLDATETIME2 = 42 +#################### +## TDS_ENCRYPTION_LEVEL ## +#################### + +cdef dict TDS_ENCRYPTION_LEVEL = { + 'default': 0, # TDS_ENCRYPTION_DEFAULT, + 'off': 1, # TDS_ENCRYPTION_OFF, + 'request': 2, # TDS_ENCRYPTION_REQUEST, + 'require': 3 # TDS_ENCRYPTION_REQUIRE +} + ################### ## Type mappings ## ################### @@ -597,7 +608,8 @@ self.column_types = None def __init__(self, server="localhost", user=None, password=None, - charset='UTF-8', database='', appname=None, port='1433', tds_version=None, conn_properties=None): + charset='UTF-8', database='', appname=None, port='1433', + tds_version=None, encryption=None, conn_properties=None): log("_mssql.MSSQLConnection.__init__()") cdef LOGINREC *login @@ -642,6 +654,12 @@ if tds_version is not None: DBSETLVERSION(login, _tds_ver_str_to_constant(tds_version)) + if encryption is not None: + if encryption in TDS_ENCRYPTION_LEVEL: + DBSETLENCRYPT(login, TDS_ENCRYPTION_LEVEL[encryption]) + else: + raise ValueError(f"'encryption' option should be {TDS_ENCRYPTION_LEVEL.keys())} or None.") + # add the port to the server string if it doesn't have one already and # if we are not using an instance if ':' not in server and not instance: @@ -967,12 +985,20 @@ dbValue[0] = <BYTE *><DBFLT8 *>dblValue return 0 + if dbtype[0] == SQLDATE: + if not isinstance(value, datetime.date): + raise TypeError('value can only be a datetime.date') + value = value.strftime('%4Y-%m-%d').encode(self.charset) + dbtype[0] = SQLCHAR + if dbtype[0] in (SQLDATETIM4, SQLDATETIME): if type(value) not in (datetime.date, datetime.datetime): raise TypeError('value can only be a date or datetime') - - value = value.strftime('%Y-%m-%d %H:%M:%S.') + \ - "%03d" % (value.microsecond // 1000) + microseconds=0 + if type(value) in (datetime.datetime,): + microseconds=value.microsecond // 1000 + value = value.strftime('%4Y-%m-%d %H:%M:%S.') + \ + "%03d" % (microseconds) value = value.encode(self.charset) dbtype[0] = SQLCHAR @@ -2056,7 +2082,7 @@ # do the string substitution match_start = match.start(1) + offset match_end = match.end(1) + offset - toformat = toformat[:match_start] + ensure_bytes(param_val) + toformat[match_end:] + toformat = toformat[:match_start] + ensure_bytes(param_val, charset) + toformat[match_end:] # adjust the offset for the next usage offset += offset_adjust @@ -2082,7 +2108,7 @@ # do the string substitution match_start = match.start(1) + offset match_end = match.end(1) + offset - toformat = toformat[:match_start] + ensure_bytes(param_val) + toformat[match_end:] + toformat = toformat[:match_start] + ensure_bytes(param_val, charset) + toformat[match_end:] #print(param_val, param_val_len, offset_adjust, match_start, match_end) # adjust the offset for the next usage offset += offset_adjust diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pymssql-2.2.10/src/pymssql/_pymssql.pyx new/pymssql-2.2.11/src/pymssql/_pymssql.pyx --- old/pymssql-2.2.10/src/pymssql/_pymssql.pyx 2023-10-26 23:49:27.000000000 +0200 +++ new/pymssql-2.2.11/src/pymssql/_pymssql.pyx 2023-12-04 04:56:18.000000000 +0100 @@ -35,7 +35,7 @@ __author__ = 'Damien Churchill <dam...@gmail.com>' __full_version__ = PYMSSQL_VERSION.decode('ascii') __version__ = '.'.join(__full_version__.split('.')[:3]) -VERSION = tuple(int(c) for c in __full_version__.split('.')[:3]) +VERSION = tuple(int(c) if c.isdigit() else c for c in __full_version__.split('.')[:3]) # Strives for compliance with DB-API 2.0 (PEP 249) # http://www.python.org/dev/peps/pep-0249/ @@ -592,7 +592,7 @@ def connect(server='.', user=None, password=None, database='', timeout=0, login_timeout=60, charset='UTF-8', as_dict=False, - host='', appname=None, port='1433', conn_properties=None, autocommit=False, tds_version=None): + host='', appname=None, port='1433', encryption=None, conn_properties=None, autocommit=False, tds_version=None): """ Constructor for creating a connection to the database. Returns a Connection object. @@ -644,7 +644,7 @@ server = host try: - conn = _mssql.connect(server=server, user=user, password=password, + conn = _mssql.connect(server=server, encryption=encryption, user=user, password=password, charset=charset, database=database, appname=appname, port=port, tds_version=tds_version, conn_properties=conn_properties) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pymssql-2.2.10/src/pymssql/sqlfront.pxd new/pymssql-2.2.11/src/pymssql/sqlfront.pxd --- old/pymssql-2.2.10/src/pymssql/sqlfront.pxd 2023-10-26 23:49:27.000000000 +0200 +++ new/pymssql-2.2.11/src/pymssql/sqlfront.pxd 2023-12-04 04:56:18.000000000 +0100 @@ -746,5 +746,6 @@ RETCODE DBSETLCHARSET(LOGINREC *x, char *y) RETCODE DBSETLVERSION(LOGINREC *login, BYTE version) RETCODE DBSETLDBNAME(LOGINREC *x, char *y) + RETCODE DBSETLENCRYPT(LOGINREC *login, int x) ctypedef int LINE_T diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pymssql-2.2.10/src/pymssql/version.h new/pymssql-2.2.11/src/pymssql/version.h --- old/pymssql-2.2.10/src/pymssql/version.h 2023-10-26 23:53:45.000000000 +0200 +++ new/pymssql-2.2.11/src/pymssql/version.h 2023-12-04 04:59:26.000000000 +0100 @@ -1 +1 @@ -#define PYMSSQL_VERSION "2.2.10" \ No newline at end of file +#define PYMSSQL_VERSION "2.2.11" \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pymssql-2.2.10/src/pymssql.egg-info/PKG-INFO new/pymssql-2.2.11/src/pymssql.egg-info/PKG-INFO --- old/pymssql-2.2.10/src/pymssql.egg-info/PKG-INFO 2023-10-26 23:53:45.000000000 +0200 +++ new/pymssql-2.2.11/src/pymssql.egg-info/PKG-INFO 2023-12-04 04:59:26.000000000 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: pymssql -Version: 2.2.10 +Version: 2.2.11 Summary: DB-API interface to Microsoft SQL Server for Python. (new Cython-based version) Author: Damien Churchill Author-email: dam...@gmail.com @@ -112,21 +112,29 @@ Recent Changes ============== -Version 2.2.10 - 2023-10-20 - Mikhail Terekhov +Version 2.2.11 - 2023-12-03 - Mikhail Terekhov =============================================== General ------- -- Publish Linux wheels for Python-3.12 +- Use FreeTDS-1.4.9 for official wheels on PyPi. +- Add workflow for aarch64 wheel. Thanks to juntangc (fix #692, #759, #791, #819, #826, #858). +- Add datetime.date to SQLDATE conversion. +- Add encription parameter to connect (fix #797). + +Bug fixes +--------- + +- Fix version parsing in development. +- Add missing `charset` parameter when formatting query (fix #650). +- Use four digits for the year in SP args binding (fix #454). +- Fix convert_python_value to work with datetime.date (fix #811). -Version 2.2.9 - 2023-10-13 - Mikhail Terekhov -============================================== +Version 2.2.10 - 2023-10-20 - Mikhail Terekhov +=============================================== General ------- -- Use FreeTDS-1.4.3 for official wheels on PyPi (fix #847). -- Build wheels for Python-3.12. Thanks to Raphael Jacob (fix #851, #855). -- Use manylinux_2_28 instead of manylinux_2_24 when building wheels in GitHub actions. -- Fix build with OpenSSL on Windows. Thanks to PrimozGodec (fix #839). +- Publish Linux wheels for Python-3.12 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pymssql-2.2.10/src/pymssql.egg-info/SOURCES.txt new/pymssql-2.2.11/src/pymssql.egg-info/SOURCES.txt --- old/pymssql-2.2.10/src/pymssql.egg-info/SOURCES.txt 2023-10-26 23:53:45.000000000 +0200 +++ new/pymssql-2.2.11/src/pymssql.egg-info/SOURCES.txt 2023-12-04 04:59:26.000000000 +0100 @@ -18,6 +18,7 @@ .github/dependabot.yml .github/ISSUE_TEMPLATE/bug_report.md .github/workflows/test_linux.yml +.github/workflows/test_linux_aarch64.yml .github/workflows/test_macos.yml .github/workflows/test_windows.yml dev/__init__.py @@ -77,6 +78,7 @@ tests/helpers.py tests/run_sqlalchemy_tests.py tests/test_bulk_copy.py +tests/test_charset.py tests/test_config.py tests/test_connection_as_dict.py tests/test_connection_timeout.py diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pymssql-2.2.10/tests/test_charset.py new/pymssql-2.2.11/tests/test_charset.py --- old/pymssql-2.2.10/tests/test_charset.py 1970-01-01 01:00:00.000000000 +0100 +++ new/pymssql-2.2.11/tests/test_charset.py 2023-12-04 04:56:18.000000000 +0100 @@ -0,0 +1,33 @@ +# -*- coding: utf-8 -*- +""" +Test charset usage in queries. +""" + +import unittest + +import pytest + +from .helpers import pymssqlconn + + +@pytest.mark.mssql_server_required +class TestCharset(unittest.TestCase): + + def setUp(self): + self.conn = pymssqlconn(charset='WINDOWS-1251') + + def test_charset(self): + cursor = self.conn.cursor() + + try: + cursor.execute( + 'select %s, %s', + ('ÐдÑавÑÑвÑй', 'ÐиÑ') # Russian strings + ) + except UnicodeDecodeError as e: + self.fail("cursor.execute() raised %s unexpectedly: %s" % (e.__class__.__name__, e)) + + a, b = cursor.fetchone() + + self.assertEqual(a, 'ÐдÑавÑÑвÑй') + self.assertEqual(b, 'ÐиÑ')