Skip to content

Commit f16c95e

Browse files
committedAug 17, 2020
Merge branch 'dev'
2 parents 55ae1e0 + 6ea90f6 commit f16c95e

File tree

14 files changed

+1756
-1501
lines changed

14 files changed

+1756
-1501
lines changed
 

‎mamonsu/lib/zbx_template.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
class ZbxTemplate(object):
88
plg_type = 'all'
9-
mainTemplate = u"""<?xml version="1.0" encoding="UTF-8"?>
9+
mainTemplate = """<?xml version="1.0" encoding="UTF-8"?>
1010
<zabbix_export>
1111
<version>2.0</version>
1212
<groups>

‎mamonsu/plugins/pgsql/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
__all__ += ['checkpoint', 'oldest', 'pg_locks']
55
__all__ += ['cfs']
66
__all__ += ['archive_command']
7-
__all__ += ['relations_size']
87
__all__ += ['prepared_transaction']
98

109
from . import *

‎mamonsu/plugins/pgsql/driver/pg8000/__init__.py

Lines changed: 27 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,18 @@
1-
from .core import (
2-
Warning, DataError, DatabaseError, InterfaceError, ProgrammingError,
3-
Error, OperationalError, IntegrityError, InternalError, NotSupportedError,
4-
ArrayContentNotHomogenousError, ArrayDimensionsNotConsistentError,
5-
ArrayContentNotSupportedError, Connection, Cursor, Binary, Date,
6-
DateFromTicks, Time, TimeFromTicks, Timestamp, TimestampFromTicks, BINARY,
7-
Interval, PGEnum, PGJson, PGJsonb, PGTsvector, PGText, PGVarchar)
1+
from .converters import (
2+
BIGINTEGER, BINARY, BOOLEAN, BOOLEAN_ARRAY, BYTES, Binary, CHAR,
3+
CHAR_ARRAY, DATE, DATETIME, DECIMAL, DECIMAL_ARRAY, Date, DateFromTicks,
4+
FLOAT, FLOAT_ARRAY, INET, INT2VECTOR, INTEGER, INTEGER_ARRAY, INTERVAL,
5+
JSON, JSONB, MACADDR, NAME, NAME_ARRAY, NULLTYPE, NUMBER, OID, PGEnum,
6+
PGInterval, PGJson, PGJsonb, PGText, PGTsvector, PGVarchar, ROWID, STRING,
7+
TEXT, TEXT_ARRAY, TIME, TIMEDELTA, TIMESTAMP, TIMESTAMPTZ, Time,
8+
TimeFromTicks, Timestamp, TimestampFromTicks, UNKNOWN, UUID_TYPE, VARCHAR,
9+
VARCHAR_ARRAY, XID)
10+
from .core import Connection, Cursor
11+
from .exceptions import (
12+
DataError, DatabaseError, Error, IntegrityError, InterfaceError,
13+
InternalError, NotSupportedError, OperationalError, ProgrammingError,
14+
Warning)
15+
816
from ._version import get_versions
917
__version__ = get_versions()['version']
1018
del get_versions
@@ -43,16 +51,13 @@
4351
def connect(
4452
user, host='localhost', database=None, port=5432, password=None,
4553
source_address=None, unix_sock=None, ssl_context=None, timeout=None,
46-
max_prepared_statements=1000, tcp_keepalive=True,
47-
application_name=None, replication=None):
54+
tcp_keepalive=True, application_name=None, replication=None):
4855

4956
return Connection(
5057
user, host=host, database=database, port=port, password=password,
5158
source_address=source_address, unix_sock=unix_sock,
52-
ssl_context=ssl_context, timeout=timeout,
53-
max_prepared_statements=max_prepared_statements,
54-
tcp_keepalive=tcp_keepalive, application_name=application_name,
55-
replication=replication)
59+
ssl_context=ssl_context, timeout=timeout, tcp_keepalive=tcp_keepalive,
60+
application_name=application_name, replication=replication)
5661

5762

5863
apilevel = "2.0"
@@ -74,34 +79,16 @@ def connect(
7479

7580
paramstyle = 'format'
7681

77-
# I have no idea what this would be used for by a client app. Should it be
78-
# TEXT, VARCHAR, CHAR? It will only compare against row_description's
79-
# type_code if it is this one type. It is the varchar type oid for now, this
80-
# appears to match expectations in the DB API 2.0 compliance test suite.
81-
82-
STRING = 1043
83-
"""String type oid."""
84-
85-
86-
NUMBER = 1700
87-
"""Numeric type oid"""
88-
89-
DATETIME = 1114
90-
"""Timestamp type oid"""
91-
92-
ROWID = 26
93-
"""ROWID type oid"""
9482

9583
__all__ = [
9684
Warning, DataError, DatabaseError, connect, InterfaceError,
9785
ProgrammingError, Error, OperationalError, IntegrityError, InternalError,
98-
NotSupportedError, ArrayContentNotHomogenousError,
99-
ArrayDimensionsNotConsistentError, ArrayContentNotSupportedError,
100-
Connection, Cursor, Binary, Date, DateFromTicks, Time, TimeFromTicks,
101-
Timestamp, TimestampFromTicks, BINARY, Interval, PGEnum, PGJson, PGJsonb,
102-
PGTsvector, PGText, PGVarchar]
103-
104-
"""Version string for pg8000.
105-
106-
.. versionadded:: 1.9.11
107-
"""
86+
NotSupportedError, Connection, Cursor, Binary, Date, DateFromTicks, Time,
87+
TimeFromTicks, Timestamp, TimestampFromTicks, BINARY, PGInterval, PGEnum,
88+
PGJson, PGJsonb, PGTsvector, PGText, PGVarchar, STRING, NUMBER, DATETIME,
89+
TIME, BOOLEAN, INTEGER, BIGINTEGER, INTERVAL, JSON, JSONB, UNKNOWN,
90+
NULLTYPE, ROWID, BOOLEAN_ARRAY, BYTES, CHAR, CHAR_ARRAY, DATE, DECIMAL,
91+
DECIMAL_ARRAY, FLOAT, FLOAT_ARRAY, INET, INT2VECTOR, INTEGER_ARRAY,
92+
MACADDR, NAME, NAME_ARRAY, OID, TEXT, TEXT_ARRAY, TIMEDELTA, TIMESTAMP,
93+
TIMESTAMPTZ, UUID_TYPE, VARCHAR, VARCHAR_ARRAY, XID
94+
]

0 commit comments

Comments
 (0)
Please sign in to comment.