Skip to content

Commit 62eccce

Browse files
Use cursor.connection for psycopg2 (#51)
1 parent 473d615 commit 62eccce

3 files changed

Lines changed: 8 additions & 2 deletions

File tree

CHANGELOG.md

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

3+
## 3.2.2 (2025-01-02)
4+
5+
#### Changes
6+
7+
- Use `cursor.connection` in psycopg2 to avoid issues caused by agents like NewRelic that wrap cursor objects by [@wesleykendall](https://github.com/wesleykendall) in [#51](https://github.com/AmbitionEng/django-pgbulk/pull/51).
8+
39
## 3.2.1 (2024-12-15)
410

511
#### Changes

pgbulk/core.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ def updated(self) -> List["Row"]:
149149
def _quote(field: str, cursor: "CursorWrapper") -> str:
150150
"""Quote identifiers."""
151151
if psycopg_maj_version == 2:
152-
return quote_ident(field, cursor.cursor) # type: ignore
152+
return quote_ident(field, cursor.connection) # type: ignore
153153
else:
154154
return (
155155
Escaping(cursor.connection.pgconn) # type: ignore

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ packages = [
2727
exclude = [
2828
"*/tests/"
2929
]
30-
version = "3.2.1"
30+
version = "3.2.2"
3131
description = "Native Postgres update, upsert, and copy operations."
3232
authors = ["Wes Kendall"]
3333
classifiers = [

0 commit comments

Comments
 (0)