Hello community,

here is the log from the commit of package python-rpy2 for openSUSE:Factory 
checked in at 2020-02-03 11:13:08
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-rpy2 (Old)
 and      /work/SRC/openSUSE:Factory/.python-rpy2.new.26092 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-rpy2"

Mon Feb  3 11:13:08 2020 rev:8 rq:768808 version:3.2.5

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-rpy2/python-rpy2.changes  2019-11-28 
10:15:49.923638207 +0100
+++ /work/SRC/openSUSE:Factory/.python-rpy2.new.26092/python-rpy2.changes       
2020-02-03 11:13:14.097842404 +0100
@@ -1,0 +2,11 @@
+Thu Jan 30 15:31:13 UTC 2020 - Todd R <[email protected]>
+
+- Update to 3.2.5
+  * Delimit multi-line expressions with parenthesis rather than backslash.
+  * Use Rf_initEmbeddedR(), remove setup_Rmainloop() (not necessary, it seems).
+- Update to 3.2.4
+  * Fix ABI mode
+- Update to 3.2.3
+  * Backport fix for segfault when parsing.
+  
+-------------------------------------------------------------------

Old:
----
  rpy2-3.2.2.tar.gz

New:
----
  rpy2-3.2.5.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-rpy2.spec ++++++
--- /var/tmp/diff_new_pack.eanT7U/_old  2020-02-03 11:13:14.913842816 +0100
+++ /var/tmp/diff_new_pack.eanT7U/_new  2020-02-03 11:13:14.917842819 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package python-rpy2
 #
-# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2020 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -19,7 +19,7 @@
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 %define         skip_python2 1
 Name:           python-rpy2
-Version:        3.2.2
+Version:        3.2.5
 Release:        0
 Summary:        A Python interface to the R Programming Language
 License:        GPL-2.0-or-later

++++++ rpy2-3.2.2.tar.gz -> rpy2-3.2.5.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rpy2-3.2.2/NEWS new/rpy2-3.2.5/NEWS
--- old/rpy2-3.2.2/NEWS 2019-11-03 17:06:41.000000000 +0100
+++ new/rpy2-3.2.5/NEWS 2020-01-26 22:04:38.000000000 +0100
@@ -1,3 +1,37 @@
+Release 3.2.5
+=============
+
+Bugs fixed
+----------
+
+- Latest release for R package `rlang` broke import through `importr()`.
+  A workaround for :mod:`rpy2.robjects.lib.ggplot2` is to rename the
+  offending R object (issue #631).
+
+Changes
+-------
+
+- f-string requiring Python >= 3.6 removed.
+
+
+Release 3.2.4
+=============
+
+Bugs fixed
+----------
+
+- An incomplete backport of the bug fixed in 3.2.3 broke the ABI mode.
+
+
+Release 3.2.3
+=============
+
+Bugs fixed
+----------
+
+- Error when parsing strings as R codes could result in a segfault. 
+
+
 Release 3.2.2
 =============
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rpy2-3.2.2/PKG-INFO new/rpy2-3.2.5/PKG-INFO
--- old/rpy2-3.2.2/PKG-INFO     2019-11-03 17:07:59.000000000 +0100
+++ new/rpy2-3.2.5/PKG-INFO     2020-01-26 22:08:18.000000000 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: rpy2
-Version: 3.2.2
+Version: 3.2.5
 Summary: Python interface to the R language (embedded R)
 Home-page: https://rpy2.bitbucket.io
 Author: Laurent Gautier
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rpy2-3.2.2/rpy2/__init__.py 
new/rpy2-3.2.5/rpy2/__init__.py
--- old/rpy2-3.2.2/rpy2/__init__.py     2019-11-02 23:27:08.000000000 +0100
+++ new/rpy2-3.2.5/rpy2/__init__.py     2020-01-26 22:04:38.000000000 +0100
@@ -1,4 +1,4 @@
 
-__version_vector__ = (3,2,2)
+__version_vector__ = (3,2,5)
 
 __version__ = '.'.join(str(x) for x in __version_vector__)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rpy2-3.2.2/rpy2/_rinterface_cffi_build.py 
new/rpy2-3.2.5/rpy2/_rinterface_cffi_build.py
--- old/rpy2-3.2.2/rpy2/_rinterface_cffi_build.py       2019-09-28 
16:28:06.000000000 +0200
+++ new/rpy2-3.2.5/rpy2/_rinterface_cffi_build.py       2020-01-26 
22:04:38.000000000 +0100
@@ -150,7 +150,9 @@
                   ffi_proxy._processevents_def,
                   ffi_proxy._busy_def,
                   ffi_proxy._callback_def,
-                  ffi_proxy._yesnocancel_def])
+                  ffi_proxy._yesnocancel_def,
+                  ffi_proxy._parsevector_wrap_def,
+                  ffi_proxy._handler_def])
 
     cdef = (create_cdef(definitions, header_filename) +
             callback_defns_api)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rpy2-3.2.2/rpy2/rinterface_lib/R_API.h 
