[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
| 
Re: [paho-dev] Status of paho-mqtt for python
 | 
  
  
    
    
    On 02/10/2023 18:59, Ian Craggs via
      paho-dev wrote:
    
    
      
      I think it's a good idea to have CI build and test if it's not
        there already. I have that on the Eclipse Paho C client (https://github.com/eclipse/paho.mqtt.c/)
        and others. 
      
      I'm happy to look at any PR opened if no-one else gets there
        first.
      
      Ian Craggs
      
    
    
    
    Having a look around it seems the tox workflow should be doing
      some testing. This doesn't seem to have run for a while though? Is
      it perhaps disabled?
    
    
       
      On 02/10/2023 11:26, Alex J Lennon
        via paho-dev wrote:
      
      
        
        
        
        Feels like it would be useful to have some build & test
          CI in the GitHub workflows
        
        I quite enjoy putting CI build and test together (@see https://github.com/dynamicdevices/meta-mono)
        I wouldn't mind helping if a PR is likely to be looked at
        Cheers,
        Alex
        
        On 02/10/2023 11:22, Peter Silva
          via paho-dev wrote:
        
        
          
          right. summarizing:
            
            
            * a patch breaking the build has been the HEAD of the
              master branch for about 10 months.
            * there is no other activity on that branch.
            
            
            How could nobody have complained about this for 10
              months? 
            
            
            
            This leads me to believe that development work is going
              on somewhere else, and somebody is 
            updating this branch from time to time, but not using
              it at all...
            
            
            Should I just open an issue on the breakage in the
              master branch?  
            Or is there somewhere else where branches are more
              active?
            
            
            
            
           
          
          
            
            Peter Silva via
              paho-dev <paho-dev@xxxxxxxxxxx>
              writes:
              
              > I normally use ubuntu packages, but I wanted to make
              a PR for a feature I
              > need.  To start work, I need to get a working
              > source tree.  Is the master branch on github supposed
              to be usable?
              
              Of course it should be....
              
              > I cloned the master branch of
              > https://github.com/eclipse/paho.mqtt.python
              and the try using it by
              > installing with "pip3 install -e . " on my linux
              workstation.
              
              >
              > I try using it in my application,
              >     self.reconnect()
              >   File
              "/home/peter/src/paho.mqtt.python/src/paho/mqtt/client.py",
              line
              > 1045, in reconnect
              >     _on_pre_connect_ = self.on_pre_connect
              >   File
              "/home/peter/src/paho.mqtt.python/src/paho/mqtt/client.py",
              line
              > 1863, in on_pre_connect
              >     return self._on_pre_connect
              > AttributeError: 'Client' object has no attribute
              '_on_pre_connect'. Did you
              > mean: 'on_pre_connect'?
              
              I see this too.
              
              
              With some excessive punctuation, on
                NetBSD 10 amd64
                python 3.10
              
              I get
              
              SKIPPED [21]
              .eggs/pytest-7.4.2-py3.11.egg/_pytest/unittest.py:371:
              paho.mqtt.testing not present.
              ==== 26 failed, 18 passed, 21 skipped, 8 warnings in
              251.32s (0:04:11) ====
              
              > Does this make sense?  Should I be working from some
              other source?
              
              This is the right repo, according to starting with the
              paho homepage.
              
              
              
              If I back up to the v1.6.1 tag:
              
                commit a4cb435ca2864d073ea3e0e18b0407e4bbe85b16
              (origin/master, origin/HEAD, master)
                Author: Roger Light <roger@xxxxxxxxxx>
                Date:   Sat Jan 21 00:12:33 2023 +0000
              
                    Add on_pre_connect() callback
              
                    This is called immediately before a connection
              attempt is made.
              
                commit 9782ab81fe7ee3a05e74c7f3e1d03d5611ea4be4 (HEAD,
              tag: v1.6.1)
                Merge: 6dfdeba 1f3cd09
                Author: Roger A. Light <roger@xxxxxxxxxx>
                Date:   Thu Oct 21 11:05:05 2021 +0100
              
                    Merge branch '1.6.x'
              
              then tests show (again punctuation remediated):
              
              SKIPPED [21]
              .eggs/pytest-7.4.2-py3.11.egg/_pytest/unittest.py:371:
              paho.mqtt.testing not present.
              ==== 44 passed, 21 skipped in 11.25s ====
              
              
              I think the addition of the preconnect callback has a few
              issues.
              With this, it passes:
              
              
              diff --git a/src/paho/mqtt/client.py
              b/src/paho/mqtt/client.py
              index 54405a4..5515af7 100644
              --- a/src/paho/mqtt/client.py
              +++ b/src/paho/mqtt/client.py
              @@ -615,6 +615,7 @@ class Client(object):
                       self._registered_write = False
                       # No default callbacks
                       self._on_log = None
              +        self._on_pre_connect = None
                       self._on_connect = None
                       self._on_connect_fail = None
                       self._on_subscribe = None
              @@ -1881,7 +1882,7 @@ class Client(object):
              
                   def pre_connect_callback(self):
                       def decorator(func):
              -            self._on_pre_connect_ = func
              +            self._on_pre_connect = func
                           return func
                       return decorator
              
            
           
          
          
          _______________________________________________
paho-dev mailing list
paho-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/paho-dev
        
        
        
        _______________________________________________
paho-dev mailing list
paho-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/paho-dev
      
      
      
      _______________________________________________
paho-dev mailing list
paho-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/paho-dev