Skip to content

Commit bd7d3f8

Browse files
authored
Merge pull request #1406 from procrastinate-org/upgrade
2 parents 34a520c + 0b111cf commit bd7d3f8

File tree

4 files changed

+228
-220
lines changed

4 files changed

+228
-220
lines changed

.pre-commit-config.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ repos:
3030
- id: mixed-line-ending
3131

3232
- repo: https://github.com/RobertCraigie/pyright-python
33-
rev: v1.1.400
33+
rev: v1.1.401
3434
hooks:
3535
- id: pyright
3636
additional_dependencies:
@@ -66,7 +66,7 @@ repos:
6666
- jinja2==3.1.6
6767
- markupsafe==3.0.2
6868
- packaging==25.0
69-
- psycopg==3.2.8
69+
- psycopg==3.2.9
7070
- psycopg-pool==3.2.6
7171
- psycopg2-binary==2.9.10
7272
- pygments==2.19.1
@@ -85,16 +85,16 @@ repos:
8585
- sphinxcontrib-jsmath==1.0.1
8686
- sphinxcontrib-qthelp==2.0.0
8787
- sphinxcontrib-serializinghtml==2.0.0
88-
- sqlalchemy==2.0.40
88+
- sqlalchemy==2.0.41
8989
- sqlparse==0.5.3
9090
- tomli==2.2.1 ; python_full_version < '3.11'
91-
- types-pyyaml==6.0.12.20250402
91+
- types-pyyaml==6.0.12.20250516
9292
- typing-extensions==4.13.2
9393
- tzdata==2025.2 ; sys_platform == 'win32'
9494
- urllib3==2.4.0
95-
- zipp==3.21.0 ; python_full_version < '3.10'
95+
- zipp==3.22.0 ; python_full_version < '3.10'
9696
- repo: https://github.com/astral-sh/ruff-pre-commit
97-
rev: v0.11.9
97+
rev: v0.11.12
9898
hooks:
9999
- id: ruff
100100
args: [--fix, --unsafe-fixes, --show-fixes]

procrastinate/contrib/sqlalchemy/psycopg2_connector.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
import psycopg2.errors
1010
import sqlalchemy
11+
import sqlalchemy.exc
1112
from psycopg2.extras import Json
1213

1314
from procrastinate import connector, exceptions, manager
@@ -20,7 +21,7 @@ def wrap_exceptions() -> Generator[None, None, None]:
2021
"""
2122
try:
2223
yield
23-
except sqlalchemy.exc.SQLAlchemyError as exc:
24+
except sqlalchemy.exc.StatementError as exc:
2425
if isinstance(exc.orig, psycopg2.errors.UniqueViolation):
2526
exc = exc.orig
2627
constraint_name = exc.diag.constraint_name
@@ -36,6 +37,8 @@ def wrap_exceptions() -> Generator[None, None, None]:
3637
constraint_name=constraint_name, queueing_lock=queueing_lock
3738
)
3839
raise exceptions.ConnectorException from exc
40+
except sqlalchemy.exc.SQLAlchemyError as exc:
41+
raise exceptions.ConnectorException from exc
3942

4043

4144
def wrap_query_exceptions(func: Callable) -> Callable:

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ filterwarnings = """
115115
error
116116
ignore:.+django.core.management.base.OutputWrapper:pytest.PytestUnraisableExceptionWarning
117117
ignore:unclosed.+:ResourceWarning
118+
ignore:pkg_resources is deprecated as an API:UserWarning
118119
"""
119120
asyncio_mode = "auto"
120121
asyncio_default_fixture_loop_scope = "function"

0 commit comments

Comments
 (0)