You are not logged in.

#1 2008-12-05 21:51:14

leo2501
Member
From: Buenos Aires, Argentina
Registered: 2007-07-07
Posts: 658

pebrot. DeprecationWarning: socket.ssl() is deprecated Error

pebrot is working fine, i can get in conversations and everything but the UI has this anoying "deprecated" error tongue

Enter \h for help.                                                                                                                         
                                                                                                                                           
----------=| CONNECTED |=----------                                                                                                        

                                                                                                                               
------------= [19:42] =------------                                                                                                        
                                                                                                                    
                                                                                                                                           
───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
/usr/lib/python2.5/site-packages/pypebrot/MSN.py:938: DeprecationWarning: socket.ssl() is deprecated.  Use ssl.wrap_socket() instead.      
                                                                                                                                           
                                                                                                                                           
                                                                                                                                      
                                                                                                                                           
                                                                                                                                       ssl= socket.ssl( sock )                                                                                                                        
                                                                                                                                           
1 bash  2 bash  3 bash  4 proc  5*im  6 moc  7 down  8 irc  9 log  10 X                                                    19:45 05/12/2008

Last edited by leo2501 (2008-12-05 21:57:06)


Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away.
-- Antoine de Saint-Exupery

Offline

#2 2008-12-05 22:50:53

andre.ramaciotti
Member
From: Brazil
Registered: 2007-04-06
Posts: 649

Re: pebrot. DeprecationWarning: socket.ssl() is deprecated Error

This will redirect the stderr to /dev/null

pebrot 2> /dev/null

Unfortunately, it seems that pebrot isn't being developed any more.

I'm trying to make a patch to pebrot to save it from deprecation, but I'm have bad times with this ssl.wrap_socket(). It also complains about the md5 module, but this one is easy to remove the deprecation warning.

In the end, the patch would change less than 10 lines in MSN.py and left the rest unchanged.

edit: spelling

edit2: if someone is interested, here is the patch to md5.

7c7
< import md5
---
> import hashlib
724c724
<         chunk= md5.new( msg.fields['hash']+ 'Q1P7W2E4J9R8U3S5' ).hexdigest()
---
>         chunk= hashlib.md5( msg.fields['hash']+ 'Q1P7W2E4J9R8U3S5' ).hexdigest()
1102c1102
<                     chunk= md5.new( hash + self.passwd ).hexdigest()
---
>                     chunk= hashlib.md5( hash + self.passwd ).hexdigest()

Last edited by andre.ramaciotti (2008-12-05 22:58:36)


(lambda ())

Offline

#3 2008-12-06 10:05:10

leo2501
Member
From: Buenos Aires, Argentina
Registered: 2007-07-07
Posts: 658

Re: pebrot. DeprecationWarning: socket.ssl() is deprecated Error

THANKS! but how i can apply the patch?


Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away.
-- Antoine de Saint-Exupery

Offline

#4 2008-12-06 10:54:44

andre.ramaciotti
Member
From: Brazil
Registered: 2007-04-06
Posts: 649

Re: pebrot. DeprecationWarning: socket.ssl() is deprecated Error

Save the code I send as a file (e.g. md5.patch) and run as root:

patch -i md5.patch /usr/lib/python2.5/site-packages/pypebrot/MSN.py

Last edited by andre.ramaciotti (2008-12-06 10:55:04)


(lambda ())

Offline

#5 2011-04-11 01:37:56

codename_B
Member
Registered: 2011-04-11
Posts: 5

Re: pebrot. DeprecationWarning: socket.ssl() is deprecated Error

I've been using pebrot recently too, and while I couldn't fix the depracated error for the socket.ssl() warning - I at least shut it up till I (or someone better than I) can figure out a fix.
Just add this code and it won't mess up your screen with warnings - python 2.6 will be around for a while yet.

import warnings
warnings.filterwarnings("ignore")

Offline

Board footer

Powered by FluxBB