This allows things like initiating a wait request on an interface
ofport being set.
When the optional field is empty and operation is != or excludes
then the result is true; otherwise it is false. If the field is
set then the field is compared normally for its type.
Signed-off-by: Terry Wilson
I currently have a patch that adds a C extension module to wrap the
in-tree JSON parser. It works with both Python 2 and 3. The
performance increase is quite large. For example, parsing a 100Mb JSON
file:
Without extension: 273 seconds
With extension: 3.7 seconds
On the object->string side, I
On Fri, May 6, 2016 at 10:30 AM, Ben Pfaff wrote:
>> I'd like to avoid having to wrap the serialization stuff when there is
>> something else that already works and is better, but if I have to I
>> will. Just looking for opinions on what I should do. Here's the test
>> failure output:
>
> Both for
There is no particularly good reason to use our own Python JSON
serialization implementation when serialization can be done faster
with Python's built-in JSON library.
A few tests were changed due to Python's default JSON library
returning slightly more precise floating point numbers and returning
The pure Python in-tree JSON parser is *much* slower than the
in-tree C JSON parser. A local test parsing a 100Mb JSON file
showed the Python version taking 270 seconds. With the C wrapper,
it took 4 seconds.
The C extension will be used automatically if it can be built. If
the extension fails to
The pure Python in-tree JSON parser is *much* slower than the
in-tree C JSON parser. A local test parsing a 100Mb JSON file
showed the Python version taking 270 seconds. With the C wrapper,
it took 4 seconds.
The C extension will be used automatically if it can be built. If
the extension fails to
There is no particularly good reason to use our own Python JSON
serialization implementation when serialization can be done faster
with Python's built-in JSON library.
A few tests were changed due to Python's default JSON library
returning slightly more precise floating point numbers and returning
Python and wrapped versions, so theoretically I'd
need tests to handle both cases. Anyone have any ideas?
Terry Wilson (2):
Add optional C extension wrapper for Python JSON parsing
JSON serialization via Python's json lib
Makefile.am| 2 +-
python/automake.mk | 3 +
pyth
The pure Python in-tree JSON parser is *much* slower than the
in-tree C JSON parser. A local test parsing a 100Mb JSON file
showed the Python version taking 270 seconds. With the C wrapper,
it took under 4 seconds.
The C extension will be used automatically if it can be built. If
the extension fai
There is no particularly good reason to use our own Python JSON
serialization implementation when serialization can be done faster
with Python's built-in JSON library.
A few tests were changed due to Python's default JSON library
returning slightly more precise floating point numbers and returning
On Wed, May 18, 2016 at 8:12 PM, Ben Pfaff wrote:
> These patches apply cleanly but they cause test failures for me, see
> below. Maybe that is because of the issue you mentioned above?
Yeah, these test issues are because the C extension ends up not
getting built automatically. I'm having troubl
The pure Python in-tree JSON parser is *much* slower than the
in-tree C JSON parser. A local test parsing a 100Mb JSON file
showed the Python version taking 270 seconds. With the C wrapper,
it took under 4 seconds.
The C extension will be used automatically if it can be built. If
the extension fai
The / operation in Python 2 is "floor division" for int/long types
while in Python 3 is "true division". This means that the
significand can become a float with the existing code in Python 3.
This, in turn, can result in a parse of something like [1.10e1]
returning 11 in Python 2 and 11.0 in Python
There is no particularly good reason to use our own Python JSON
serialization implementation when serialization can be done faster
with Python's built-in JSON library.
A few tests were changed due to Python's default JSON library
returning slightly more precise floating point numbers.
---
configu
build system changes are resolved in this
version.
Terry Wilson (3):
Ensure significand remains an integer in Python3 json parser
Add optional C extension wrapper for Python JSON parsing
JSON serialization via Python's json lib
Makefile.am| 2 +-
configure.ac | 2
These patches should address the previous issue with building the
Python wrapper when builddir != srcdir. It also ensures that the
wrapper can be properly built by pip from out-of-tree by ensuring
that json.h is added to include/openvswitch/json.h.
Terry Wilson (2):
Move lib/json.h to include
id not use anything from there, but rather from
include/openvswitch/util.h. Fixing that required including util.h
in several C files mostly due to OVS_NOT_REACHED and things like
xmalloc.
Signed-off-by: Terry Wilson
---
include/openvswitch/automake.mk | 3 +
include/openvswitch/hmap.h
Signed-off-by: Terry Wilson
---
configure.ac | 2 +
m4/openvswitch.m4 | 47
python/automake.mk | 26 -
python/ovs/json.py | 106 +
tests/json.at | 26 ++---
5 files changed, 103
I noticed that with the previous patch, in testing 'make install'
with patch to move json.h, I had forgotten to remove the installed
headers. Removing the installed headers revealed that this patch
still didn't build properly from a separate build directory. This
time it *shoul
Signed-off-by: Terry Wilson
---
configure.ac | 2 +
m4/openvswitch.m4 | 47
python/automake.mk | 27 +-
python/ovs/json.py | 106 +
tests/json.at | 26 ++---
5 files changed, 104
Terry
On Fri, Jul 22, 2016 at 9:57 PM, Terry Wilson wrote:
> There is no particularly good reason to use our own Python JSON
> serialization implementation when serialization can be done faster
> with Python's built-in JSON library.
>
> A few tests were changed due to Pyth
Signed-off-by: Terry Wilson
---
python/ovs/json.py | 106 +
tests/json.at | 26 ++---
2 files changed, 30 insertions(+), 102 deletions(-)
diff --git a/python/ovs/json.py b/python/ovs/json.py
index ea0400a..ddf5dd2 100644
--- a/
This patch removes the json extension build system changes since they
aren't even related to the serialization change, which is pure-Python.
Terry Wilson (1):
JSON serialization via Python's json lib
python/ovs/json.py | 106 +
tes
On Fri, Jul 29, 2016 at 12:27 AM, Ben Pfaff wrote:
> On Mon, Jul 25, 2016 at 06:55:49PM -0500, Terry Wilson wrote:
>> Sigh. And of course I had libopenvswitch installed on the system as
>> well and removing it breaks building the extensions with the above
>> patch. This is t
build system changes are resolved in this
version.
Terry Wilson (3):
Ensure significand remains an integer in Python3 json parser
Add optional C extension wrapper for Python JSON parsing
JSON serialization via Python's json lib
Makefile.am| 2 +-
configure.ac | 2
Python 2 and 11.0 in Python 3. Switching to the
// operator resolves this difference.
The JSON tests do not catch this difference because the built-in
serializer prints floats with the %.15g format which will convert
floats with no fractional part to an integer representation.
Signed-off-by: Terry Wil
Signed-off-by: Terry Wilson
---
configure.ac | 2 +
m4/openvswitch.m4 | 47
python/automake.mk | 22 +++
python/ovs/json.py | 106 +
tests/json.at | 26 ++---
5 files changed, 101 insertio
igned-off-by: Terry Wilson
---
Makefile.am| 2 +-
python/automake.mk | 3 +
python/ovs/_json.c | 268 +
python/ovs/json.py | 11 +++
python/setup.py| 51 +-
5 files changed, 332 insertions(+), 3 deletions(-)
create
On Thu, Jun 9, 2016 at 3:07 AM, Russell Bryant wrote:
> The real solution to making this less awkward would be to split the Python
> library out of the OVS git tree so that it can be released independently of
> OVS itself. That way a proper verison could be released that includes
> Python 3 suppo
Signed-off-by: Terry Wilson
---
configure.ac | 2 +
m4/openvswitch.m4 | 47
python/automake.mk | 22 +++
python/ovs/json.py | 106 +
tests/json.at | 26 ++---
5 files changed, 101 insertio
Signed-off-by: Terry Wilson
---
configure.ac | 2 +
m4/openvswitch.m4 | 47
python/automake.mk | 26 -
python/ovs/json.py | 106 +
tests/json.at | 26 ++---
5 files changed, 103
On Thu, Jun 9, 2016 at 10:04 PM, Joe Stringer wrote:
>> On Thu, Jun 9, 2016 at 3:07 AM, Russell Bryant wrote:
>>> The real solution to making this less awkward would be to split the Python
>>> library out of the OVS git tree so that it can be released independently of
>>> OVS itself. That way a
On Wed, Mar 23, 2016 at 2:31 PM, Jason Kölker wrote:
> On Wed, Mar 23, 2016 at 6:29 PM, Ben Pfaff wrote:
>> On Sun, Mar 20, 2016 at 03:29:06AM +, Jason Kölker wrote:
>>> Callers to Idl.run() should be able to specify the number of iterations
>>> to run in one call. Instrumentation revealed th
On Thu, Aug 11, 2016 at 8:53 PM, Aaron Conole wrote:
> I've been working on a better solution - it occurred to me that since
> this is being done for linux-only anyway, I might as well do this with
> systemd. I can get almost everything done with no C code changes, thus
> far. Once I figure out
This patch fixes just the Python 3 problems found by running
python3 setup.py install
There are still many other issues to be fixed, but this is a start.
Signed-off-by: Terry Wilson
---
python/ovs/daemon.py | 31 ---
python/ovs/db/idl.py | 10
This adds very basic support for setuptools so that the OVS Python
lib can be added to PyPI.
This currently uses the Open vSwitch version number and the
generated dirs.py, though there is no real reason to tie the
Python libraries releases or version numbers to the main project's.
---
Reposting t
Signed-off-by: Terry Wilson
/me sighs
___
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev
- Original Message -
> On 04/10/2015 03:57 PM, Terry Wilson wrote:
> > This adds very basic support for setuptools so that the OVS Python
> > lib can be added to PyPI.
>
> Most Python libraries are on PyPI, so it makes sense to put this one
> there, too. Anot
N response on an update to a Row object to make it easy for
users of notify() to see what changed, though this usage of Row
is quite different than Idl's typical use.
Signed-off-by: Terry Wilson
---
python/ovs/db/idl.py | 42 +-
1 file changed, 41 i
N response on an update to a Row object to make it easy for
users of notify() to see what changed, though this usage of Row
is quite different than Idl's typical use.
Signed-off-by: Terry Wilson
---
python/ovs/db/idl.py | 42 +-
tests/ovsd
N response on an update to a Row object to make it easy for
users of notify() to see what changed, though this usage of Row
is quite different than Idl's typical use.
Signed-off-by: Terry Wilson
---
python/ovs/db/idl.py | 42 +-
tests/ovsd
This patch fixes just the Python 3 problems found by running
python3 setup.py install
There are still many other issues to be fixed, but this is a start.
Signed-off-by: Terry Wilson
---
python/compat/argparse.py | 2 +-
python/ovs/daemon.py | 31
- Original Message -
> On Wed, May 27, 2015 at 12:11:55AM -0400, Russell Bryant wrote:
> > On 05/26/2015 10:14 PM, Ben Pfaff wrote:
> > > On Tue, May 26, 2015 at 10:31:57AM -0400, Russell Bryant wrote:
> > >> On 05/21/2015 10:23 PM, Andy Hill wrote:
> > As a consequence, this require
43 matches
Mail list logo