Skip to content

Commit

Permalink
Merge branch 'master' into dependabot/pip/pyspark-3.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
phenobarbital authored Dec 6, 2023
2 parents d27e26b + af48304 commit bc825f7
Show file tree
Hide file tree
Showing 13 changed files with 57 additions and 49 deletions.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ venv:
python3.10 -m venv .venv
echo 'run `source .venv/bin/activate` to start develop asyncDB'

setup:
pip install wheel==0.40.0
install:
pip install wheel==0.42.0
pip install -e .

develop:
pip install wheel==0.40.0
pip install wheel==0.42.0
pip install -e .[all]
pip install -Ur docs/requirements-dev.txt
flit install --symlink
Expand Down
3 changes: 2 additions & 1 deletion asyncdb/drivers/pg.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,8 @@ async def connect(self):
"application_name": self.application_name,
"idle_in_transaction_session_timeout": "60min",
"idle_session_timeout": "60min",
"max_parallel_workers": "512"
"statement_timeout": "60min",
"tcp_keepalives_idle": "30min"
}
server_settings = {**server_settings, **self._server_settings}
if self.ssl:
Expand Down
2 changes: 1 addition & 1 deletion asyncdb/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
__title__ = 'asyncdb'
__description__ = ('Library for Asynchronous data source connections '
'Collection of asyncio drivers.')
__version__ = '2.5.11'
__version__ = '2.6.0'
__author__ = 'Jesus Lara'
__author_email__ = '[email protected]'
__license__ = 'BSD'
16 changes: 10 additions & 6 deletions docs/requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
aiounittest==1.4.2
black==23.1.0
black==23.11.0
build==1.0.3
coverage[toml]==7.2.7
flit==3.9.0
hypothesis==6.68.0
ipython==8.10.0
hypothesis==6.91.0
ipython==8.14.0
lint==1.2.1
mypy==1.3.0
mypy==1.7.1
pylint==2.16.1
pyperf==2.6.2
pytest>=6.0.0
pytest-asyncio==0.21.1
pytest-asyncio==0.23.2
pytest-cov==4.0.0
pytest-cython==0.2.0
pytest-xdist==3.3.1
pytest-xdist==3.5.0
pytest-assume==2.4.3
sdist==0.0.0
sphinx==6.1.3
tox==4.6.4
twine==4.0.2
3 changes: 3 additions & 0 deletions examples/test_pg.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ async def connect(c):
sql = 'REFRESH MATERIALIZED VIEW epson.vw_form_data;'
result, error = await conn.execute(sql)
exec_time = (datetime.now() - start).total_seconds()
sql = 'TRUNCATE troc.employees_raw;'
result, error = await conn.execute(sql)
exec_time = (datetime.now() - start).total_seconds()

if not error:
print(result)
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[build-system]
requires = [
'setuptools==67.6.1',
'Cython==0.29.33',
'wheel==0.40.0'
'Cython==3.0.6',
'wheel==0.42.0'
]
build-backend = "setuptools.build_meta"

Expand Down
50 changes: 25 additions & 25 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ def readme():
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3 :: Only",
"Framework :: AsyncIO",
],
Expand All @@ -98,14 +99,14 @@ def readme():
license=__license__,
setup_requires=[
"setuptools==67.6.1",
"Cython==0.29.33",
"wheel==0.40.0"
"Cython==3.0.6",
"wheel==0.42.0"
],
install_requires=[
"numpy==1.24.2",
"cryptography==37.0.4",
"aiohttp==3.8.6",
"asyncpg==0.28.0",
"cryptography==41.0.7",
"aiohttp==3.9.1",
"asyncpg==0.29.0",
"uvloop==0.19.0",
"asyncio==3.4.3",
"faust-cchardet==2.1.18",
Expand All @@ -114,14 +115,13 @@ def readme():
"openpyxl==3.1.2",
"lz4==4.3.2",
"typing_extensions==4.8.0",
"urllib3==1.26.14",
"charset-normalizer>=2.0.7",
"ciso8601==2.3.0",
"iso8601==1.1.0",
"pgpy==0.6.0",
"python-magic==0.4.27",
"dateparser==1.1.8",
"python-datamodel>=0.2.1",
"python-datamodel>=0.5.0",
"aiosqlite>=0.18.0",
"pendulum==2.1.2"
],
Expand All @@ -134,18 +134,18 @@ def readme():
"cassandra-driver==3.28.0",
"rethinkdb==2.4.9",
"influxdb==5.3.1",
"influxdb-client[async]==1.36.1",
"influxdb-client[async]==1.39.0",
"pymssql==2.2.7",
"redis==4.5.5",
"redis==5.0.1",
"duckdb==0.8.1",
"deltalake==0.13.0"
],
"dataframe": [
"dask==2023.3.0",
"python-datatable==1.1.3",
"polars==0.19.12",
"pyarrow==13.0.0",
"connectorx==0.3.1",
"pyarrow==14.0.1",
"connectorx==0.3.2",
"pyspark==3.5.0",
"deltalake==0.13.0"
],
Expand All @@ -162,7 +162,7 @@ def readme():
"redis": [
"jsonpath-rw==1.4.0",
"jsonpath-rw-ext==1.2.2",
"redis==4.5.5",
"redis==5.0.1",
"aioredis==2.0.1",
"hiredis==2.2.3",
"objectpath==0.6.1",
Expand All @@ -175,26 +175,26 @@ def readme():
"psycopg-binary>=3.1.8",
],
"postgresql": [
"asyncpg==0.28.0",
"asyncpg==0.29.0",
],
"mysql": [
"asyncmy==0.2.7",
"mysqlclient==2.1.1"
],
"mariadb": [
"aiomysql==0.1.1"
"aiomysql==0.2.0"
],
"boto3": [
"botocore==1.29.76",
"aiobotocore==2.5.0",
"aioboto3==11.2.0"
"botocore==1.31.64",
"aiobotocore==2.7.0",
"aioboto3==12.0.0"
],
"cassandra": [
"cassandra-driver==3.28.0",
],
"influxdb": [
"influxdb==5.3.1",
"influxdb-client[async]==1.36.1",
"influxdb-client[async]==1.39.0",
],
"odbc": [
"aioodbc==0.3.3",
Expand Down Expand Up @@ -234,15 +234,15 @@ def readme():
"dask==2023.3.0",
"python-datatable==1.1.3",
"polars==0.19.12",
"pyarrow==13.0.0",
"connectorx==0.3.1",
"pyarrow==14.0.1",
"connectorx==0.3.2",
"aiosqlite>=0.18.0",
"pylibmc==1.6.3",
"aiomcache==0.8.1",
"jsonpath-rw==1.4.0",
"jsonpath-rw-ext==1.2.2",
"aioredis==2.0.1",
"redis==4.5.5",
"redis==5.0.1",
"objectpath==0.6.1",
"rethinkdb==2.4.9",
"aiopg==1.4.0",
Expand All @@ -261,15 +261,15 @@ def readme():
"aiocouch==2.2.2",
"asyncmy==0.2.7",
"mysqlclient==2.1.1",
"aiomysql==0.1.1",
"aiomysql==0.2.0",
"pyspark==3.5.0",
"oracledb==1.2.2",
"hazelcast-python-client==5.3.0",
"duckdb==0.8.1",
"deltalake==0.13.0",
"botocore==1.29.76",
"aiobotocore==2.5.0",
"aioboto3==11.2.0",
"botocore==1.31.64",
"aiobotocore==2.7.0",
"aioboto3==12.0.0",
"acsylla==0.1.8b0",
]
},
Expand Down
4 changes: 2 additions & 2 deletions tests/test_asyncpg.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@
from asyncdb.meta import Record, Recordset

