Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SNOW-1760684: release preparaption #2100

Open
wants to merge 2 commits into
base: dev/aio-connector
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions DESCRIPTION.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ Source code is also available at: https://github.com/snowflakedb/snowflake-conne

# Release Notes

- v3.13.0a1(TBD)
- Version 3.13.0a1 introduces our initial support for asyncio in the snowflake-connector-python library.
The new asyncio functionality is available in the `snowflake.connector.aio` submodule.
Please note that this feature is in its alpha stage, and breaking changes may occur as development continues.

- v3.12.3(October 25,2024)
- Improved the error message for SSL-related issues to provide clearer guidance when an SSL error occurs.
- Improved error message for SQL execution cancellations caused by timeout.
Expand Down
32 changes: 32 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,3 +81,35 @@ conn = snowflake.connector.connect(
)
conn.telemetry_enabled = False
```

## Asyncio Support

Asyncio support is introduced in version 3.13.0a1. This feature is currently in alpha stage, and future releases may include breaking changes as we continue to refine and improve the implementation.

### Installation requirements

```bash
pip install "snowflake-connector-python[aio]"
```

### Quickstart

To start using the asyncio functionality, refer to the following example:

```python
import asyncio
import snowflake.connector.aio
connection_parameters = {
# fill in your connection parameters
}

async def main():
async with snowflake.connector.aio.SnowflakeConnection(
**connection_parameters
) as conn, conn.cursor() as cur:
await cur.execute("SELECT 1")
res = await cur.fetchone()
assert res == (1, )

asyncio.run(main())
```
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ author_email = [email protected]
license = Apache-2.0
license_files = LICENSE.txt, NOTICE
classifiers =
Development Status :: 5 - Production/Stable
Development Status :: 3 - Alpha
Environment :: Console
Environment :: Other Environment
Intended Audience :: Developers
Expand Down
8 changes: 7 additions & 1 deletion src/snowflake/connector/description.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from __future__ import annotations

import platform
import re
import sys

from .version import VERSION
Expand All @@ -20,4 +21,9 @@
COMPILER = platform.python_compiler()

CLIENT_NAME = "PythonConnector" # don't change!
CLIENT_VERSION = ".".join([str(v) for v in VERSION[:3]])
# This is a short-term workaround for the backend to enable client side features for preview version, e.g. 3.x.xa1
CLIENT_VERSION = (
".".join([str(v) for v in VERSION[:3]])
if str(VERSION[2]).isdigit()
else f"{str(VERSION[0])}.{str(VERSION[1])}.{re.split('[ab]', str(VERSION[2]))[0]}"
)
2 changes: 1 addition & 1 deletion src/snowflake/connector/version.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Update this for the versions
# Don't change the forth version number from None
VERSION = (3, 12, 3, None)
VERSION = (3, 13, "0a1", None)
Loading