Skip to content
Merged
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
2 changes: 1 addition & 1 deletion parsl/monitoring/db_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def __init__(self,

def _get_mapper(self, table_obj: Table) -> Mapper:
all_mappers: Set[Mapper] = set()
for mapper_registry in mapperlib._all_registries(): # type: ignore[attr-defined]
for mapper_registry in mapperlib._all_registries():
all_mappers.update(mapper_registry.mappers)
mapper_gen = (
mapper for mapper in all_mappers
Expand Down
4 changes: 2 additions & 2 deletions parsl/tests/test_monitoring/test_app_names.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def test_app_name(get_app, expected_name, expected_result, tmpd_cwd):
with engine.begin() as connection:

def count_rows(table: str):
result = connection.execute(f"SELECT COUNT(*) FROM {table}")
result = connection.execute(sqlalchemy.text(f"SELECT COUNT(*) FROM {table}"))
(c, ) = result.first()
return c

Expand All @@ -81,6 +81,6 @@ def count_rows(table: str):
assert count_rows("try") == 1

# ... and has the expected name.
result = connection.execute("SELECT task_func_name FROM task")
result = connection.execute(sqlalchemy.text("SELECT task_func_name FROM task"))
(c, ) = result.first()
assert c == expected_name
4 changes: 2 additions & 2 deletions parsl/tests/test_monitoring/test_stdouterr.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def test_stdstream_to_monitoring(stdx, expected_stdx, stream, tmpd_cwd, caplog):
with engine.begin() as connection:

def count_rows(table: str):
result = connection.execute(f"SELECT COUNT(*) FROM {table}")
result = connection.execute(sqlalchemy.text(f"SELECT COUNT(*) FROM {table}"))
(c, ) = result.first()
return c

Expand All @@ -120,7 +120,7 @@ def count_rows(table: str):
assert count_rows("try") == 1

# ... and has the expected name.
result = connection.execute(f"SELECT task_{stream} FROM task")
result = connection.execute(sqlalchemy.text(f"SELECT task_{stream} FROM task"))
(c, ) = result.first()

if isinstance(expected_stdx, str):
Expand Down
4 changes: 3 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@

extras_require = {
'monitoring' : [
'sqlalchemy>=1.4,<2'
# sqlalchemy does not use semantic versioning.
# see https://github.com/sqlalchemy/sqlalchemy/discussions/11391#discussioncomment-9472033
'sqlalchemy>=2,<2.1'
],
'visualization' : [
# this pydot bound is copied from networkx's pyproject.toml,
Expand Down
3 changes: 1 addition & 2 deletions test-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ mpi4py
# sqlalchemy is needed for typechecking, so it's here
# as well as at runtime for optional monitoring execution
# (where it's specified in setup.py)
sqlalchemy>=1.4,<2
sqlalchemy2-stubs
sqlalchemy>=2,<2.1

Sphinx==4.5.0
twine
Expand Down