Skip to content

Commit 84751b8

Browse files
authored
Merge pull request #44 from qaspen-python/feature/chain_create_pool
Implemented `ConnectionPoolBuilder` for chainable pool creation.
2 parents 7081eea + 6d8d379 commit 84751b8

File tree

11 files changed

+762
-16
lines changed

11 files changed

+762
-16
lines changed

Cargo.lock

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ name = "psqlpy"
99
crate-type = ["cdylib"]
1010

1111
[dependencies]
12-
deadpool-postgres = { git = "https://github.com/chandr-andr/deadpool.git", version = "0.13.0" }
12+
deadpool-postgres = { git = "https://github.com/chandr-andr/deadpool.git", branch = "master" }
1313
pyo3 = { version = "*", features = ["chrono", "experimental-async"] }
1414
pyo3-asyncio = { git = "https://github.com/chandr-andr/pyo3-asyncio.git", version = "0.20.0", features = [
1515
"tokio-runtime",
@@ -24,13 +24,13 @@ uuid = { version = "1.7.0", features = ["v4"] }
2424
serde_json = "1.0.113"
2525
futures-util = "0.3.30"
2626
macaddr = "1.0.1"
27-
tokio-postgres = { git = "https://github.com/chandr-andr/rust-postgres.git", version = "0.7.10", features = [
27+
tokio-postgres = { git = "https://github.com/chandr-andr/rust-postgres.git", branch = "master", features = [
2828
"with-serde_json-1",
2929
"array-impls",
3030
"with-chrono-0_4",
3131
"with-uuid-1",
3232
] }
33-
postgres-types = { git = "https://github.com/chandr-andr/rust-postgres.git", version = "0.2.6", features = [
33+
postgres-types = { git = "https://github.com/chandr-andr/rust-postgres.git", branch = "master", features = [
3434
"derive",
3535
] }
36-
postgres-protocol = { git = "https://github.com/chandr-andr/rust-postgres.git", version = "*" }
36+
postgres-protocol = { git = "https://github.com/chandr-andr/rust-postgres.git", branch = "master" }

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ profile = "black"
5353
multi_line_output = 3
5454

5555
[tool.black]
56-
line-length = 89
56+
line-length = 120
5757

5858
[tool.mypy]
5959
strict = true
@@ -113,7 +113,7 @@ ignore = [
113113
]
114114
exclude = [".venv/"]
115115
mccabe = { max-complexity = 10 }
116-
line-length = 89
116+
line-length = 120
117117

118118
[tool.ruff.per-file-ignores]
119119
"python/psqlpy/*" = ["PYI021"]

python/psqlpy/__init__.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
11
from psqlpy._internal import (
22
Connection,
33
ConnectionPool,
4+
ConnectionPoolBuilder,
45
ConnRecyclingMethod,
56
Cursor,
67
IsolationLevel,
8+
KeepaliveConfig,
79
LoadBalanceHosts,
810
QueryResult,
911
ReadVariant,
1012
SingleQueryResult,
13+
SslMode,
1114
TargetSessionAttrs,
1215
Transaction,
1316
connect,
@@ -26,4 +29,7 @@
2629
"connect",
2730
"LoadBalanceHosts",
2831
"TargetSessionAttrs",
32+
"SslMode",
33+
"KeepaliveConfig",
34+
"ConnectionPoolBuilder",
2935
]

0 commit comments

Comments
 (0)