Skip to contentSkip to conversation

python 2.6 warning

DISCUSSION Robert Schuster 7 participants 9 messages May 11, 2009 – May 12, 2009

lore
Share & tools
lore
#0 lore raw

Hi all,
those who are using bitbake with Python 2.6 (e.g. Ubuntu 09.04, Debian sid) will notice this warning:

/home/rschus/oe/bitbake/lib/bb/COW.py:29: DeprecationWarning: the sets module is deprecated
import types, sets

Is anyone from OE in the know how to fix that properly? I know its only a warning but imagine an OE newbie reading this .... I would like to fix it myself but even after years of contributing to OE my Pyhton skills are severely limited. :|

Regards
Robert

#1 lore raw
Quoted 9 lines · On Monday 11 May 2009 11:22:56 Robert Schuster wrote:

Hi all,
those who are using bitbake with Python 2.6 (e.g. Ubuntu 09.04, Debian sid) will notice this warning:

/home/rschus/oe/bitbake/lib/bb/COW.py:29: DeprecationWarning: the sets module is deprecated
import types, sets

Is anyone from OE in the know how to fix that properly?

Basically you need to rewrite COW.py to work with the new built-in sets. Might be a chance to get another BitBake release out.

:M:

#2 lore raw
Quoted 5 lines · Michael 'Mickey' Lauer
Quoted 4 lines · On Monday 11 May 2009 11:22:56 Robert Schuster wrote:

Hi all,
those who are using bitbake with Python 2.6 (e.g. Ubuntu 09.04, Debian sid) will notice this warning:

Quoted 7 lines
Quoted 5 lines

/home/rschus/oe/bitbake/lib/bb/COW.py:29: DeprecationWarning: the sets module is deprecated
import types, sets

Is anyone from OE in the know how to fix that properly?

Basically you need to rewrite COW.py to work with the new built-in sets. Might be a chance to get another BitBake release out.

Will this still work with python 2.5?

Philip

#3 lore raw
Quoted 10 lines · Philip Balister
Quoted 9 lines · Michael 'Mickey' Lauer
Quoted 8 lines · On Monday 11 May 2009 11:22:56 Robert Schuster wrote:

Hi all,
those who are using bitbake with Python 2.6 (e.g. Ubuntu 09.04, Debian sid) will notice this warning:

/home/rschus/oe/bitbake/lib/bb/COW.py:29: DeprecationWarning: the sets module is deprecated
import types, sets

Quoted 6 lines
Quoted 4 lines
Quoted 1 line

Is anyone from OE in the know how to fix that properly?

Basically you need to rewrite COW.py to work with the new built-in sets. Might be a chance to get another BitBake release out.

Will this still work with python 2.5?

There were patches for this on the bitbake list. I suspect 2.5 will be fine, not sure about 2.4 or earlier. I've not had a chance to look into this yet :(

Cheers,

Richard

#4 lore raw
In reply to Robert Schuster

Dnia poniedziałek, 11 maja 2009 o 11:22:56 Robert Schuster napisał(a):

Quoted 4 lines

Hi all,
those who are using bitbake with Python 2.6 (e.g. Ubuntu 09.04, Debian sid) will notice this warning:

Quoted 8 lines

/home/rschus/oe/bitbake/lib/bb/COW.py:29: DeprecationWarning: the sets module is deprecated
import types, sets

Is anyone from OE in the know how to fix that properly? I know its only a warning but imagine an OE newbie reading this .... I would like to fix it myself but even after years of contributing to OE my Pyhton skills are severely limited. :|

BitBake trunk has it fixed by me. Backporting to 1.8.x and to stable/2009 are on my todolist. And yes - it works fine with Python 2.5 and even should with Python 2.4 which is minimal required version (should works with 2.3 but we do not support it).

Regards,

Signature · 3 lines
JID:      [email protected]
Website:  http://marcin.juszkiewicz.com.pl/
LinkedIn: http://www.linkedin.com/in/marcinjuszkiewicz
#5 lore raw
Quoted 14 lines · Marcin Juszkiewicz

Dnia poniedziałek, 11 maja 2009 o 11:22:56 Robert Schuster napisał(a):

Quoted 4 lines

Hi all,
those who are using bitbake with Python 2.6 (e.g. Ubuntu 09.04, Debian sid) will notice this warning:

Quoted 8 lines

/home/rschus/oe/bitbake/lib/bb/COW.py:29: DeprecationWarning: the sets module is deprecated
import types, sets

Is anyone from OE in the know how to fix that properly? I know its only a warning but imagine an OE newbie reading this .... I would like to fix it myself but even after years of contributing to OE my Pyhton skills are severely limited. :|

Quoted 4 lines

BitBake trunk has it fixed by me. Backporting to 1.8.x and to stable/2009 are on my todolist. And yes - it works fine with Python 2.5 and even should with Python 2.4 which is minimal required version (should works with 2.3 but we do not support it).

It won't work with 2.3 but we don't care about 2.3, it will work with 2.4 onwards. I have no idea why we were using long deprecated stuff :/.

I've backported it to bitbake 1.8 and it seems to work along with merging a number of fixes lurking in Poky.

I'm also intending to merge the virtual class extension stuff soon unless anyone has a major objection (none were raised previously when I proposed this).

Cheers,

Richard

#6 lore raw

Hello Richard,

Quoted 2 lines · Richard Purdie

I've backported it to bitbake 1.8 and it seems to work along with merging a number of fixes lurking in Poky.

Please push the attached fix too.

Signature · 3 lines
Otavio Salvador                  O.S. Systems
E-mail: [email protected]  http://www.ossystems.com.br
Mobile: +55 53 9981-7854         http://projetos.ossystems.com.br
bb/providers.py +1 -2
Index: lib/bb/providers.py
===================================================================
@@ -297,9 +297,8 @@
 
     # Only search dynamic packages if we can't find anything in other variables
     for pattern in dataCache.packages_dynamic:
-        pattern = pattern.replace('+', "\+")
         try:
-            regexp = re.compile(pattern)
+            regexp = re.compile(pattern.replace('+', "\+"))
         except:
             bb.msg.error(bb.msg.domain.Provider, "Error parsing re expression: %s" % pattern)
             raise
#7 lore raw
Quoted 1 line · On Tuesday 12 May 2009 04:11:49 Otavio Salvador wrote:

Please push the attached fix too.

+1. Have exactly the same fix locally.

#8 lore raw
In reply to Otavio Salvador
Quoted 5 lines · Otavio Salvador
Quoted 2 lines · Richard Purdie

I've backported it to bitbake 1.8 and it seems to work along with merging a number of fixes lurking in Poky.

Please push the attached fix too.

Committed, thanks.

(after discussion on irc about why it was needed).

Can people please at least cc the bitbake list on bitbake patches as it will increase the chances of me seeing them.

Cheers,

Richard