Skip to content

Commit d3f6c71

Browse files
committed
bumped version
1 parent ef0aebe commit d3f6c71

File tree

5 files changed

+20
-6
lines changed

5 files changed

+20
-6
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# Changelog
22

3+
## v3.1.0 (2023-10-16)
4+
5+
### Updates
6+
7+
* updated class parameters
8+
* enabled support for async queries in `server_mode` (Linux only)
9+
* added additional tests
10+
311
## v3.0.0 (2023-10-11)
412

513
### Updates

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,4 +193,4 @@ To publish the package to PyPI, run the following command:
193193

194194
::
195195

196-
twine upload dist/pystackql-3.0.0.tar.gz
196+
twine upload dist/pystackql-3.1.0.tar.gz

docs/source/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
# The short X.Y version
2727
version = ''
2828
# The full version, including alpha/beta/rc tags
29-
release = '3.0.0'
29+
release = '3.1.0'
3030

3131

3232
# -- General configuration ---------------------------------------------------

pystackql/stackql.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
_get_version,
88
_format_auth
99
)
10-
import sys, subprocess, json, os, asyncio, functools, psycopg2
10+
import sys, subprocess, json, os, asyncio, functools, psycopg2, platform
1111
from concurrent.futures import ProcessPoolExecutor, ThreadPoolExecutor
1212
from psycopg2.extras import RealDictCursor
1313
import pandas as pd
@@ -539,22 +539,28 @@ async def executeQueriesAsync(self, queries):
539539
all the queries are returned as a list of JSON objects if 'dict' output mode is selected,
540540
or as a concatenated DataFrame if 'pandas' output mode is selected.
541541
542-
Note: The order of the results in the returned list or DataFrame may not necessarily
542+
The order of the results in the returned list or DataFrame may not necessarily
543543
correspond to the order of the queries in the input list due to the asynchronous nature
544544
of execution.
545545
546546
:param queries: A list of StackQL query strings to be executed concurrently.
547547
:type queries: list[str], required
548-
549548
:return: A list of results corresponding to each query. Each result is a JSON object or a DataFrame.
550549
:rtype: list[dict] or pd.DataFrame
550+
:raises ValueError: If method is used in `server_mode` on an unsupported OS (anything other than Linux).
551+
:raises ValueError: If an unsupported output mode is selected (anything other than 'dict' or 'pandas').
551552
552553
Example:
553554
>>> queries = [
554555
>>> "SELECT '%s' as region, instanceType, COUNT(*) as num_instances FROM aws.ec2.instances WHERE region = '%s' GROUP BY instanceType" % (region, region)
555556
>>> for region in regions ]
556557
>>> res = stackql.executeQueriesAsync(queries)
558+
559+
Note:
560+
- When operating in `server_mode`, this method is supported only on Linux systems.
557561
"""
562+
if self.server_mode and platform.system() != 'Linux':
563+
raise ValueError("executeQueriesAsync in sever_mode not supported on MacOS or Linux.")
558564
if self.output not in ['dict', 'pandas']:
559565
raise ValueError("executeQueriesAsync supports only 'dict' or 'pandas' output modes.")
560566
async def main():

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
setup(
1212
name='pystackql',
13-
version='3.0.0',
13+
version='3.1.0',
1414
description='A Python interface for StackQL',
1515
long_description=readme,
1616
author='Jeffrey Aven',

0 commit comments

Comments
 (0)