<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/openvswitch.git/python/ovstest, branch master</title>
<subtitle>github.com: openvswitch/ovs.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/openvswitch.git/'/>
<entry>
<title>Remove Python 2 leftovers.</title>
<updated>2021-06-22T19:29:57+00:00</updated>
<author>
<name>Rosemarie O'Riorden</name>
<email>roriorde@redhat.com</email>
</author>
<published>2021-06-15T15:58:02+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/openvswitch.git/commit/?id=bd9052455092630e03485538a29f9f8d147c41ca'/>
<id>bd9052455092630e03485538a29f9f8d147c41ca</id>
<content type='text'>
Fixes: 1ca0323e7c29 ("Require Python 3 and remove support for Python 2.")
Reported at: https://bugzilla.redhat.com/show_bug.cgi?id=1949875
Signed-off-by: Rosemarie O'Riorden &lt;roriorde@redhat.com&gt;
Signed-off-by: Ilya Maximets &lt;i.maximets@ovn.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes: 1ca0323e7c29 ("Require Python 3 and remove support for Python 2.")
Reported at: https://bugzilla.redhat.com/show_bug.cgi?id=1949875
Signed-off-by: Rosemarie O'Riorden &lt;roriorde@redhat.com&gt;
Signed-off-by: Ilya Maximets &lt;i.maximets@ovn.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove dependency on python3-six</title>
<updated>2019-12-20T20:23:06+00:00</updated>
<author>
<name>Timothy Redaelli</name>
<email>tredaelli@redhat.com</email>
</author>
<published>2019-12-20T17:35:08+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/openvswitch.git/commit/?id=0c4d144a989a444d038d58272d8571e97e00e86f'/>
<id>0c4d144a989a444d038d58272d8571e97e00e86f</id>
<content type='text'>
Since Python 2 support was removed in 1ca0323e7c29 ("Require Python 3 and
remove support for Python 2."), python3-six is not needed anymore.

Moreover python3-six is not available on RHEL/CentOS7 without using EPEL
and so this patch is needed in order to release OVS 2.13 on RHEL7.

Signed-off-by: Timothy Redaelli &lt;tredaelli@redhat.com&gt;
Signed-off-by: Ben Pfaff &lt;blp@ovn.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Since Python 2 support was removed in 1ca0323e7c29 ("Require Python 3 and
remove support for Python 2."), python3-six is not needed anymore.

Moreover python3-six is not available on RHEL/CentOS7 without using EPEL
and so this patch is needed in order to release OVS 2.13 on RHEL7.

Signed-off-by: Timothy Redaelli &lt;tredaelli@redhat.com&gt;
Signed-off-by: Ben Pfaff &lt;blp@ovn.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Replace most uses of and references to "ifconfig" by "ip".</title>
<updated>2017-06-01T14:21:41+00:00</updated>
<author>
<name>Ben Pfaff</name>
<email>blp@ovn.org</email>
</author>
<published>2017-06-01T14:21:41+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/openvswitch.git/commit/?id=0b2c7e690a0ad1efda5487f828690db64133980e'/>
<id>0b2c7e690a0ad1efda5487f828690db64133980e</id>
<content type='text'>
It's becoming more common that OSes include "ip" but not "ifconfig", so
it's best to avoid using the latter.  This commit removes most references
to "ifconfig" and replaces them by "ip".  It also adds a build-time check
to make it harder to introduce new uses of "ifconfig".

There are important differences between "ifconfig" and "ip":

- An "ifconfig" command that sets an IP address also brings the interface
  up, but a similar "ip addr add" command does not, so it is often necessary
  (or at least precautionary) to add an "ip link set &lt;dev&gt; up" command.

- "ifconfig" can infer a netmask from an IP adddress, but "ip" always
  assumes /32 if none is given.

- "ifconfig" with address 0.0.0.0 removes any configured IP address, but
  "ip addr add" does not, so "ifconfig &lt;dev&gt; 0.0.0.0" must be replaced by
  "ip addr del" or "ip addr flush".

Signed-off-by: Ben Pfaff &lt;blp@ovn.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It's becoming more common that OSes include "ip" but not "ifconfig", so
it's best to avoid using the latter.  This commit removes most references
to "ifconfig" and replaces them by "ip".  It also adds a build-time check
to make it harder to introduce new uses of "ifconfig".

There are important differences between "ifconfig" and "ip":

- An "ifconfig" command that sets an IP address also brings the interface
  up, but a similar "ip addr add" command does not, so it is often necessary
  (or at least precautionary) to add an "ip link set &lt;dev&gt; up" command.

- "ifconfig" can infer a netmask from an IP adddress, but "ip" always
  assumes /32 if none is given.

- "ifconfig" with address 0.0.0.0 removes any configured IP address, but
  "ip addr add" does not, so "ifconfig &lt;dev&gt; 0.0.0.0" must be replaced by
  "ip addr del" or "ip addr flush".

Signed-off-by: Ben Pfaff &lt;blp@ovn.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Adapt to flake8-import-order</title>
<updated>2017-03-09T05:11:48+00:00</updated>
<author>
<name>xurong00037997</name>
<email>xu.rong@zte.com.cn</email>
</author>
<published>2017-02-24T02:03:26+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/openvswitch.git/commit/?id=6c7050b59c50f060492e47126ca43dc6113e5860'/>
<id>6c7050b59c50f060492e47126ca43dc6113e5860</id>
<content type='text'>
https://review.openstack.org/#/c/432906/
flake8-import-order adds 3 new flake8 warnings:
I100: Your import statements are in the wrong order.
I101: The names in your from import are in the wrong order.
I201: Missing newline between sections or imports.

Signed-off-by: Ben Pfaff &lt;blp@ovn.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://review.openstack.org/#/c/432906/
flake8-import-order adds 3 new flake8 warnings:
I100: Your import statements are in the wrong order.
I101: The names in your from import are in the wrong order.
I201: Missing newline between sections or imports.

Signed-off-by: Ben Pfaff &lt;blp@ovn.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>python: Drop usage of long type.</title>
<updated>2016-02-02T21:40:36+00:00</updated>
<author>
<name>Russell Bryant</name>
<email>russell@ovn.org</email>
</author>
<published>2015-12-14T21:32:00+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/openvswitch.git/commit/?id=8f808842a0c3f6b63d027c05db77ff945c29d67c'/>
<id>8f808842a0c3f6b63d027c05db77ff945c29d67c</id>
<content type='text'>
Python 2 has both long and int types.  Python 3 only has int, which
behaves like long.

In the case of needing a set of integer types, we can use
six.integer_types which includes int and long for Python 2 and just int
for Python 3.

We can convert all cases of long(value) to int(value), because as of
Python 2.4, when the result of an operation would be too big for an int,
the type is automatically converted to a long.

There were several places in this patch doing type comparisons.  The
preferred way to do this is using the isinstance() or issubclass()
built-in functions, so I converted the similar checks nearby while I was
at it.

Signed-off-by: Russell Bryant &lt;russell@ovn.org&gt;
Acked-by: Ben Pfaff &lt;blp@ovn.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Python 2 has both long and int types.  Python 3 only has int, which
behaves like long.

In the case of needing a set of integer types, we can use
six.integer_types which includes int and long for Python 2 and just int
for Python 3.

We can convert all cases of long(value) to int(value), because as of
Python 2.4, when the result of an operation would be too big for an int,
the type is automatically converted to a long.

There were several places in this patch doing type comparisons.  The
preferred way to do this is using the isinstance() or issubclass()
built-in functions, so I converted the similar checks nearby while I was
at it.

Signed-off-by: Russell Bryant &lt;russell@ovn.org&gt;
Acked-by: Ben Pfaff &lt;blp@ovn.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>python: Stop using xrange().</title>
<updated>2016-01-20T21:43:54+00:00</updated>
<author>
<name>Russell Bryant</name>
<email>russell@ovn.org</email>
</author>
<published>2015-12-14T19:33:52+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/openvswitch.git/commit/?id=b3ac29477d493d9442f39c734a0a9ebaa223c308'/>
<id>b3ac29477d493d9442f39c734a0a9ebaa223c308</id>
<content type='text'>
Python 2 had range() and xrange().  xrange() is more efficient, but
behaves differently so range() was retained for compatibility.  Python 3
only has range() and it behaves like Python 2's xrange().

Remove explicit use of xrange() and use six.moves.range() to
make sure we're using xrange() from Python 2 or range() from Python 3.

Signed-off-by: Russell Bryant &lt;russell@ovn.org&gt;
Acked-by: Ben Pfaff &lt;blp@ovn.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Python 2 had range() and xrange().  xrange() is more efficient, but
behaves differently so range() was retained for compatibility.  Python 3
only has range() and it behaves like Python 2's xrange().

Remove explicit use of xrange() and use six.moves.range() to
make sure we're using xrange() from Python 2 or range() from Python 3.

Signed-off-by: Russell Bryant &lt;russell@ovn.org&gt;
Acked-by: Ben Pfaff &lt;blp@ovn.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>python: Fix xmlrpclib imports.</title>
<updated>2016-01-20T21:43:15+00:00</updated>
<author>
<name>Russell Bryant</name>
<email>russell@ovn.org</email>
</author>
<published>2015-12-14T19:03:14+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/openvswitch.git/commit/?id=73eb682edb67f44aead7f2c70e9e8777e87df898'/>
<id>73eb682edb67f44aead7f2c70e9e8777e87df898</id>
<content type='text'>
Fix imports of xmlrpclib to be compatible with Python 3.  Python 2 had
xmlrpclib (client) and SimpleXMLRPCServer (server).  In Python 3, these
have been renamed to xmlrpc.client and xmlrpc.server.

The solution implemented here is to use the six library.  It may seem
excessive for this particular issue, but the six library provides
helpers for Python 2 and 3 compatibility for many different issues.
This is just the first of many uses of the six library.

Signed-off-by: Russell Bryant &lt;russell@ovn.org&gt;
Acked-by: Ben Pfaff &lt;blp@ovn.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix imports of xmlrpclib to be compatible with Python 3.  Python 2 had
xmlrpclib (client) and SimpleXMLRPCServer (server).  In Python 3, these
have been renamed to xmlrpc.client and xmlrpc.server.

The solution implemented here is to use the six library.  It may seem
excessive for this particular issue, but the six library provides
helpers for Python 2 and 3 compatibility for many different issues.
This is just the first of many uses of the six library.

Signed-off-by: Russell Bryant &lt;russell@ovn.org&gt;
Acked-by: Ben Pfaff &lt;blp@ovn.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>python: Fix print function compatibility.</title>
<updated>2016-01-12T16:47:33+00:00</updated>
<author>
<name>Russell Bryant</name>
<email>russell@ovn.org</email>
</author>
<published>2015-12-14T15:21:53+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/openvswitch.git/commit/?id=8ea171aba044bf605c31313330ccabfc4fc5846c'/>
<id>8ea171aba044bf605c31313330ccabfc4fc5846c</id>
<content type='text'>
The print statement from Python 2 is a function in Python 3.  Enable
print function support for Python 2 and convert print statements to
function calls.

Enable the H233 flake8 warning.  If the hacking plugin is installed,
this will generate warnings for print statement usage not compatible
with Python 3.

  H233 Python 3.x incompatible use of print operator

Signed-off-by: Russell Bryant &lt;russell@ovn.org&gt;
Acked-by: Ben Pfaff &lt;blp@ovn.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The print statement from Python 2 is a function in Python 3.  Enable
print function support for Python 2 and convert print statements to
function calls.

Enable the H233 flake8 warning.  If the hacking plugin is installed,
this will generate warnings for print statement usage not compatible
with Python 3.

  H233 Python 3.x incompatible use of print operator

Signed-off-by: Russell Bryant &lt;russell@ovn.org&gt;
Acked-by: Ben Pfaff &lt;blp@ovn.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>python: Stop use of tuple parameter unpacking</title>
<updated>2016-01-12T16:47:33+00:00</updated>
<author>
<name>Russell Bryant</name>
<email>russell@ovn.org</email>
</author>
<published>2015-12-14T19:22:21+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/openvswitch.git/commit/?id=66d61c90a79db159cc43e3f17c57d83d9a99453f'/>
<id>66d61c90a79db159cc43e3f17c57d83d9a99453f</id>
<content type='text'>
Python 3 removed support for tuple parameter unpacking.

https://www.python.org/dev/peps/pep-3113/

Instead of:

    def foo((a, b)):
        print(a)
        print(b)

you should do:

    def foo(a_b):
        a, b = a_b
        print(a)
        print(b)

but in both uses here, the values were never used so the fix is even
simpler.

Signed-off-by: Russell Bryant &lt;russell@ovn.org&gt;
Acked-by: Ben Pfaff &lt;blp@ovn.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Python 3 removed support for tuple parameter unpacking.

https://www.python.org/dev/peps/pep-3113/

Instead of:

    def foo((a, b)):
        print(a)
        print(b)

you should do:

    def foo(a_b):
        a, b = a_b
        print(a)
        print(b)

but in both uses here, the values were never used so the fix is even
simpler.

Signed-off-by: Russell Bryant &lt;russell@ovn.org&gt;
Acked-by: Ben Pfaff &lt;blp@ovn.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>python: Resolve some indentation warnings.</title>
<updated>2016-01-05T23:18:21+00:00</updated>
<author>
<name>Russell Bryant</name>
<email>russell@ovn.org</email>
</author>
<published>2016-01-05T19:50:40+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/openvswitch.git/commit/?id=eda26d40ae086539e7de3770818f80580fc231b3'/>
<id>eda26d40ae086539e7de3770818f80580fc231b3</id>
<content type='text'>
This patch resolves the following warnings from flake8:

 E111 indentation is not a multiple of four
 E112 expected an indented block
 E113 unexpected indentation

It's critical to have correct indentation in Python code, so it seemed
worth enabling these warnings.

Signed-off-by: Russell Bryant &lt;russell@ovn.org&gt;
Acked-by: Ben Pfaff &lt;blp@ovn.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch resolves the following warnings from flake8:

 E111 indentation is not a multiple of four
 E112 expected an indented block
 E113 unexpected indentation

It's critical to have correct indentation in Python code, so it seemed
worth enabling these warnings.

Signed-off-by: Russell Bryant &lt;russell@ovn.org&gt;
Acked-by: Ben Pfaff &lt;blp@ovn.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
