Skip to content

Commit c1d9f73

Browse files
author
James William Pye
committed
Rename pgpass to pgpassfile.
1 parent 0d3c6c7 commit c1d9f73

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

postgresql/clientparams.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"""
1212
import sys
1313
import os
14-
import postgresql.pgpass as pgpass
14+
from . import pgpassfile as pgpass
1515

1616
try:
1717
from getpass import getuser, getpass

postgresql/test/test_pgpass.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
# http://python.projects.postgresql.org
44
##
55
import unittest
6-
import postgresql.pgpass as client_pgpass
7-
from StringIO import StringIO
6+
from .. import pgpass as client_pgpass
7+
from io import StringIO
88

99
passfile_sample = """
1010
host:1111:dbname:user:password1
@@ -47,7 +47,7 @@ def runTest(self):
4747
sample1 = client_pgpass.parse(StringIO(passfile_sample))
4848
sample2 = client_pgpass.parse(StringIO(difficult_passfile_sample))
4949

50-
for k, pw in passfile_sample_map.iteritems():
50+
for k, pw in passfile_sample_map.items():
5151
lpw = client_pgpass.lookup_password(sample1, k)
5252
self.failUnless(lpw == pw,
5353
"password lookup incongruity, expecting %r got %r with %r"
@@ -56,7 +56,7 @@ def runTest(self):
5656
)
5757
)
5858

59-
for k, pw in difficult_passfile_sample_map.iteritems():
59+
for k, pw in difficult_passfile_sample_map.items():
6060
lpw = client_pgpass.lookup_password(sample2, k)
6161
self.failUnless(lpw == pw,
6262
"password lookup incongruity, expecting %r got %r with %r"

0 commit comments

Comments
 (0)