Connector/Python 2.0.0rc2 Release Notes

Download Release Notes Changelog Connector/Python Overview

Release date: March 2026

This is a Release Candidate (RC) release of MariaDB Connector/Python.

triangle-exclamation

For a description of this library see the MariaDB Connector/Python documentationarrow-up-right .

Overview

MariaDB Connector/Python 2.0.0 RC2 is a major rewrite that introduces significant improvements and new features while maintaining compatibility with the Python DB API 2.0 (PEP-249) standard.

Version 2.0 offers flexible distribution options:

  • Pure Python implementation - Works everywhere, no compiler required

  • C extension - Maximum performance for data-heavy workloads

  • Pre-compiled binary wheels - No local C connector installation needed

  • Native async/await support - First-class asynchronous API

Major New Features

Asynchronous Support

  • CONPY-2arrow-up-right: Native async/await support for asynchronous database operations

  • CONPY-327arrow-up-right: Asynchronous support for C implementation

    • asyncConnect() function and AsyncConnection class

    • AsyncCursor class with async methods

    • create_async_pool() for async connection pooling

    • Context manager support with async with statements

    • Compatible with FastAPI, Starlette, and other asyncio-based frameworks

Enhanced Distribution Options

  • CONPY-324arrow-up-right: Enhanced Python Connector Distribution

    • Pure Python implementation available via pip install mariadb[python]

    • C extension for maximum performance via pip install mariadb[c]

    • Pre-compiled binary wheels via pip install mariadb[binary]

    • Connection pooling support via pip install mariadb[pool]

Connection URI Support

  • CONPY-326arrow-up-right: Add Connection URI Support to MariaDB Python Connector

    • Standard mariadb:// connection string syntax

    • Simplified connection configuration

    • Example: mariadb.connect("mariadb://user:password@localhost:3306/database")

Type Hints

  • CONPY-325arrow-up-right: Add Type Hints to MariaDB Python Connector

    • Complete type annotations for all public APIs

    • Full mypy and pyright compatibility

    • Improved IDE autocomplete and type checking

Binary Protocol Improvements

  • CONPY-338arrow-up-right: Unified binary protocol use

    • Explicit control over binary vs text protocol

    • Prepared statement caching enabled by default

    • Better performance for repeated queries

    • Connection-level and cursor-level binary parameter

Performance and Architecture Improvements

Metadata Optimization

  • CONPY-335arrow-up-right: Metadata: Store metadata as an object of arrays instead of an array of objects

    • Improved memory efficiency for cursor metadata

    • Faster metadata access patterns

    • Better performance with large result sets

C Implementation Enhancements

  • CONPY-333arrow-up-right: C implementation: columns metadata reading

    • Optimized metadata reading in C extension

    • Reduced overhead for query execution

    • Enhanced performance for data-heavy workloads

Installation

MariaDB Connector/Python 2.0.0-rc2 can be obtained from the Python Package Index (PyPI):

Pure Python implementation (recommended for development):

Pre-compiled binary wheels (recommended for production):

C extension from source (maximum performance):

Breaking Changes

Please refer to the Migration Guidearrow-up-right for detailed information on migrating from version 1.1 to 2.0.

Key breaking changes:

  • Python 3.8+ required (Python 3.7 and earlier no longer supported)

  • Some internal APIs have changed

  • Default behavior changes for prepared statement caching

Changelog

For a list of changes made in this release, with links to detailed information on each push, see the changelog.

Do not use non-stable (non-GA) releases in production!

This page is: Copyright © 2025 MariaDB. All rights reserved.

spinner

Last updated

Was this helpful?