new/rpy2-3.2.5/rpy2/rinterface_lib/R_API.h
--- old/rpy2-3.2.2/rpy2/rinterface_lib/R_API.h  2019-10-18 05:08:30.000000000 
+0200
+++ new/rpy2-3.2.5/rpy2/rinterface_lib/R_API.h  2020-01-26 22:04:38.000000000 
+0100
@@ -252,6 +252,9 @@
 SEXP Rf_eval(SEXP, SEXP);
 SEXP R_tryEval(SEXP, SEXP, int*);
 
+SEXP R_tryCatchError(SEXP (*fun)(void *data), void *data,
+                    SEXP (*hndlr)(SEXP cond, void *hdata), void *hdata);
+
 SEXP Rf_findFun(SEXP sym, SEXP env);
 // SEXP Rf_findFun3(SEXP, SEXP, SEXP);
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rpy2-3.2.2/rpy2/rinterface_lib/_rinterface_capi.py 
new/rpy2-3.2.5/rpy2/rinterface_lib/_rinterface_capi.py
--- old/rpy2-3.2.2/rpy2/rinterface_lib/_rinterface_capi.py      2019-09-28 
03:14:53.000000000 +0200
+++ new/rpy2-3.2.5/rpy2/rinterface_lib/_rinterface_capi.py      2020-01-26 
22:04:38.000000000 +0100
@@ -19,6 +19,8 @@
 _R_PRESERVED = dict()
 _PY_PASSENGER = dict()
 
