Community
Participate
Working Groups
I will attach a zip of the code for CQ review once I have compiled it. I have authored all of the code and will be able to produce a repository that contains the full history of only the relevant files, rather than the whole mosquitto repository. I undertook this work in my own time outside my place of work, but have searched through HR documentation anyway. I see no indication that they would attempt to claim any rights on work done outside so believe I have the right to transfer it to Eclipse. It needs some work to remove the mosquitto branding, suggestions as what to use instead would be appreciated. paho? mqttv3?
Thanks Roger - a pure Python MQTT client is appreciated!
Created attachment 228949 [details] Current code, as in mosquitto repository.
CQ #7814
Comment from CQ - "The attachment contains a license relating to other third party libs see "library-3rd-party.txt". I'm assuming it was included in error? For completeness, it is being excluded from forming part of this review and does not apply to checkin. On that note, you are clear for checkin based on Parallel IP, minus the third party license file, and subject to the source headers being amended to contain the default Eclipse copyright and license headers [1] which are currently not in place. We will perform a comprehensive analysis in due course."
The LICENSE-3rd-party.txt file includes all licenses used by the whole of the mosquitto project. Of the licenses listed, only the OpenSSL one is relevant to the Python code, the others should definitely be removed. Including the OpenSSL license is possibly overkill. I think to comply with the OpenSSL licenses the lines below must be included in the mosquitto.py source file: "This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit. (http://www.openssl.org/) This product includes cryptographic software written by Eric Young (eay@cryptsoft.com) This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
Discussion of the naming convention used by this code on the paho-dev list: http://dev.eclipse.org/mhonarc/lists/paho-dev/msg00511.html The existing Eclipse naming conventions are strongly tailored to Java and are primarily from the Sun naming guidelines. http://wiki.eclipse.org/Naming_Conventions We want to choose a meaningful noun for the class name - Paho is not necessarily just MQTT so we might want to use either PahoMQTT or MQTT to be specific to the protocol. Would that fit with Pythonic conventions though? Is there anything else to consider beyond the existing Mosquitto class name / namespace?
I sent this by email but I'm not sure whether it worked, so here it is again with a bit more commentary. > Is there anything else to consider beyond the existing Mosquitto class name / > namespace? Error numbers (MOSQ_ERR_*) Log levels (MOSQ_LOG_*) Automatic client id generation ("mosq/.....") Callback first parameter is documented as "mosq". I think that's about all that is outward facing. We could possibly make a paho module that has mqtt as a submodule. You could then do "from paho import mqtt" and so on. It's a bit over complicated if mqtt is the only submodule, but allows for expansion for other protocols. I'm not sure how this would work if we have separate repositories like org.eclipse.paho.mqtt.python and org.eclipse.paho.<something else>.python.
We can always refactor the source repositories later if by the addition of more components a new structure becomes needed. I like the idea of having an mqtt submodule of a paho module, although, yes it could be viewed as overkill. On the other hand, it is just as easy to import: "import paho.mqtt" "from paho.mqtt import *" So, I'm inclined to go with that. We don't have to clean everything up before submitting the code. Do you want me to create a new Python repository?
The code has been committed for a while now.