Skip to content

Conversation

@bchoudhary6415
Copy link
Collaborator

This pull request introduces support for Python 3.13 and enhances the database interaction functionality by adding support for the following fetch APIs:

  • fetchone: Retrieves a single row from the result set.
  • fetchmany: Fetches a specified number of rows from the result set.
  • fetchall: Retrieves all rows from the result set.

You can follow below example to use fetch APIs

stmt = ibm_db.exec_immediate(conn, "select * from animals")
rows = ibm_db.fetchall(stmt)
print(rows)

stmt1 = ibm_db.exec_immediate(conn, "select * from animals")
nRows = ibm_db.fetchmany(stmt1,2)
print(nRows)

stmt2 = ibm_db.exec_immediate(conn, "select * from animals")
firstRow = ibm_db.fetchone(stmt2)
print(firstRow)

Py_UNICODE - Deprecated since version 3.13, will be removed in version 3.15.
So used wchar_t in place of Py_UNICODE.

Bug Fixes:

  • Logging Enhancement: Removed the timestamp from the ibm_db logging part to streamline the logs.
  • ibm_db_dbi Bug Fix: Addressed a bug in the ibm_db_dbi module, ensuring proper functionality and stability.
  • Logging Improvements: Enhanced the logging functionality within the ibm_db_dbi module to improve traceability and
    debugging.

@bimalkjha bimalkjha merged commit 148866a into ibmdb:master Dec 2, 2024
1 check passed
@bchoudhary6415 bchoudhary6415 deleted the ibmdb_fetch branch December 3, 2024 06:58
alexanderankin added a commit to testcontainers/testcontainers-python that referenced this pull request Sep 9, 2025
## Description

`testcontainers-python` is not compatible with python 3.13 because of
several packages.

## Related issues

Fixes #870

## Packages update

- bump cffi: python-cffi/cffi#24
- bump psycopg2: psycopg/psycopg2#1695
- bump trio: python-trio/trio#2955
- bump pytest: pytest-dev/pytest#12334
- bump pymilvus: milvus-io/pymilvus#2684
- bump twine: pypa/twine#1184
- bump cryptography: pyca/cryptography#11491
- bump greenlet:
python-greenlet/greenlet@9497948
(python-greenlet/greenlet#392)
- bump grpcio: grpc/grpc#36201
- bump httpx: encode/httpx#3460
- bump ibm-db: ibmdb/python-ibmdb#971
- bump orjson: https://github.com/ijl/orjson/releases/tag/3.10.15
- bump pandas: https://github.com/pandas-dev/pandas/releases/tag/v2.2.3

> ⚠️ `cryptography` is not compatible with python `3.9.0` and
`3.9.1` to be able to update to the version supporting Python 3.13 we
have to exclude those version, meaning the minimum version is now 3.9.2
included.

---------

Signed-off-by: axel7083 <[email protected]>
Co-authored-by: David Ankin <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants