<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/poky.git/scripts/lib, branch python3</title>
<subtitle>Mirror of git.yoctoproject.org/poky</subtitle>
<id>https://git.enea.com/cgit/linux/poky.git/atom?h=python3</id>
<link rel='self' href='https://git.enea.com/cgit/linux/poky.git/atom?h=python3'/>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/'/>
<updated>2016-05-14T22:05:14+00:00</updated>
<entry>
<title>wic: use next builtin instead of .next method</title>
<updated>2016-05-14T22:05:14+00:00</updated>
<author>
<name>Ed Bartosh</name>
<email>ed.bartosh@linux.intel.com</email>
</author>
<published>2016-05-04T13:06:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=c589aff0804ea14f06ac93e1adcfbbae65ee9b3b'/>
<id>urn:sha1:c589aff0804ea14f06ac93e1adcfbbae65ee9b3b</id>
<content type='text'>
Generators in Python 3 don't have .next method. It's recommended
to use 'next' builtin instead. As it also present in Python &gt;= 2.6
it should make wic code compatible with both Python 2 and Python 3.

[YOCTO #9412]

(From OE-Core rev: 9b7ab632e47d786dd979262015dbfb1254103f83)

Signed-off-by: Ed Bartosh &lt;ed.bartosh@linux.intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>wic: don't encode unicode strings</title>
<updated>2016-05-14T22:05:14+00:00</updated>
<author>
<name>Ed Bartosh</name>
<email>ed.bartosh@linux.intel.com</email>
</author>
<published>2016-05-04T13:06:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=dd732eeedd646363007bde0764d73d419613d9f6'/>
<id>urn:sha1:dd732eeedd646363007bde0764d73d419613d9f6</id>
<content type='text'>
Removed check for unicode type as it doesn't work in Python 3.
This check is not needed for wic as all its output seem to be
strings. This allows to run code under both pythons.

[YOCTO #9412]

(From OE-Core rev: a56924b4a0102e401b5e37d857a08bab15da974e)

Signed-off-by: Ed Bartosh &lt;ed.bartosh@linux.intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>wic: decode output of subprocess.communicate</title>
<updated>2016-05-14T22:05:14+00:00</updated>
<author>
<name>Ed Bartosh</name>
<email>ed.bartosh@linux.intel.com</email>
</author>
<published>2016-05-04T13:06:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=a173885ccfcff1099fa47c0f84913d14ac26079f'/>
<id>urn:sha1:a173885ccfcff1099fa47c0f84913d14ac26079f</id>
<content type='text'>
stdeout and stderr content returned by communicate API has different
types in Python 3(bytes) and Python 2(string). Decoding it to 'utf-8'
makes it unicode on both pythons.

Decoded stdout and stderr output to utf-8 to make the code
working under both Python 2 and Python 3.

(From OE-Core rev: 5b556f58a171e3d45107bb56a1f780e5c1abba37)

Signed-off-by: Ed Bartosh &lt;ed.bartosh@linux.intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>wic: use // operator instead of /</title>
<updated>2016-05-14T22:05:14+00:00</updated>
<author>
<name>Ed Bartosh</name>
<email>ed.bartosh@linux.intel.com</email>
</author>
<published>2016-05-04T13:06:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=5f06463c6c23f337147457dd9e490887ac194db4'/>
<id>urn:sha1:5f06463c6c23f337147457dd9e490887ac194db4</id>
<content type='text'>
Division operator works differently in Python 3. It results in
float unlike in Python 2, where it results in int.
Explicitly used "floor division" operator instead of 'division'
operator. This should make the code to result in integer under
both pythons.

[YOCTO #9412]

(From OE-Core rev: 997ff239bd753a7957cc14c6829b2f093d9bcef6)

Signed-off-by: Ed Bartosh &lt;ed.bartosh@linux.intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>wic: use find_executable in favor of bb.utils.which</title>
<updated>2016-05-14T22:05:14+00:00</updated>
<author>
<name>Ed Bartosh</name>
<email>ed.bartosh@linux.intel.com</email>
</author>
<published>2016-05-04T13:06:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=bc89dc4225904692882888bbe8feaee6e9c46120'/>
<id>urn:sha1:bc89dc4225904692882888bbe8feaee6e9c46120</id>
<content type='text'>
As bitbake is not ported to Python 3 yet it's better to
avoid using its APIs as much as possible to be able to
test wic under Python 3 at least partially.

Used distutils.spawn.find_executable API in favor of
bb.utils.which to get path of the command to run.

(From OE-Core rev: 9658956bf8a5da779e06f71941de9b3e89415cdc)

Signed-off-by: Ed Bartosh &lt;ed.bartosh@linux.intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>wic: don't use L suffix for integers</title>
<updated>2016-05-14T22:05:13+00:00</updated>
<author>
<name>Ed Bartosh</name>
<email>ed.bartosh@linux.intel.com</email>
</author>
<published>2016-05-04T13:06:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=b6b5b5e29531be4eb77f1756b78a7b9a5292bcb4'/>
<id>urn:sha1:b6b5b5e29531be4eb77f1756b78a7b9a5292bcb4</id>
<content type='text'>
This suffix is not supported by Python 3. Wic code works
without it on Python 2 too, so it's safe to remove it.

[YOCTO #9412]

(From OE-Core rev: 296db7e33bd71585cac63dc78c2c95bc619b4a86)

Signed-off-by: Ed Bartosh &lt;ed.bartosh@linux.intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>wic: refactor pluginbase</title>
<updated>2016-05-14T22:05:13+00:00</updated>
<author>
<name>Ed Bartosh</name>
<email>ed.bartosh@linux.intel.com</email>
</author>
<published>2016-05-04T13:06:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=5fedb5d3cc8d6ff9e9e378bbda45345a6b867cd4'/>
<id>urn:sha1:5fedb5d3cc8d6ff9e9e378bbda45345a6b867cd4</id>
<content type='text'>
Wic plugin machinery implemented using metaclasses.

Reimplemented plugin machinery using this advice from
https://wiki.python.org/moin/PortingToPy3k/BilingualQuickRef
Syntax for creating instances with different metaclasses is very
different between Python 2 and 3. Use the ability to call type instances
as a way to portably create such instances.

Now it should work under both Python 2 and Python 3.

[YOCTO #9412]

(From OE-Core rev: e62fe5a41bdcdd72b9b257fecff7ccdc59c76d33)

Signed-off-by: Ed Bartosh &lt;ed.bartosh@linux.intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>wic: remove unused functions</title>
<updated>2016-05-14T22:05:13+00:00</updated>
<author>
<name>Ed Bartosh</name>
<email>ed.bartosh@linux.intel.com</email>
</author>
<published>2016-05-04T13:06:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=d4ded7fcb159e55134b7612dbdc928613c7321c6'/>
<id>urn:sha1:d4ded7fcb159e55134b7612dbdc928613c7321c6</id>
<content type='text'>
Removed 'raw', 'ask', 'choice' and 'pause' functions from
msger.py as they're not used in wic code and some of them
use raw_input, which is not present in Python 3.

[YOCTO #9412]

(From OE-Core rev: eb87d591ef67f1953b2689430ef6c5a6a27a5b6e)

Signed-off-by: Ed Bartosh &lt;ed.bartosh@linux.intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>wic: use new syntax of 'except' statement</title>
<updated>2016-05-14T22:05:13+00:00</updated>
<author>
<name>Ed Bartosh</name>
<email>ed.bartosh@linux.intel.com</email>
</author>
<published>2016-05-04T13:06:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=e301be3cd09499e605fb204fc4f197eca11f9305'/>
<id>urn:sha1:e301be3cd09499e605fb204fc4f197eca11f9305</id>
<content type='text'>
New syntax 'except Exception as err' is supported by Python &gt;= 2.7.
Old syntax 'except Exception, err' is not supported by Python 3.

Used new syntax to be able to run wic on Python 3.

[YOCTO #9412]

(From OE-Core rev: 15e88714d6b0a93f72e8a19b083fcc1f2006e128)

Signed-off-by: Ed Bartosh &lt;ed.bartosh@linux.intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>wic: remove with_statement imports</title>
<updated>2016-05-14T22:05:13+00:00</updated>
<author>
<name>Ed Bartosh</name>
<email>ed.bartosh@linux.intel.com</email>
</author>
<published>2016-05-04T13:06:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=ed10a80c2c113acbdd1c9602a4a7d0d8fc799a62'/>
<id>urn:sha1:ed10a80c2c113acbdd1c9602a4a7d0d8fc799a62</id>
<content type='text'>
'with' statement is not used in baseimager.py
It's supported by Python 2.7, which is included into all target
distros. Other wic modules use this statement.

Removed useless 'from __future__ import with_statement' from
wic code.

(From OE-Core rev: 528a1f20939589949831efbb4de6336776efe7d5)

Signed-off-by: Ed Bartosh &lt;ed.bartosh@linux.intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
</feed>
