Skip to content

Commit b087511

Browse files
authored
Merge branch 'master' into aaliddell-patch-1
2 parents 18912e4 + 1d4325c commit b087511

File tree

5 files changed

+23
-6
lines changed

5 files changed

+23
-6
lines changed

.ci/travis-before-install.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ if [[ "${TRAVIS_OS_NAME}" == "linux" && "${BUILD}" == *wheels* ]]; then
2727
fi
2828
fi
2929

30-
sudo service postgresql start ${PGVERSION}
30+
sudo pg_ctlcluster ${PGVERSION} main restart
3131
fi
3232

3333
if [ "${TRAVIS_OS_NAME}" == "osx" ]; then

.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ matrix:
138138
# Also use this job to publish the releases and build
139139
# the documentation.
140140
- os: linux
141-
dist: xenial
141+
dist: bionic
142142
sudo: required
143143
language: python
144144
python: "3.6"

asyncpg/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,4 @@
3131
# snapshots will automatically include the git revision
3232
# in __version__, for example: '0.16.0.dev0+ge06ad03'
3333

34-
__version__ = '0.20.0'
34+
__version__ = '0.20.1'

tests/test_codecs.py

+19-2
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ def _system_timezone():
6969
decimal.Decimal("-1.00000000000000"),
7070
decimal.Decimal("-2.00000000000000"),
7171
decimal.Decimal("1000000000000000.00000000000000"),
72-
decimal.Decimal("-0.00000000000000"),
7372
decimal.Decimal(1234),
7473
decimal.Decimal(-1234),
7574
decimal.Decimal("1234000000.00088883231"),
@@ -111,7 +110,7 @@ def _system_timezone():
111110
decimal.Decimal("0.0"),
112111
decimal.Decimal("-1.0"),
113112
decimal.Decimal("1.0E-1000"),
114-
decimal.Decimal("1.0E1000"),
113+
decimal.Decimal("1E1000"),
115114
decimal.Decimal("0.000000000000000000000000001"),
116115
decimal.Decimal("0.000000000000010000000000001"),
117116
decimal.Decimal("0.00000000000000000000000001"),
@@ -141,6 +140,16 @@ def _system_timezone():
141140
decimal.Decimal("0.001"),
142141
decimal.Decimal("0.01"),
143142
decimal.Decimal("0.1"),
143+
decimal.Decimal("0.10"),
144+
decimal.Decimal("0.100"),
145+
decimal.Decimal("0.1000"),
146+
decimal.Decimal("0.10000"),
147+
decimal.Decimal("0.100000"),
148+
decimal.Decimal("0.00001000"),
149+
decimal.Decimal("0.000010000"),
150+
decimal.Decimal("0.0000100000"),
151+
decimal.Decimal("0.00001000000"),
152+
decimal.Decimal("1" + "0" * 117 + "." + "0" * 161)
144153
)),
145154
('bytea', 'bytea', (
146155
bytes(range(256)),
@@ -502,6 +511,14 @@ async def test_standard_codecs(self):
502511
else:
503512
self.assertEqual(result, outputval, err_msg)
504513

514+
if (typname == 'numeric' and
515+
isinstance(inputval, decimal.Decimal)):
516+
self.assertEqual(
517+
result.as_tuple(),
518+
outputval.as_tuple(),
519+
err_msg,
520+
)
521+
505522
with self.subTest(sample=None, typname=typname):
506523
# Test that None is handled for all types.
507524
rsample = await st.fetchval(None)

0 commit comments

Comments
 (0)