Added support for parsing the Postgresql version string for
a development version like "PostgreSQL 10devel". Pull request
courtesy Sean McCully.
Change-Id: I7bc18bc4d290349c23e9796367b7d694d0873096
Pull-request: https://github.com/zzzeek/sqlalchemy/pull/351
(cherry picked from commit
a86764d99b3a440cdc27b437ef2de9d393ca8036)
.. changelog::
:version: 1.1.8
+ .. change::
+ :tags: bug, postgresql
+ :versions: 1.2.0b1
+
+ Added support for parsing the Postgresql version string for
+ a development version like "PostgreSQL 10devel". Pull request
+ courtesy Sean McCully.
+
.. changelog::
:version: 1.1.7
:released: March 27, 2017
v = connection.execute("select version()").scalar()
m = re.match(
r'.*(?:PostgreSQL|EnterpriseDB) '
- r'(\d+)\.(\d+)(?:\.(\d+))?(?:\.\d+)?(?:devel)?',
+ r'(\d+)\.?(\d+)?(?:\.(\d+))?(?:\.\d+)?(?:devel)?',
v)
if not m:
raise AssertionError(
'64-bit', (9, 1, 2)),
(
'[PostgreSQL 9.2.4 ] VMware vFabric Postgres 9.2.4.0 '
- 'release build 1080137', (9, 2, 4))]:
+ 'release build 1080137', (9, 2, 4)),
+ (
+ 'PostgreSQL 10devel on x86_64-pc-linux-gnu'
+ 'compiled by gcc (GCC) 6.3.1 20170306, 64-bit', (10,))]:
eq_(testing.db.dialect._get_server_version_info(mock_conn(string)),
version)