similar to: Re: python 3 bindings on libguestfs

Displaying 20 results from an estimated 4000 matches similar to: "Re: python 3 bindings on libguestfs"

2017 May 09
0
[PATCH] python: add simple wrappers for PyObject<->string functions
The current need for #ifdef's based on the presence of PyString_FromString makes both the OCaml code of the generator, and the generated C code a mess to read. Hence, add three simple wrappers to make both the OCaml, and C code more readable, and easier to tweak in the future. --- generator/python.ml | 72 ++++++++++++----------------------------------------- python/handle.c | 52
2017 May 09
1
[PATCH v2] python: add simple wrappers for PyObject<->string functions
The current need for #ifdef's based on the presence of PyString_FromString makes both the OCaml code of the generator, and the generated C code a mess to read. Hence, add three simple wrappers to make both the OCaml, and C code more readable, and easier to tweak in the future. --- generator/python.ml | 72 ++++++++++++----------------------------------------- python/handle.c | 65
2016 Apr 01
1
[PATCH] python: Fix bug in code generator
When a struct containing FChar fields is defined in generator/structs.ml, the Python code generator will generate code referencing a dirent struct instead of the correct one thus breaking at compile time. This bug was left unnoticed because the dirent struct is the only one using FChar fields. Yet it prevents any other struct from using such fields. Signed-off-by: Matteo Cafasso <noxdafox at
2017 Mar 18
0
[PATCH] python: check return value of Python APIs
Addressing issue #1406906. When constructing the returned objects, check the return value of Python APIs. This is especially relevant when dealing with non UTF-8 strings. A RuntimeError will be raised on failure pointing to the problematic entry and the field name. Signed-off-by: Matteo Cafasso <noxdafox@gmail.com> --- generator/python.ml | 143
2017 Apr 25
1
[Bug #1406906] [PATCH] python: fix segmentation fault when setting non UTF-8 strings
When constructing the returned objects, check the return value of Python APIs. A RuntimeError will be raised on failure pointing to the problematic entry and the field name. Signed-off-by: Matteo Cafasso <noxdafox@gmail.com> --- generator/python.ml | 143 +++++++++++++++++++++++++++++++++++----------------- 1 file changed, 97 insertions(+), 46 deletions(-) diff --git
2016 Apr 01
0
[PATCH] python: Fix bug in code generator
EDIT: forgot to add the list to the subject, sorry for the spam. When a struct containing FChar fields is defined in generator/structs.ml, the Python code generator will generate code referencing a dirent struct instead of the correct one thus breaking at compile time. This bug was left unnoticed because the dirent struct is the only one using FChar fields. Yet it prevents any other struct from
2017 May 21
0
[PATCH 2/2] python: unicode decode handler error scheme setter
The set_decode_error_handler function allows the User to set the decoding error scheme to be used when non UTF8 characters are encountered in Python 3. The function has no effect in Python 2. Signed-off-by: Matteo Cafasso <noxdafox@gmail.com> --- generator/python.ml | 16 ++++++++++++++++ python/handle.c | 18 ++++++++++++++++-- python/t/test830RHBZ1406906.py |
2014 Jan 15
0
[PATCH 3/4] hivex: python: Produce Unicode strings in get_* methods
--- generator/generator.ml | 23 ++++------------------- 1 file changed, 4 insertions(+), 19 deletions(-) diff --git a/generator/generator.ml b/generator/generator.ml index 1f2690d..908c5f3 100755 --- a/generator/generator.ml +++ b/generator/generator.ml @@ -2925,11 +2925,7 @@ put_string_list (char * const * const argv) list = PyList_New (argc); for (i = 0; i < argc; ++i) { -#ifdef
2018 Jan 25
0
Re: python 3 bindings on libguestfs
On Thu, Jan 25, 2018 at 03:09:47PM +0000, abinaya.manikandan@wipro.com wrote: > Hi, > > As per you suggestion I have set PYTHONPATH. > Now the issue is different. > > [root@euca-172-31-15-221 ~]$ echo $PYTHONPATH > /opt/libguestfs/x86_64/1.32.10/lib64:/opt/libguestfs/x86_64/1.32.10/lib/python3.6/site-packages/: > [root@euca-172-31-15-221 ~]$ python > Python 3.6.0
2018 Jan 30
0
Re: python 3 bindings on libguestfs
On Tue, Jan 30, 2018 at 02:05:51PM +0000, abinaya.manikandan@wipro.com wrote: > Hi, > > Finally on our RHEL7 machine we are able to bind python with libguestfs. > Please find below log: > > checking for PYTHON... yes > checking Python prefix... /opt/python/x86_64/3.6.3-1 > configure: Python install dir /opt/libguestfs/x86_64/1.32.10-1.el7/lib/python3.6/site-packages >
2017 May 06
5
[Bug 1406906] [PATCH 0/3] Fix segmentation fault in Python bindings
This series addresses the issue where non UTF8 file names in a guest image lead to libguestfs segfault with Python 3 APIs. The core issue is the APIs are not checking the return value when constructing a new PyObject. Therefore NULL pointers are added to Python collections (lists and dictionaries) crashing the application. Few notes regarding the comments on the previous patch. - Added a
2020 Jan 09
9
[PATCH 0/7] Various Python cleanups.
Patch #7 depends on: https://www.redhat.com/archives/libguestfs/2020-January/msg00035.html No, Python < 3 support is not dropped yet, however it will be easier after this series. Pino Toscano (7): build: enforce a minimum Python version python: drop code for Python < 2.5 python: assume support for Capsules python: remove compile time check for PyString_AsString python: replace
2019 Sep 11
0
[PATCH nbdkit] python: Drop support for Python 2.
Starting with nbdkit 1.16, Python >= 3.3 will be required. Python 2 reaches end of life on 2020-01-01: https://python3statement.org/ https://pythonclock.org/ Debian oldoldstable and RHEL 7 have Python 3.4 and 3.6 respectively, so it seems pointless to try to support Python < 3.3 which lacked support for PyUnicode_AsUTF8. --- README | 13 +++++++------ configure.ac
2014 Nov 04
1
Re: [PATCH 7/9] python: fix detection of libpython features
On Tue, Nov 04, 2014 at 04:35:30PM +0100, Pino Toscano wrote: > Instead of querying distutils.sysconfig for the library name, just use > the $PYTHON_LIBS returned by pkg-config. This makes sure the tests can > link even with a libpython in a non-standard library directory. > --- > configure.ac | 10 ++-------- > 1 file changed, 2 insertions(+), 8 deletions(-) > > diff
2018 Apr 05
0
[PATCH nbdkit] python: Turn python exceptions into nbdkit errors properly.
--- configure.ac | 8 +++++++ plugins/python/python.c | 51 +++++++++++++++++++++++++++++++++++++++--- tests/Makefile.am | 1 + tests/python-exception.py | 45 +++++++++++++++++++++++++++++++++++++ tests/test-python-exception.sh | 42 ++++++++++++++++++++++++++++++++++ 5 files changed, 144 insertions(+), 3 deletions(-) diff --git a/configure.ac
2011 Dec 10
1
[PATCH] Fixed checks for libpython features
The python3.1 package shipped with Debian/squeeze does not have the 'mu' suffix that was assumed before. --- configure.ac | 23 ++++++++++++----------- 1 files changed, 12 insertions(+), 11 deletions(-) diff --git a/configure.ac b/configure.ac index 28243a2..c2b684b 100644 --- a/configure.ac +++ b/configure.ac @@ -738,19 +738,20 @@ AS_IF([test "x$enable_python" !=
2014 Aug 08
2
[PATCH 1/2] Add type checking, support integers as value
Before this patch, Python would segfault once you pass a non-string key or value to node_set_value. It was also not possible to set bytes on Python 3 as Unicode was assumed (Python 2 was not affected by this). This patch fixes recognition of bytes for Python 3, but in addition it recognizes ints (includes 'long' in Python 2) for DWORD (LE + BE) and QWORDs. For this purpose, a new field
2014 Nov 04
0
[PATCH 7/9] python: fix detection of libpython features
Instead of querying distutils.sysconfig for the library name, just use the $PYTHON_LIBS returned by pkg-config. This makes sure the tests can link even with a libpython in a non-standard library directory. --- configure.ac | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/configure.ac b/configure.ac index 87e066c..1bf291c 100644 --- a/configure.ac +++ b/configure.ac
2020 Apr 26
5
[PATCH v3] python: Fix UnicodeError in inspect_list_applications2() (RHBZ#1684004)
The python3 bindings create PyUnicode objects from application strings on the guest (i.e. installed rpm, deb packages). It is documented that rpm package fields such as description should be utf8 encoded - however in some cases they are not a valid unicode string, on SLES11 SP4 the encoding of the description of the following packages is latin1 and they fail to be converted to unicode using
2020 Jun 30
3
Re: [PATCH v3] python: Fix UnicodeError in inspect_list_applications2() (RHBZ#1684004)
Hey Pino, Can you search for the previous patches I submitted? I had some discussions regarding this with Daniel and Nir. Thanks! On Tue, Jun 30, 2020 at 11:43 AM Pino Toscano <ptoscano@redhat.com> wrote: > On Sunday, 26 April 2020 20:14:03 CEST Sam Eiderman wrote: > > The python3 bindings create PyUnicode objects from application strings > > on the guest (i.e. installed