Lower psycopg2 dependency to >=2.5.1
Because 2.5.1 is the version available on RHEL/CentOS 7. This is done by replacing the use of psycopg2.sql module. Change-Id: Ie83ca2b3cd439649878517fa0fbc2a4381ad018d Closes-Bug: 1823095
This commit is contained in:
parent
c0d6c6c113
commit
593174028c
|
@ -24,10 +24,10 @@ from oslo_concurrency import lockutils
|
|||
from oslo_config import cfg
|
||||
from oslo_log import log as logging
|
||||
import psycopg2
|
||||
from psycopg2 import sql
|
||||
import requests
|
||||
|
||||
from congress.datasources import datasource_utils
|
||||
from congress.datasources.json_ingester import sql
|
||||
from congress import exception
|
||||
|
||||
|
||||
|
|
|
@ -25,12 +25,12 @@ from jsonpath_rw import parser
|
|||
from oslo_config import cfg
|
||||
from oslo_log import log as logging
|
||||
import psycopg2
|
||||
from psycopg2 import sql
|
||||
import requests
|
||||
|
||||
from congress.api import base as api_base
|
||||
from congress.datasources import datasource_driver
|
||||
from congress.datasources import datasource_utils
|
||||
from congress.datasources.json_ingester import sql
|
||||
from congress.dse2 import data_service
|
||||
from congress import exception
|
||||
|
||||
|
|
|
@ -0,0 +1,36 @@
|
|||
# Copyright (c) 2019 VMware, Inc. All rights reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
# not use this file except in compliance with the License. You may obtain
|
||||
# a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
'''
|
||||
This module provides a minimal implementation psycopg2.sql features used by
|
||||
Congress. The purpose is to avoid requiring psycopg2>=2.7 which is not
|
||||
available in CentOS 7.
|
||||
'''
|
||||
from __future__ import print_function
|
||||
from __future__ import division
|
||||
from __future__ import absolute_import
|
||||
|
||||
import re
|
||||
|
||||
|
||||
def SQL(input_statement):
|
||||
return input_statement
|
||||
|
||||
|
||||
def Identifier(identifier):
|
||||
'''Validate and return quoted SQL identifier.'''
|
||||
if re.search('^[a-zA-Z_][a-zA-Z0-9_]*$', identifier):
|
||||
return '"' + identifier + '"'
|
||||
else:
|
||||
raise Exception('Unacceptable SQL identifier: {}'.format(identifier))
|
|
@ -84,7 +84,7 @@ pika-pool==0.1.3
|
|||
pika==0.10.0
|
||||
ply==3.11
|
||||
prettytable==0.7.2
|
||||
psycopg2==2.7
|
||||
psycopg2==2.5.1
|
||||
PuLP==1.4.1
|
||||
pycadf==2.7.0
|
||||
pycparser==2.18
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
# process, which may cause wedges in the gate later.
|
||||
|
||||
eventlet!=0.18.3,!=0.20.1,>=0.18.2 # MIT
|
||||
jsonschema<3.0.0,>=2.6.0 # MIT
|
||||
jsonschema>=2.6.0 # MIT
|
||||
PuLP>=1.4.1 # MIT
|
||||
keystoneauth1>=3.4.0 # Apache-2.0
|
||||
keystonemiddleware>=4.17.0 # Apache-2.0
|
||||
|
@ -26,7 +26,7 @@ alembic>=0.8.10 # MIT
|
|||
cryptography>=2.1 # BSD/Apache-2.0
|
||||
netaddr>=0.7.18 # BSD
|
||||
jsonpath-rw<2.0,>=1.2.0 # Apache-2.0
|
||||
psycopg2>=2.7 # LGPL/ZPL
|
||||
psycopg2>=2.5.1 # LGPL/ZPL
|
||||
python-dateutil>=2.5.3 # BSD
|
||||
python-glanceclient>=2.8.0 # Apache-2.0
|
||||
requests>=2.14.2,!=2.20.0 # Apache-2.0
|
||||
|
|
Loading…
Reference in New Issue