DRIVER = 'pg'
DSN = "postgres://troc_pgdata:[email protected]:5432/navigator_dev"
DSN = "postgres://troc_pgdata:[email protected]:5432/navigator"
PARAMS = {
"host": '127.0.0.1',
"port": '5432',
"user": 'troc_pgdata',
"password": '12345678',
"database": 'navigator_dev'
"database": 'navigator'
}


Expand Down
4 changes: 2 additions & 2 deletions tests/test_basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def driver():

@pytest.fixture()
def dsn():
return "postgres://troc_pgdata:[email protected]:5432/navigator_dev"
return "postgres://troc_pgdata:[email protected]:5432/navigator"


@pytest.fixture()
Expand All @@ -23,7 +23,7 @@ def params():
"port": '5432',
"user": 'troc_pgdata',
"password": '12345678',
"database": 'navigator_dev'
"database": 'navigator'
}


Expand Down
4 changes: 2 additions & 2 deletions tests/test_dataclasses.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
'password': '12345678',
'host': 'localhost',
'port': '5432',
'database': 'navigator_dev',
'database': 'navigator',
}
DSN = "postgres://troc_pgdata:[email protected]:5432/navigator_dev"
DSN = "postgres://troc_pgdata:[email protected]:5432/navigator"


@pytest_asyncio.fixture
Expand Down
2 changes: 1 addition & 1 deletion tests/test_influx.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def params():
"host": "127.0.0.1",
"port": "8086",
"database": 'navigator',
"token": "qroJLmcrjM-IsDhxz-nR_NIoUxpjAgDz9AuXJJlTnikCIr70CNa_IxXlO5BID4LVrpHHCjzzeSr_UZab5ON_9A==",
"token": "FL2XDVzRheR9-apXJu0csK3HaBSjfEG3d15R9uIu8xG8WwL9ICAGyrPWLoPct4IHtacpjtKd1y3NbYbAFPs20g==",
"user": "troc_pgdata",
"password": "12345678",
"org": "navigator"
Expand Down
2 changes: 1 addition & 1 deletion tests/test_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ async def db():
"password": "12345678",
"host": "127.0.0.1",
"port": "5432",
"database": "navigator_dev",
"database": "navigator",
"DEBUG": True,
}
driver = AsyncDB("pg", params=params)
Expand Down
6 changes: 3 additions & 3 deletions tests/test_postgres.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
from asyncdb.meta import Record, Recordset

DRIVER = 'postgres'
DSN = "postgres://troc_pgdata:[email protected]:5432/navigator_dev"
DSN = "postgres://troc_pgdata:[email protected]:5432/navigator"
params = {
"host": '127.0.0.1',
"port": '5432',
"user": 'troc_pgdata',
"password": '12345678',
"database": 'navigator_dev'
"database": 'navigator'
}


Expand Down Expand Up @@ -61,7 +61,7 @@ async def test_pool_connect():
pytest.assume(not error)
pytest.assume(row[0] == 1)
prepared, error = await db.prepare("SELECT store_id, store_name FROM walmart.stores")
pytest.assume(db.get_columns() == ["store_id", "store_name"])
# pytest.assume(db.get_columns() == ["store_id", "store_name"])
assert not error
db.disconnect()
assert (not db.get_connection())
Expand Down

0 comments on commit bc825f7

Please sign in to comment.