Re: contrib/spoa/python: A few doc typo and bug fixes

2020-12-08 Thread Gilchrist DADAGLO
No issue with backporting to 2.0. I just mentioned 2.2 as it's the last. Thanks. Gilchrist On Tue, Dec 8, 2020, 16:01 Christopher Faulet wrote: > Le 08/12/2020 à 15:37, Gilchrist Dadaglo a écrit : > > Hi Team, > > Please find here-after a few patches for SPOA python

[PATCH 8/8] BUG/MEDIUM: spoa/python: Fixing references to None

2020-12-08 Thread Gilchrist Dadaglo
As per https://docs.python.org/3/c-api/none.html, None has to be treated exactly like other objects for reference counting. So, when we use it, we need to INCREF and when we are done, DECREF --- contrib/spoa_server/ps_python.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff

[PATCH 4/8] DOC/MINOR: spoa/python: Fixing typos in comments

2020-12-08 Thread Gilchrist Dadaglo
Fixing a missing letter in a comment --- contrib/spoa_server/ps_python.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/spoa_server/ps_python.c b/contrib/spoa_server/ps_python.c index 380d5b3..fbaa414 100644 --- a/contrib/spoa_server/ps_python.c +++

[PATCH 2/8] DOC/MINOR: spoa/python: Fixing typo in IP related error messages

2020-12-08 Thread Gilchrist Dadaglo
This commit fixes typos in the ps_python_set_var_ip* byte manipulation error messages --- contrib/spoa_server/ps_python.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/spoa_server/ps_python.c b/contrib/spoa_server/ps_python.c index 81bb932..ec97f30 100644 ---

[PATCH 6/8] BUG/MINOR: spoa/python: Cleanup ipaddress objects if initialization fails

2020-12-08 Thread Gilchrist Dadaglo
This change is to ensure objects from the ipaddress module are cleaned up when spoa module initialization fails. In general the interpreter would just crash, but in a code where import is conditional (try/except), then we would keep those objects around --- contrib/spoa_server/ps_python.c | 6

[PATCH 7/8] BUG/MEDIUM: spoa/python: Fixing PyObject_Call positional arguments

2020-12-08 Thread Gilchrist Dadaglo
As per https://docs.python.org/3/c-api/object.html#c.PyObject_Call, positional arguments should be an empty tuple when not used. Previously the code had a dictionary instead of tuple. This commit is to fix it and use tuple to avoid unexpected consequences --- contrib/spoa_server/ps_python.c | 10

[PATCH 3/8] DOC/MINOR: spoa/python: Rephrasing memory related error messages

2020-12-08 Thread Gilchrist Dadaglo
The old message "No more space left available" was redundant with "left available". This commit is to rephrase that sentence and make it more explicit we are talking about memory --- contrib/spoa_server/ps_python.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff

[PATCH 5/8] BUG/MINOR: spoa/python: Cleanup references for failed Module Addobject operations

2020-12-08 Thread Gilchrist Dadaglo
As per https://docs.python.org/3/c-api/module.html#c.PyModule_AddObject, references are stolen by the function only for success. We must do cleanup manually if there is a failure --- contrib/spoa_server/ps_python.c | 27 ++- 1 file changed, 26 insertions(+), 1 deletion(-)

[PATCH 1/8] BUG/MAJOR: spoa/python: Fixing return None

2020-12-08 Thread Gilchrist Dadaglo
As per https://docs.python.org/3/c-api/none.html, None requires to be incremented before being returned to prevent deallocating none --- contrib/spoa_server/ps_python.c | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/contrib/spoa_server/ps_python.c

contrib/spoa/python: A few doc typo and bug fixes

2020-12-08 Thread Gilchrist Dadaglo
Hi Team, Please find here-after a few patches for SPOA python module; mainly memory related and a couple documentation rewrites. I put them under test for a few months now and no additional issue to report so far. Could you please help merge them to master? Any chance they can be backorted

Re: [PATCH 1/6] MINOR: spoa: allow MAX_FRAME_SIZE override

2020-09-02 Thread Gilchrist DADAGLO
Thanks Christopher, Appreciate the fast merge. Gilchrist On Tue, Sep 1, 2020, 18:36 Christopher Faulet wrote: > Le 24/08/2020 à 21:21, gilchr...@dadaglo.com a écrit : > > From: Bertrand Jacquin > > > > MAX_FRAME_SIZE is forced to the default value of tune.bufsize, however > > they don't

Re: [PATCH] MAJOR: contrib: porting spoa_server to support python3

2020-05-11 Thread Gilchrist DADAGLO
Hi, Thank you for the fast merge Willy and Thierry. I will keep this process in mind for any future contribution. Cheers, Gilchrist On Mon, May 11, 2020, 11:01 Willy Tarreau wrote: > On Mon, May 11, 2020 at 10:32:27AM +0200, Thierry Fournier wrote: > > Hi, thanks Willy, > > > > This a good

Re: [PATCH] MAJOR: contrib: porting spoa_server to support python3

2020-05-06 Thread Gilchrist DADAGLO
I didn't do anything for that purpose. Gilchrist On Wed, May 6, 2020, 16:13 Илья Шипицин wrote: > How did you get "test result"? > Should we add automated test for that? For example, once a week > > On Wed, May 6, 2020, 5:28 PM Gilchrist Dadaglo wrote: > >>

[PATCH] MAJOR: contrib: porting spoa_server to support python3

2020-05-06 Thread Gilchrist Dadaglo
python 2 if python 3 is not available. + Start the service - diff --git a/haproxy/contrib/spoa_server/ps_python.c b/haproxy/contrib/spoa_server/ps_python.c index 0a9fbff..019d125 100644 --- a/haproxy/contrib/spoa_server/ps_python.c +++ b/haproxy/contrib/spoa_server/ps_python.c