Incomprehensible warnings in log files

Could you please explain what these warnings mean?

Mon Sep 23 10:42:09 2019] WARNING:py.warnings:/usr/local/lib/python3.6/site-packages/sql/__init__.py:1294: ResourceWarning: unclosed <socket.socket fd=12, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6, laddr=('10.0.0.52', 44961), raddr=('10.0.0.67', 389)>
  super(Column, self).__init__()

Mon Sep 23 10:56:07 2019] WARNING:py.warnings:/usr/local/lib/python3.6/site-packages/sql/__init__.py:921: ResourceWarning: unclosed <socket.socket fd=11, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6, laddr=('10.0.0.52', 45401), raddr=('10.0.0.67', 389)>
  super(Table, self).__init__()

From the port (389) it seems that the connection to the ldap server is not closed properly.

Are you using the ldap_authentication module?

It is probably this connection.

Yes.

Any ideas to solve this problem?

It is not a problem, just a warning.
The connection should be explicitly closed.

Who should close the connection to the ldap server?
Who is the developer of the ldap_authentication module?

The one who open it.

Tryton community.

So you need to fix the ldap_authentication module?

Yes someone has to propose a fix.

OK.
Here is a workaround for ignoring the warnings:

import warnings
warnings.simplefilter("ignore", ResourceWarning)

Can you give a bit more information (which Tryton version, OS, when this happens etc) on the warning? Because I don’t see that kind of warning on my install (I’m also using ldap_authentication). I’m on Tryton 5.0 in a Python 3.6 virtual environment running on CentOS 7. If I can reproduce it, I can try to fix it. Just adding a filter to ignore the warning is not fixing the issue.

Issue 8682: Resource warning for ldap connection - Tryton issue tracker should fix it.

I’m on Tryton 5.2, Python 3.6, FreeBSD 11.3.

It’s not a fixing, just a workaround.

The warning occurs immediately after entering the password.

The warning is not displayed, it is output to files warning.log, debug.log, info.log.