haproxy/contrib
Gilchrist Dadaglo 3e235d38ec MAJOR: contrib: porting spoa_server to support python3
Background:
    Python 2 is no longer supported since January, 1st 2020 as per
    https://www.python.org/doc/sunset-python-2/
    The purpose of this change is to make the spoa_server contrib library
    compatible with Python 3 to allow transition to Python 3.

Test Settings:
ps_python.py:
    ...
    spoa.set_var_null("null", spoa.scope_txn)
    spoa.set_var_boolean("boolean", spoa.scope_txn, True)
    spoa.set_var_int32("int32", spoa.scope_txn, 1234)
    spoa.set_var_uint32("uint32", spoa.scope_txn, 1234)
    spoa.set_var_int64("int64", spoa.scope_txn, 1234)
    spoa.set_var_uint64("uint64", spoa.scope_txn, 1234)
    spoa.set_var_ipv4("ipv4", spoa.scope_txn, ipaddress.IPv4Address(u"127.0.0.1"))
    spoa.set_var_ipv6("ipv6", spoa.scope_txn, ipaddress.IPv6Address(u"1::f"))
    spoa.set_var_str("str", spoa.scope_txn, "1::f")
    spoa.set_var_bin("bin", spoa.scope_txn, "1:\x01:\x42f\x63\x63")
    spoa.set_var_str("python_version", spoa.scope_sess, str(sys.version_info))
    ...
haproxy.cfg:
    ...
    http-request capture var(txn.verb.null),debug len 1
    http-request capture var(txn.verb.boolean),debug len 1
    http-request capture var(txn.verb.int32),debug len 4
    http-request capture var(txn.verb.uint32),debug len 4
    http-request capture var(txn.verb.int64),debug len 4
    http-request capture var(txn.verb.uint64),debug len 4
    http-request capture var(txn.verb.ipv4),debug len 16
    http-request capture var(txn.verb.ipv6),debug len 45
    http-request capture var(txn.verb.str),debug len 32
    http-request capture var(txn.verb.bin),debug len 32
    http-request capture var(sess.verb.python_version),debug len 100
    ...

Test result:
    Python 3.8:
        ft_public ft_public/<NOSRV> 0/-1/-1/-1/0 403 212 - - PR-- 1/1/0/0/0 0/0 {|1|1234|1234|1234|1234|127.0.0.1|1::f|1::f|1:#01:Bfcc|sys.version_info(major=3, minor=8, micro=1, releaselevel='final', serial=0)} "POST / HTTP/1.1"
    Python 3.7:
        ft_public ft_public/<NOSRV> 0/-1/-1/-1/0 403 212 - - PR-- 1/1/0/0/0 0/0 {|1|1234|1234|1234|1234|127.0.0.1|1::f|1::f|1:#01:Bfcc|sys.version_info(major=3, minor=7, micro=6, releaselevel='final', serial=0)} "POST / HTTP/1.1"
    Python 3.6:
        ft_public ft_public/<NOSRV> 0/-1/-1/-1/0 403 212 - - PR-- 1/1/0/0/0 0/0 {|1|1234|1234|1234|1234|127.0.0.1|1::f|1::f|1:#01:Bfcc|sys.version_info(major=3, minor=6, micro=10, releaselevel='final', serial=0)} "POST / HTTP/1.1"
    Python 2.7:
        ft_public ft_public/<NOSRV> 0/-1/-1/-1/0 403 212 - - PR-- 1/1/0/0/0 0/0 {|1|1234|1234|1234|1234|127.0.0.1|1::f|1::f|1:#01:Bfcc|sys.version_info(major=2, minor=7, micro=17, releaselevel='final', serial=0)} "POST / HTTP/1.1"

Not tested:
Python <2.7
2020-05-11 10:52:55 +02:00
..
51d/src BUILD/MINOR: 51d: Updated build registration output to indicate thatif the library is a dummy one or not. 2019-06-13 18:00:54 +02:00
base64
debug CLEANUP: assorted typo fixes in the code and comments 2020-04-02 16:25:45 +02:00
deviceatlas CLEANUP: assorted typo fixes in the code and comments 2020-03-31 17:09:35 +02:00
halog CLEANUP: fix a typo in a comment for the contrib/halog subsystem 2018-11-12 08:52:16 +01:00
hpack BUILD: use inttypes.h instead of stdint.h 2019-04-01 07:44:56 +02:00
ip6range
iprange
mod_defender CLEANUP: assorted typo fixes in the code and comments 2020-03-31 17:09:35 +02:00
modsecurity CLEANUP: assorted typo fixes in the code and comments 2020-03-31 17:09:35 +02:00
netsnmp-perl
plug_qdisc CLEANUP: assorted typo fixes in the code and comments 2020-03-31 17:09:35 +02:00
prometheus-exporter BUG/MINOR: http: make url_decode() optionally convert '+' to SP 2020-04-23 20:03:27 +02:00
selinux
spoa_example CLEANUP: assorted typo fixes in the code and comments 2020-03-31 17:09:35 +02:00
spoa_server MAJOR: contrib: porting spoa_server to support python3 2020-05-11 10:52:55 +02:00
syntax-highlight MEDIUM: Make '(cli|con|srv)timeout' directive fatal 2019-06-17 13:35:54 +02:00
systemd MINOR: systemd: support /etc/sysconfig/ for redhat based distrib 2019-05-07 14:11:55 +02:00
tcploop
trace
wireshark-dissectors/peers MINOR: contrib: make the peers wireshark dissector a plugin 2020-04-26 11:29:05 +02:00
wurfl CLEANUP: assorted typo fixes in the code and comments 2020-03-31 17:09:35 +02:00