pgbelt 0.7.3__py3-none-any.whl → 0.7.4__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
pgbelt/config/models.py CHANGED
@@ -10,6 +10,7 @@ from pgbelt.util.asyncfuncs import makedirs
10
10
  from pydantic import BaseModel
11
11
  from pydantic import ValidationError
12
12
  from pydantic import field_validator
13
+ from urllib.parse import quote
13
14
 
14
15
 
15
16
  def config_dir(db: str, dc: str) -> str:
@@ -86,15 +87,24 @@ class DbConfig(BaseModel):
86
87
 
87
88
  @property
88
89
  def root_uri(self) -> str:
89
- return f"postgresql://{self.root_user.name}:{self.root_user.pw}@{self.ip}:{self.port}/{self.db}"
90
+ password = quote(
91
+ self.root_user.pw
92
+ ) # https://github.com/encode/databases/issues/145#issuecomment-1303792343 need this to handle special characters
93
+ return f"postgresql://{self.root_user.name}:{password}@{self.ip}:{self.port}/{self.db}"
90
94
 
91
95
  @property
92
96
  def owner_uri(self) -> str:
93
- return f"postgresql://{self.owner_user.name}:{self.owner_user.pw}@{self.ip}:{self.port}/{self.db}"
97
+ password = quote(
98
+ self.owner_user.pw
99
+ ) # https://github.com/encode/databases/issues/145#issuecomment-1303792343 need this to handle special characters
100
+ return f"postgresql://{self.owner_user.name}:{password}@{self.ip}:{self.port}/{self.db}"
94
101
 
95
102
  @property
96
103
  def pglogical_uri(self) -> str:
97
- return f"postgresql://{self.pglogical_user.name}:{self.pglogical_user.pw}@{self.ip}:{self.port}/{self.db}"
104
+ password = quote(
105
+ self.pglogical_user.pw
106
+ ) # https://github.com/encode/databases/issues/145#issuecomment-1303792343 need this to handle special characters
107
+ return f"postgresql://{self.pglogical_user.name}:{password}@{self.ip}:{self.port}/{self.db}"
98
108
 
99
109
 
100
110
  class DbupgradeConfig(BaseModel):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pgbelt
3
- Version: 0.7.3
3
+ Version: 0.7.4
4
4
  Summary: A CLI tool used to manage Postgres data migrations from beginning to end, for a single database or a fleet, leveraging pglogical replication.
5
5
  Author: Varjitt Jeeva
6
6
  Author-email: varjitt.jeeva@autodesk.com
@@ -11,7 +11,7 @@ pgbelt/cmd/sync.py,sha256=8TSNbn1dpkyxlEMImY7FjOrzhriSXlorqE-HBjqbUfU,9027
11
11
  pgbelt/cmd/teardown.py,sha256=TTSmhmD1bqJ8-P5YyK5ZpCsmneczO0nvd2Q2s2oyXY4,3526
12
12
  pgbelt/config/__init__.py,sha256=SXok1aZcpMYJpX_hk5cuKO33CJ5s8IESkswNN9KsVSo,35
13
13
  pgbelt/config/config.py,sha256=Kw2H-G1Evfj0TXIbh3k06gE72dZEp_wXWJ2Icq_T54c,3817
14
- pgbelt/config/models.py,sha256=4MeeQ_puAZtMVix8Cj5GNCtYTUWn5lHHijS82yhD4mg,5816
14
+ pgbelt/config/models.py,sha256=YnsBYAa5hC-hcrbgd0-rYcpYYc4oU-cq7sRy0RsudY0,6357
15
15
  pgbelt/config/remote.py,sha256=D9bOekVfMU1xX2Wy0OiJwSXetxJUdt9Tn5Fukwn9rnE,5307
16
16
  pgbelt/main.py,sha256=YiagBiGt8pbNlukkRxROXnQX1Tx6ax7c6riuHRCrPYU,186
17
17
  pgbelt/util/__init__.py,sha256=-6KkvVMz-yGNQfeoo4CZZrgWKXYmFd4CMyoiao8OnFE,40
@@ -20,8 +20,8 @@ pgbelt/util/dump.py,sha256=AwyOAd9CP014gvsl-qlo1lbnXZfxoeN4ujZWUIq7KM8,14715
20
20
  pgbelt/util/logs.py,sha256=l2jT-WKZ-33eNDw4S4W1_eE4ISo4rtDRXYLVf4QTV4Y,1699
21
21
  pgbelt/util/pglogical.py,sha256=Y6KZBeiH85zhNSvhATqh0xozhfUMyQnPWN1HwRosZFo,13613
22
22
  pgbelt/util/postgres.py,sha256=jNMYhkb4OHYhNzDu7Fppz8wrXogAw1XxVhxdBA2e6cI,19270
23
- pgbelt-0.7.3.dist-info/LICENSE,sha256=FQ5cFkW02dKK3LmKH8z-rwn93tWSCh7lsxfNUiWcFsg,10758
24
- pgbelt-0.7.3.dist-info/METADATA,sha256=DmeWJ6E8SdjC36sTp8qPHC73_6LWd5GSqN2tdW_BoWI,2960
25
- pgbelt-0.7.3.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
26
- pgbelt-0.7.3.dist-info/entry_points.txt,sha256=SCz_poPjkaVnWpJ-CeytAnDzbVc6l0WalOwitIqW_3g,40
27
- pgbelt-0.7.3.dist-info/RECORD,,
23
+ pgbelt-0.7.4.dist-info/LICENSE,sha256=FQ5cFkW02dKK3LmKH8z-rwn93tWSCh7lsxfNUiWcFsg,10758
24
+ pgbelt-0.7.4.dist-info/METADATA,sha256=9sf3BPo7Iq4P2yIpeDbA8ArZUKhg6Yo29V5fTuixQE4,2960
25
+ pgbelt-0.7.4.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
26
+ pgbelt-0.7.4.dist-info/entry_points.txt,sha256=SCz_poPjkaVnWpJ-CeytAnDzbVc6l0WalOwitIqW_3g,40
27
+ pgbelt-0.7.4.dist-info/RECORD,,
File without changes