New Upstream Snapshot - python-databases

Ready changes

Summary

Merged new upstream version: 0.7.0+git20221227.1.77d9b8a (was: 0.7.0).

Resulting package

Built on 2022-12-31T01:37 (took 6m11s)

The resulting binary packages can be installed (if you have the apt repository enabled) by running one of:

apt install -t fresh-snapshots python3-databases

Lintian Result

Diff

diff --git a/LICENSE.md b/LICENSE.md
new file mode 100644
index 0000000..8963b9f
--- /dev/null
+++ b/LICENSE.md
@@ -0,0 +1,27 @@
+Copyright © 2019, [Encode OSS Ltd](https://www.encode.io/).
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+* Redistributions of source code must retain the above copyright notice, this
+  list of conditions and the following disclaimer.
+
+* Redistributions in binary form must reproduce the above copyright notice,
+  this list of conditions and the following disclaimer in the documentation
+  and/or other materials provided with the distribution.
+
+* Neither the name of the copyright holder nor the names of its
+  contributors may be used to endorse or promote products derived from
+  this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/PKG-INFO b/PKG-INFO
index f22fe85..41f9b5f 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -6,126 +6,6 @@ Home-page: https://github.com/encode/databases
 Author: Tom Christie
 Author-email: tom@tomchristie.com
 License: BSD
-Description: # Databases
-        
-        <p>
-        <a href="https://github.com/encode/databases/actions">
-            <img src="https://github.com/encode/databases/workflows/Test%20Suite/badge.svg" alt="Test Suite">
-        </a>
-        <a href="https://pypi.org/project/databases/">
-            <img src="https://badge.fury.io/py/databases.svg" alt="Package version">
-        </a>
-        </p>
-        
-        Databases gives you simple asyncio support for a range of databases.
-        
-        It allows you to make queries using the powerful [SQLAlchemy Core][sqlalchemy-core]
-        expression language, and provides support for PostgreSQL, MySQL, and SQLite.
-        
-        Databases is suitable for integrating against any async Web framework, such as [Starlette][starlette],
-        [Sanic][sanic], [Responder][responder], [Quart][quart], [aiohttp][aiohttp], [Tornado][tornado], or [FastAPI][fastapi].
-        
-        **Documentation**: [https://www.encode.io/databases/](https://www.encode.io/databases/)
-        
-        **Requirements**: Python 3.7+
-        
-        ---
-        
-        ## Installation
-        
-        ```shell
-        $ pip install databases
-        ```
-        
-        Database drivers supported are:
-        
-        * [asyncpg][asyncpg]
-        * [aiopg][aiopg]
-        * [aiomysql][aiomysql]
-        * [asyncmy][asyncmy]
-        * [aiosqlite][aiosqlite]
-        
-        You can install the required database drivers with:
-        
-        ```shell
-        $ pip install databases[asyncpg]
-        $ pip install databases[aiopg]
-        $ pip install databases[aiomysql]
-        $ pip install databases[asyncmy]
-        $ pip install databases[aiosqlite]
-        ```
-        
-        Note that if you are using any synchronous SQLAlchemy functions such as `engine.create_all()` or [alembic][alembic] migrations then you still have to install a synchronous DB driver: [psycopg2][psycopg2] for PostgreSQL and [pymysql][pymysql] for MySQL.
-        
-        ---
-        
-        ## Quickstart
-        
-        For this example we'll create a very simple SQLite database to run some
-        queries against.
-        
-        ```shell
-        $ pip install databases[aiosqlite]
-        $ pip install ipython
-        ```
-        
-        We can now run a simple example from the console.
-        
-        Note that we want to use `ipython` here, because it supports using `await`
-        expressions directly from the console.
-        
-        ```python
-        # Create a database instance, and connect to it.
-        from databases import Database
-        database = Database('sqlite+aiosqlite:///example.db')
-        await database.connect()
-        
-        # Create a table.
-        query = """CREATE TABLE HighScores (id INTEGER PRIMARY KEY, name VARCHAR(100), score INTEGER)"""
-        await database.execute(query=query)
-        
-        # Insert some data.
-        query = "INSERT INTO HighScores(name, score) VALUES (:name, :score)"
-        values = [
-            {"name": "Daisy", "score": 92},
-            {"name": "Neil", "score": 87},
-            {"name": "Carol", "score": 43},
-        ]
-        await database.execute_many(query=query, values=values)
-        
-        # Run a database query.
-        query = "SELECT * FROM HighScores"
-        rows = await database.fetch_all(query=query)
-        print('High Scores:', rows)
-        ```
-        
-        Check out the documentation on [making database queries](https://www.encode.io/databases/database_queries/)
-        for examples of how to start using databases together with SQLAlchemy core expressions.
-        
-        
-        <p align="center">&mdash; ⭐️ &mdash;</p>
-        <p align="center"><i>Databases is <a href="https://github.com/encode/databases/blob/master/LICENSE.md">BSD licensed</a> code. Designed & built in Brighton, England.</i></p>
-        
-        [sqlalchemy-core]: https://docs.sqlalchemy.org/en/latest/core/
-        [sqlalchemy-core-tutorial]: https://docs.sqlalchemy.org/en/latest/core/tutorial.html
-        [alembic]: https://alembic.sqlalchemy.org/en/latest/
-        [psycopg2]: https://www.psycopg.org/
-        [pymysql]: https://github.com/PyMySQL/PyMySQL
-        [asyncpg]: https://github.com/MagicStack/asyncpg
-        [aiopg]: https://github.com/aio-libs/aiopg
-        [aiomysql]: https://github.com/aio-libs/aiomysql
-        [asyncmy]: https://github.com/long2ice/asyncmy
-        [aiosqlite]: https://github.com/omnilib/aiosqlite
-        
-        [starlette]: https://github.com/encode/starlette
-        [sanic]: https://github.com/huge-success/sanic
-        [responder]: https://github.com/kennethreitz/responder
-        [quart]: https://gitlab.com/pgjones/quart
-        [aiohttp]: https://github.com/aio-libs/aiohttp
-        [tornado]: https://github.com/tornadoweb/tornado
-        [fastapi]: https://github.com/tiangolo/fastapi
-        
-Platform: UNKNOWN
 Classifier: Development Status :: 3 - Alpha
 Classifier: Environment :: Web Environment
 Classifier: Intended Audience :: Developers
@@ -140,11 +20,131 @@ Classifier: Programming Language :: Python :: 3.10
 Classifier: Programming Language :: Python :: 3 :: Only
 Requires-Python: >=3.7
 Description-Content-Type: text/markdown
-Provides-Extra: postgresql
-Provides-Extra: asyncpg
-Provides-Extra: aiopg
-Provides-Extra: mysql
 Provides-Extra: aiomysql
+Provides-Extra: aiopg
+Provides-Extra: aiosqlite
 Provides-Extra: asyncmy
+Provides-Extra: asyncpg
+Provides-Extra: mysql
+Provides-Extra: postgresql
 Provides-Extra: sqlite
-Provides-Extra: aiosqlite
+License-File: LICENSE.md
+
+# Databases
+
+<p>
+<a href="https://github.com/encode/databases/actions">
+    <img src="https://github.com/encode/databases/workflows/Test%20Suite/badge.svg" alt="Test Suite">
+</a>
+<a href="https://pypi.org/project/databases/">
+    <img src="https://badge.fury.io/py/databases.svg" alt="Package version">
+</a>
+</p>
+
+Databases gives you simple asyncio support for a range of databases.
+
+It allows you to make queries using the powerful [SQLAlchemy Core][sqlalchemy-core]
+expression language, and provides support for PostgreSQL, MySQL, and SQLite.
+
+Databases is suitable for integrating against any async Web framework, such as [Starlette][starlette],
+[Sanic][sanic], [Responder][responder], [Quart][quart], [aiohttp][aiohttp], [Tornado][tornado], or [FastAPI][fastapi].
+
+**Documentation**: [https://www.encode.io/databases/](https://www.encode.io/databases/)
+
+**Requirements**: Python 3.7+
+
+---
+
+## Installation
+
+```shell
+$ pip install databases
+```
+
+Database drivers supported are:
+
+* [asyncpg][asyncpg]
+* [aiopg][aiopg]
+* [aiomysql][aiomysql]
+* [asyncmy][asyncmy]
+* [aiosqlite][aiosqlite]
+
+You can install the required database drivers with:
+
+```shell
+$ pip install databases[asyncpg]
+$ pip install databases[aiopg]
+$ pip install databases[aiomysql]
+$ pip install databases[asyncmy]
+$ pip install databases[aiosqlite]
+```
+
+Note that if you are using any synchronous SQLAlchemy functions such as `engine.create_all()` or [alembic][alembic] migrations then you still have to install a synchronous DB driver: [psycopg2][psycopg2] for PostgreSQL and [pymysql][pymysql] for MySQL.
+
+---
+
+## Quickstart
+
+For this example we'll create a very simple SQLite database to run some
+queries against.
+
+```shell
+$ pip install databases[aiosqlite]
+$ pip install ipython
+```
+
+We can now run a simple example from the console.
+
+Note that we want to use `ipython` here, because it supports using `await`
+expressions directly from the console.
+
+```python
+# Create a database instance, and connect to it.
+from databases import Database
+database = Database('sqlite+aiosqlite:///example.db')
+await database.connect()
+
+# Create a table.
+query = """CREATE TABLE HighScores (id INTEGER PRIMARY KEY, name VARCHAR(100), score INTEGER)"""
+await database.execute(query=query)
+
+# Insert some data.
+query = "INSERT INTO HighScores(name, score) VALUES (:name, :score)"
+values = [
+    {"name": "Daisy", "score": 92},
+    {"name": "Neil", "score": 87},
+    {"name": "Carol", "score": 43},
+]
+await database.execute_many(query=query, values=values)
+
+# Run a database query.
+query = "SELECT * FROM HighScores"
+rows = await database.fetch_all(query=query)
+print('High Scores:', rows)
+```
+
+Check out the documentation on [making database queries](https://www.encode.io/databases/database_queries/)
+for examples of how to start using databases together with SQLAlchemy core expressions.
+
+
+<p align="center">&mdash; ⭐️ &mdash;</p>
+<p align="center"><i>Databases is <a href="https://github.com/encode/databases/blob/master/LICENSE.md">BSD licensed</a> code. Designed & built in Brighton, England.</i></p>
+
+[sqlalchemy-core]: https://docs.sqlalchemy.org/en/latest/core/
+[sqlalchemy-core-tutorial]: https://docs.sqlalchemy.org/en/latest/core/tutorial.html
+[alembic]: https://alembic.sqlalchemy.org/en/latest/
+[psycopg2]: https://www.psycopg.org/
+[pymysql]: https://github.com/PyMySQL/PyMySQL
+[asyncpg]: https://github.com/MagicStack/asyncpg
+[aiopg]: https://github.com/aio-libs/aiopg
+[aiomysql]: https://github.com/aio-libs/aiomysql
+[asyncmy]: https://github.com/long2ice/asyncmy
+[aiosqlite]: https://github.com/omnilib/aiosqlite
+
+[starlette]: https://github.com/encode/starlette
+[sanic]: https://github.com/huge-success/sanic
+[responder]: https://github.com/kennethreitz/responder
+[quart]: https://gitlab.com/pgjones/quart
+[aiohttp]: https://github.com/aio-libs/aiohttp
+[tornado]: https://github.com/tornadoweb/tornado
+[fastapi]: https://github.com/tiangolo/fastapi
diff --git a/databases.egg-info/PKG-INFO b/databases.egg-info/PKG-INFO
index f22fe85..41f9b5f 100644
--- a/databases.egg-info/PKG-INFO
+++ b/databases.egg-info/PKG-INFO
@@ -6,126 +6,6 @@ Home-page: https://github.com/encode/databases
 Author: Tom Christie
 Author-email: tom@tomchristie.com
 License: BSD
-Description: # Databases
-        
-        <p>
-        <a href="https://github.com/encode/databases/actions">
-            <img src="https://github.com/encode/databases/workflows/Test%20Suite/badge.svg" alt="Test Suite">
-        </a>
-        <a href="https://pypi.org/project/databases/">
-            <img src="https://badge.fury.io/py/databases.svg" alt="Package version">
-        </a>
-        </p>
-        
-        Databases gives you simple asyncio support for a range of databases.
-        
-        It allows you to make queries using the powerful [SQLAlchemy Core][sqlalchemy-core]
-        expression language, and provides support for PostgreSQL, MySQL, and SQLite.
-        
-        Databases is suitable for integrating against any async Web framework, such as [Starlette][starlette],
-        [Sanic][sanic], [Responder][responder], [Quart][quart], [aiohttp][aiohttp], [Tornado][tornado], or [FastAPI][fastapi].
-        
-        **Documentation**: [https://www.encode.io/databases/](https://www.encode.io/databases/)
-        
-        **Requirements**: Python 3.7+
-        
-        ---
-        
-        ## Installation
-        
-        ```shell
-        $ pip install databases
-        ```
-        
-        Database drivers supported are:
-        
-        * [asyncpg][asyncpg]
-        * [aiopg][aiopg]
-        * [aiomysql][aiomysql]
-        * [asyncmy][asyncmy]
-        * [aiosqlite][aiosqlite]
-        
-        You can install the required database drivers with:
-        
-        ```shell
-        $ pip install databases[asyncpg]
-        $ pip install databases[aiopg]
-        $ pip install databases[aiomysql]
-        $ pip install databases[asyncmy]
-        $ pip install databases[aiosqlite]
-        ```
-        
-        Note that if you are using any synchronous SQLAlchemy functions such as `engine.create_all()` or [alembic][alembic] migrations then you still have to install a synchronous DB driver: [psycopg2][psycopg2] for PostgreSQL and [pymysql][pymysql] for MySQL.
-        
-        ---
-        
-        ## Quickstart
-        
-        For this example we'll create a very simple SQLite database to run some
-        queries against.
-        
-        ```shell
-        $ pip install databases[aiosqlite]
-        $ pip install ipython
-        ```
-        
-        We can now run a simple example from the console.
-        
-        Note that we want to use `ipython` here, because it supports using `await`
-        expressions directly from the console.
-        
-        ```python
-        # Create a database instance, and connect to it.
-        from databases import Database
-        database = Database('sqlite+aiosqlite:///example.db')
-        await database.connect()
-        
-        # Create a table.
-        query = """CREATE TABLE HighScores (id INTEGER PRIMARY KEY, name VARCHAR(100), score INTEGER)"""
-        await database.execute(query=query)
-        
-        # Insert some data.
-        query = "INSERT INTO HighScores(name, score) VALUES (:name, :score)"
-        values = [
-            {"name": "Daisy", "score": 92},
-            {"name": "Neil", "score": 87},
-            {"name": "Carol", "score": 43},
-        ]
-        await database.execute_many(query=query, values=values)
-        
-        # Run a database query.
-        query = "SELECT * FROM HighScores"
-        rows = await database.fetch_all(query=query)
-        print('High Scores:', rows)
-        ```
-        
-        Check out the documentation on [making database queries](https://www.encode.io/databases/database_queries/)
-        for examples of how to start using databases together with SQLAlchemy core expressions.
-        
-        
-        <p align="center">&mdash; ⭐️ &mdash;</p>
-        <p align="center"><i>Databases is <a href="https://github.com/encode/databases/blob/master/LICENSE.md">BSD licensed</a> code. Designed & built in Brighton, England.</i></p>
-        
-        [sqlalchemy-core]: https://docs.sqlalchemy.org/en/latest/core/
-        [sqlalchemy-core-tutorial]: https://docs.sqlalchemy.org/en/latest/core/tutorial.html
-        [alembic]: https://alembic.sqlalchemy.org/en/latest/
-        [psycopg2]: https://www.psycopg.org/
-        [pymysql]: https://github.com/PyMySQL/PyMySQL
-        [asyncpg]: https://github.com/MagicStack/asyncpg
-        [aiopg]: https://github.com/aio-libs/aiopg
-        [aiomysql]: https://github.com/aio-libs/aiomysql
-        [asyncmy]: https://github.com/long2ice/asyncmy
-        [aiosqlite]: https://github.com/omnilib/aiosqlite
-        
-        [starlette]: https://github.com/encode/starlette
-        [sanic]: https://github.com/huge-success/sanic
-        [responder]: https://github.com/kennethreitz/responder
-        [quart]: https://gitlab.com/pgjones/quart
-        [aiohttp]: https://github.com/aio-libs/aiohttp
-        [tornado]: https://github.com/tornadoweb/tornado
-        [fastapi]: https://github.com/tiangolo/fastapi
-        
-Platform: UNKNOWN
 Classifier: Development Status :: 3 - Alpha
 Classifier: Environment :: Web Environment
 Classifier: Intended Audience :: Developers
@@ -140,11 +20,131 @@ Classifier: Programming Language :: Python :: 3.10
 Classifier: Programming Language :: Python :: 3 :: Only
 Requires-Python: >=3.7
 Description-Content-Type: text/markdown
-Provides-Extra: postgresql
-Provides-Extra: asyncpg
-Provides-Extra: aiopg
-Provides-Extra: mysql
 Provides-Extra: aiomysql
+Provides-Extra: aiopg
+Provides-Extra: aiosqlite
 Provides-Extra: asyncmy
+Provides-Extra: asyncpg
+Provides-Extra: mysql
+Provides-Extra: postgresql
 Provides-Extra: sqlite
-Provides-Extra: aiosqlite
+License-File: LICENSE.md
+
+# Databases
+
+<p>
+<a href="https://github.com/encode/databases/actions">
+    <img src="https://github.com/encode/databases/workflows/Test%20Suite/badge.svg" alt="Test Suite">
+</a>
+<a href="https://pypi.org/project/databases/">
+    <img src="https://badge.fury.io/py/databases.svg" alt="Package version">
+</a>
+</p>
+
+Databases gives you simple asyncio support for a range of databases.
+
+It allows you to make queries using the powerful [SQLAlchemy Core][sqlalchemy-core]
+expression language, and provides support for PostgreSQL, MySQL, and SQLite.
+
+Databases is suitable for integrating against any async Web framework, such as [Starlette][starlette],
+[Sanic][sanic], [Responder][responder], [Quart][quart], [aiohttp][aiohttp], [Tornado][tornado], or [FastAPI][fastapi].
+
+**Documentation**: [https://www.encode.io/databases/](https://www.encode.io/databases/)
+
+**Requirements**: Python 3.7+
+
+---
+
+## Installation
+
+```shell
+$ pip install databases
+```
+
+Database drivers supported are:
+
+* [asyncpg][asyncpg]
+* [aiopg][aiopg]
+* [aiomysql][aiomysql]
+* [asyncmy][asyncmy]
+* [aiosqlite][aiosqlite]
+
+You can install the required database drivers with:
+
+```shell
+$ pip install databases[asyncpg]
+$ pip install databases[aiopg]
+$ pip install databases[aiomysql]
+$ pip install databases[asyncmy]
+$ pip install databases[aiosqlite]
+```
+
+Note that if you are using any synchronous SQLAlchemy functions such as `engine.create_all()` or [alembic][alembic] migrations then you still have to install a synchronous DB driver: [psycopg2][psycopg2] for PostgreSQL and [pymysql][pymysql] for MySQL.
+
+---
+
+## Quickstart
+
+For this example we'll create a very simple SQLite database to run some
+queries against.
+
+```shell
+$ pip install databases[aiosqlite]
+$ pip install ipython
+```
+
+We can now run a simple example from the console.
+
+Note that we want to use `ipython` here, because it supports using `await`
+expressions directly from the console.
+
+```python
+# Create a database instance, and connect to it.
+from databases import Database
+database = Database('sqlite+aiosqlite:///example.db')
+await database.connect()
+
+# Create a table.
+query = """CREATE TABLE HighScores (id INTEGER PRIMARY KEY, name VARCHAR(100), score INTEGER)"""
+await database.execute(query=query)
+
+# Insert some data.
+query = "INSERT INTO HighScores(name, score) VALUES (:name, :score)"
+values = [
+    {"name": "Daisy", "score": 92},
+    {"name": "Neil", "score": 87},
+    {"name": "Carol", "score": 43},
+]
+await database.execute_many(query=query, values=values)
+
+# Run a database query.
+query = "SELECT * FROM HighScores"
+rows = await database.fetch_all(query=query)
+print('High Scores:', rows)
+```
+
+Check out the documentation on [making database queries](https://www.encode.io/databases/database_queries/)
+for examples of how to start using databases together with SQLAlchemy core expressions.
+
+
+<p align="center">&mdash; ⭐️ &mdash;</p>
+<p align="center"><i>Databases is <a href="https://github.com/encode/databases/blob/master/LICENSE.md">BSD licensed</a> code. Designed & built in Brighton, England.</i></p>
+
+[sqlalchemy-core]: https://docs.sqlalchemy.org/en/latest/core/
+[sqlalchemy-core-tutorial]: https://docs.sqlalchemy.org/en/latest/core/tutorial.html
+[alembic]: https://alembic.sqlalchemy.org/en/latest/
+[psycopg2]: https://www.psycopg.org/
+[pymysql]: https://github.com/PyMySQL/PyMySQL
+[asyncpg]: https://github.com/MagicStack/asyncpg
+[aiopg]: https://github.com/aio-libs/aiopg
+[aiomysql]: https://github.com/aio-libs/aiomysql
+[asyncmy]: https://github.com/long2ice/asyncmy
+[aiosqlite]: https://github.com/omnilib/aiosqlite
+
+[starlette]: https://github.com/encode/starlette
+[sanic]: https://github.com/huge-success/sanic
+[responder]: https://github.com/kennethreitz/responder
+[quart]: https://gitlab.com/pgjones/quart
+[aiohttp]: https://github.com/aio-libs/aiohttp
+[tornado]: https://github.com/tornadoweb/tornado
+[fastapi]: https://github.com/tiangolo/fastapi
diff --git a/databases.egg-info/SOURCES.txt b/databases.egg-info/SOURCES.txt
index ae54df9..e5eca5a 100644
--- a/databases.egg-info/SOURCES.txt
+++ b/databases.egg-info/SOURCES.txt
@@ -1,3 +1,4 @@
+LICENSE.md
 README.md
 setup.cfg
 setup.py
diff --git a/databases/backends/aiopg.py b/databases/backends/aiopg.py
index 1d35749..8668b2b 100644
--- a/databases/backends/aiopg.py
+++ b/databases/backends/aiopg.py
@@ -104,7 +104,7 @@ class AiopgConnection(ConnectionBackend):
     def __init__(self, database: AiopgBackend, dialect: Dialect):
         self._database = database
         self._dialect = dialect
-        self._connection = None  # type: typing.Optional[aiopg.Connection]
+        self._connection: typing.Optional[aiopg.Connection] = None
 
     async def acquire(self) -> None:
         assert self._connection is None, "Connection is already acquired"
diff --git a/databases/backends/asyncmy.py b/databases/backends/asyncmy.py
index 233d2e0..749e5af 100644
--- a/databases/backends/asyncmy.py
+++ b/databases/backends/asyncmy.py
@@ -92,7 +92,7 @@ class AsyncMyConnection(ConnectionBackend):
     def __init__(self, database: AsyncMyBackend, dialect: Dialect):
         self._database = database
         self._dialect = dialect
-        self._connection = None  # type: typing.Optional[asyncmy.Connection]
+        self._connection: typing.Optional[asyncmy.Connection] = None
 
     async def acquire(self) -> None:
         assert self._connection is None, "Connection is already acquired"
diff --git a/databases/backends/mysql.py b/databases/backends/mysql.py
index c7ac9f4..6b86042 100644
--- a/databases/backends/mysql.py
+++ b/databases/backends/mysql.py
@@ -92,7 +92,7 @@ class MySQLConnection(ConnectionBackend):
     def __init__(self, database: MySQLBackend, dialect: Dialect):
         self._database = database
         self._dialect = dialect
-        self._connection = None  # type: typing.Optional[aiomysql.Connection]
+        self._connection: typing.Optional[aiomysql.Connection] = None
 
     async def acquire(self) -> None:
         assert self._connection is None, "Connection is already acquired"
diff --git a/databases/backends/postgres.py b/databases/backends/postgres.py
index 3e1a6ff..e30c12d 100644
--- a/databases/backends/postgres.py
+++ b/databases/backends/postgres.py
@@ -45,7 +45,7 @@ class PostgresBackend(DatabaseBackend):
     def _get_connection_kwargs(self) -> dict:
         url_options = self._database_url.options
 
-        kwargs = {}  # type: typing.Dict[str, typing.Any]
+        kwargs: typing.Dict[str, typing.Any] = {}
         min_size = url_options.get("min_size")
         max_size = url_options.get("max_size")
         ssl = url_options.get("ssl")
@@ -162,7 +162,7 @@ class PostgresConnection(ConnectionBackend):
     def __init__(self, database: PostgresBackend, dialect: Dialect):
         self._database = database
         self._dialect = dialect
-        self._connection = None  # type: typing.Optional[asyncpg.connection.Connection]
+        self._connection: typing.Optional[asyncpg.connection.Connection] = None
 
     async def acquire(self) -> None:
         assert self._connection is None, "Connection is already acquired"
@@ -305,9 +305,7 @@ class PostgresConnection(ConnectionBackend):
 class PostgresTransaction(TransactionBackend):
     def __init__(self, connection: PostgresConnection):
         self._connection = connection
-        self._transaction = (
-            None
-        )  # type: typing.Optional[asyncpg.transaction.Transaction]
+        self._transaction: typing.Optional[asyncpg.transaction.Transaction] = None
 
     async def start(
         self, is_root: bool, extra_options: typing.Dict[typing.Any, typing.Any]
diff --git a/databases/backends/sqlite.py b/databases/backends/sqlite.py
index 69ef5b5..1946462 100644
--- a/databases/backends/sqlite.py
+++ b/databases/backends/sqlite.py
@@ -80,7 +80,7 @@ class SQLiteConnection(ConnectionBackend):
     def __init__(self, pool: SQLitePool, dialect: Dialect):
         self._pool = pool
         self._dialect = dialect
-        self._connection = None  # type: typing.Optional[aiosqlite.Connection]
+        self._connection: typing.Optional[aiosqlite.Connection] = None
 
     async def acquire(self) -> None:
         assert self._connection is None, "Connection is already acquired"
diff --git a/databases/core.py b/databases/core.py
index 8415b83..8394ab5 100644
--- a/databases/core.py
+++ b/databases/core.py
@@ -64,12 +64,12 @@ class Database:
         self._backend = backend_cls(self.url, **self.options)
 
         # Connections are stored as task-local state.
-        self._connection_context = ContextVar("connection_context")  # type: ContextVar
+        self._connection_context: ContextVar = ContextVar("connection_context")
 
         # When `force_rollback=True` is used, we use a single global
         # connection, within a transaction that always rolls back.
-        self._global_connection = None  # type: typing.Optional[Connection]
-        self._global_transaction = None  # type: typing.Optional[Transaction]
+        self._global_connection: typing.Optional[Connection] = None
+        self._global_transaction: typing.Optional[Transaction] = None
 
     async def connect(self) -> None:
         """
@@ -223,7 +223,7 @@ class Connection:
         self._connection_counter = 0
 
         self._transaction_lock = asyncio.Lock()
-        self._transaction_stack = []  # type: typing.List[Transaction]
+        self._transaction_stack: typing.List[Transaction] = []
 
         self._query_lock = asyncio.Lock()
 
diff --git a/debian/changelog b/debian/changelog
index aec4303..bc5dcde 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+python-databases (0.7.0+git20221227.1.77d9b8a-1) UNRELEASED; urgency=low
+
+  * New upstream snapshot.
+
+ -- Debian Janitor <janitor@jelmer.uk>  Sat, 31 Dec 2022 01:33:32 -0000
+
 python-databases (0.7.0-1) unstable; urgency=medium
 
   [ Debian Janitor ]

Debdiff

File lists identical (after any substitutions)

No differences were encountered in the control files

More details

Full run details