+FFI_MODE = ffi_proxy.get_ffi_mode(openrlib._rinterface_cffi)
+
 
 def get_rid(cdata) -> int:
     """Get the identifier for the R object.
@@ -502,24 +504,56 @@
         self.status = status
 
 
-def _parse(cdata, num):
-    rlib = openrlib.rlib
-    status = ffi.new('ParseStatus[1]', None)
-    res = rlib.Rf_protect(
-        rlib.R_ParseVector(
+@ffi_proxy.callback(ffi_proxy._parsevector_wrap_def,
+                    openrlib._rinterface_cffi)
+def _parsevector_wrap(data):
+    try:
+        cdata, num, status = ffi.from_handle(data)
+        res = openrlib.rlib.R_ParseVector(
             cdata,  # text
             num,
             status,
-            rlib.R_NilValue)
-    )
-    # TODO: design better handling of possible status:
-    # PARSE_NULL,
-    # PARSE_OK,
-    # PARSE_INCOMPLETE,
-    # PARSE_ERROR,
-    # PARSE_EOF
-    if status[0] != rlib.PARSE_OK:
-        rlib.Rf_unprotect(1)
-        raise RParsingError('R parsing', PARSING_STATUS(status[0]))
-    rlib.Rf_unprotect(1)
+            openrlib.rlib.R_NilValue)
+    except Exception as e:
+        res = openrlib.rlib.R_NilValue
+        logger.error('_parsevector_wrap: %s', str(e))
+    return res
+
+
+@ffi_proxy.callback(ffi_proxy._handler_def,
+                    openrlib._rinterface_cffi)
+def _handler_wrap(cond, hdata):
+    return openrlib.rlib.R_NilValue
+
+
+if FFI_MODE is ffi_proxy.InterfaceType.ABI:
+    _parsevector_wrap = _parsevector_wrap
+    _handler_wrap = _handler_wrap
+elif FFI_MODE is ffi_proxy.InterfaceType.API:
+    _parsevector_wrap = openrlib.rlib._parsevector_wrap
+    _handler_wrap = openrlib.rlib._handler_wrap
+else:
+    raise ImportError('cffi mode unknown: %s' % FFI_MODE)
+
+
+def _parse(cdata, num):
+    status = ffi.new('ParseStatus[1]', None)
+    data = ffi.new_handle((cdata, num, status))
+    hdata = ffi.NULL
+    with memorymanagement.rmemory() as rmemory:
+        res = rmemory.protect(
+            openrlib.rlib.R_tryCatchError(
+                _parsevector_wrap, data,
+                _handler_wrap, hdata
+            )
+        )
+        # TODO: design better handling of possible status:
+        # PARSE_NULL,
+        # PARSE_OK,
+        # PARSE_INCOMPLETE,
+        # PARSE_ERROR,
+        # PARSE_EOF
+        if status[0] != openrlib.rlib.PARSE_OK:
+            raise RParsingError('Parsing status not OK',
+                                PARSING_STATUS(status[0]))
     return res
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rpy2-3.2.2/rpy2/rinterface_lib/ffi_proxy.py 
new/rpy2-3.2.5/rpy2/rinterface_lib/ffi_proxy.py
--- old/rpy2-3.2.2/rpy2/rinterface_lib/ffi_proxy.py     2019-09-25 
03:19:37.000000000 +0200
+++ new/rpy2-3.2.5/rpy2/rinterface_lib/ffi_proxy.py     2019-12-18 
22:36:55.000000000 +0100
@@ -79,3 +79,9 @@
 _callback_def = SignatureDefinition('_callback', 'void', ('void', ))
 # TODO: should be const char *
 _yesnocancel_def = SignatureDefinition('_yesnocancel', 'int', ('char *', ))
+
+_parsevector_wrap_def = SignatureDefinition('_parsevector_wrap',
+                                            'SEXP', ('void *data', ))
+
+_handler_def = SignatureDefinition('_handler_wrap',
+                                   'SEXP', ('SEXP cond', 'void *hdata'))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rpy2-3.2.2/rpy2/robjects/lib/dplyr.py 
new/rpy2-3.2.5/rpy2/robjects/lib/dplyr.py
--- old/rpy2-3.2.2/rpy2/robjects/lib/dplyr.py   2019-09-25 03:19:37.000000000 
+0200
+++ new/rpy2-3.2.5/rpy2/robjects/lib/dplyr.py   2020-01-25 19:44:48.000000000 
+0100
@@ -8,7 +8,6 @@
     warnings.simplefilter("ignore")
     dplyr = importr('dplyr', on_conflict="warn")
     lazyeval = importr('lazyeval', on_conflict="warn")
-    rlang = importr('rlang', on_conflict="warn", signature_translation=False)
     dplyr = WeakPackage(dplyr._env,
                         dplyr.__rname__,
                         translation=dplyr._translation,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rpy2-3.2.2/rpy2/robjects/lib/ggplot2.py 
new/rpy2-3.2.5/rpy2/robjects/lib/ggplot2.py
--- old/rpy2-3.2.2/rpy2/robjects/lib/ggplot2.py 2019-09-25 03:19:37.000000000 
+0200
+++ new/rpy2-3.2.5/rpy2/robjects/lib/ggplot2.py 2020-01-25 19:44:38.000000000 
+0100
@@ -52,7 +52,8 @@
 
 NULL = robjects.NULL
 
-rlang = importr('rlang', on_conflict='warn')
+rlang = importr('rlang', on_conflict='warn',
+                robject_translations={'.env': '__env'})
 lazyeval = importr('lazyeval', on_conflict='warn')
 base = importr('base', on_conflict='warn')
 ggplot2 = importr('ggplot2', on_conflict='warn')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rpy2-3.2.2/rpy2/situation.py 
new/rpy2-3.2.5/rpy2/situation.py
--- old/rpy2-3.2.2/rpy2/situation.py    2019-11-03 16:51:22.000000000 +0100
+++ new/rpy2-3.2.5/rpy2/situation.py    2020-01-26 22:04:38.000000000 +0100
@@ -95,7 +95,10 @@
     elif system == 'Darwin':
         lib_path = os.path.join(r_home, 'lib', 'libR.dylib')
     else:
-        raise ValueError(f'The system {system} is currently not supported.')
+        raise ValueError(
+            'The system {system} is currently not supported.'
+            .format(system=system)
+        )
     return lib_path
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rpy2-3.2.2/rpy2/tests/rinterface/test_embedded_r.py 
new/rpy2-3.2.5/rpy2/tests/rinterface/test_embedded_r.py
--- old/rpy2-3.2.2/rpy2/tests/rinterface/test_embedded_r.py     2019-09-25 
03:19:37.000000000 +0200
+++ new/rpy2-3.2.5/rpy2/tests/rinterface/test_embedded_r.py     2019-12-18 
22:36:55.000000000 +0100
@@ -108,6 +108,11 @@
         rinterface.parse("2 + 3 , 1")
 
 
+def test_parse_error_when_evaluting():
+    with pytest.raises(_rinterface.RParsingError):
+        rinterface.parse("list(''=1)")
+
+
 def test_parse_invalid_string():
     with pytest.raises(TypeError):
         rinterface.parse(3)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rpy2-3.2.2/rpy2.egg-info/PKG-INFO 
new/rpy2-3.2.5/rpy2.egg-info/PKG-INFO
--- old/rpy2-3.2.2/rpy2.egg-info/PKG-INFO       2019-11-03 17:07:58.000000000 
+0100
+++ new/rpy2-3.2.5/rpy2.egg-info/PKG-INFO       2020-01-26 22:08:17.000000000 
+0100
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: rpy2
-Version: 3.2.2
+Version: 3.2.5
 Summary: Python interface to the R language (embedded R)
 Home-page: https://rpy2.bitbucket.io
 Author: Laurent Gautier
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rpy2-3.2.2/rpy2.egg-info/SOURCES.txt 
new/rpy2-3.2.5/rpy2.egg-info/SOURCES.txt
--- old/rpy2-3.2.2/rpy2.egg-info/SOURCES.txt    2019-11-03 17:07:59.000000000 
+0100
+++ new/rpy2-3.2.5/rpy2.egg-info/SOURCES.txt    2020-01-26 22:08:17.000000000 
+0100
@@ -120,6 +120,4 @@
 rpy2.egg-info/SOURCES.txt
 rpy2.egg-info/dependency_links.txt
 rpy2.egg-info/requires.txt
-rpy2.egg-info/top_level.txt
-rpy2/rinterface_lib/R_API.h
-rpy2/rinterface_lib/R_API_eventloop.h
\ No newline at end of file
+rpy2.egg-info/top_level.txt
\ No newline at end of file


Reply via email to