Hello community, here is the log from the commit of package python-rpy2 for openSUSE:Factory checked in at 2018-12-04 20:55:31 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-rpy2 (Old) and /work/SRC/openSUSE:Factory/.python-rpy2.new.19453 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-rpy2" Tue Dec 4 20:55:31 2018 rev:5 rq:653600 version:2.9.5 Changes: -------- --- /work/SRC/openSUSE:Factory/python-rpy2/python-rpy2.changes 2018-08-18 00:02:44.022829967 +0200 +++ /work/SRC/openSUSE:Factory/.python-rpy2.new.19453/python-rpy2.changes 2018-12-04 20:55:40.160763355 +0100 @@ -1,0 +2,7 @@ +Mon Dec 3 19:19:21 UTC 2018 - Todd R <toddrme2...@gmail.com> + +- Update to 2.9.5 + * Missing values in pandas :class:`Category` series were creating + invalid R factors when converted (issue #493). + +------------------------------------------------------------------- Old: ---- rpy2-2.9.4.tar.gz New: ---- rpy2-2.9.5.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-rpy2.spec ++++++ --- /var/tmp/diff_new_pack.gFkA6h/_old 2018-12-04 20:55:40.832762606 +0100 +++ /var/tmp/diff_new_pack.gFkA6h/_new 2018-12-04 20:55:40.836762601 +0100 @@ -20,7 +20,7 @@ %define skip_python2 1 %bcond_with test Name: python-rpy2 -Version: 2.9.4 +Version: 2.9.5 Release: 0 Summary: A Python interface to the R Programming Language License: GPL-2.0-or-later ++++++ rpy2-2.9.4.tar.gz -> rpy2-2.9.5.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rpy2-2.9.4/NEWS new/rpy2-2.9.5/NEWS --- old/rpy2-2.9.4/NEWS 2018-06-26 00:19:53.000000000 +0200 +++ new/rpy2-2.9.5/NEWS 2018-11-27 14:39:05.000000000 +0100 @@ -1,3 +1,13 @@ +Release 2.9.5 +============= + +Bugs fixed +---------- + +- Missing values in pandas :class:`Category` series were creating + invalid R factors when converted (issue #493). + + Release 2.9.4 ============= diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rpy2-2.9.4/PKG-INFO new/rpy2-2.9.5/PKG-INFO --- old/rpy2-2.9.4/PKG-INFO 2018-06-26 00:20:43.000000000 +0200 +++ new/rpy2-2.9.5/PKG-INFO 2018-11-27 14:40:51.000000000 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: rpy2 -Version: 2.9.4 +Version: 2.9.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-2.9.4/doc/generated_rst/README new/rpy2-2.9.5/doc/generated_rst/README --- old/rpy2-2.9.4/doc/generated_rst/README 2015-09-28 02:33:20.000000000 +0200 +++ new/rpy2-2.9.5/doc/generated_rst/README 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ -This directory contains rst files dynamically generated. \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rpy2-2.9.4/rpy/__init__.py new/rpy2-2.9.5/rpy/__init__.py --- old/rpy2-2.9.4/rpy/__init__.py 2018-06-26 00:19:53.000000000 +0200 +++ new/rpy2-2.9.5/rpy/__init__.py 2018-11-27 14:39:22.000000000 +0100 @@ -1,5 +1,5 @@ -__version_vector__ = ((2,9,4), '') +__version_vector__ = ((2,9,5), '') __version__ = '.'.join([str(x) for x in __version_vector__[0]]) + \ '' + __version_vector__[1] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rpy2-2.9.4/rpy/robjects/pandas2ri.py new/rpy2-2.9.5/rpy/robjects/pandas2ri.py --- old/rpy2-2.9.4/rpy/robjects/pandas2ri.py 2018-06-11 03:39:44.000000000 +0200 +++ new/rpy2-2.9.5/rpy/robjects/pandas2ri.py 2018-11-27 14:39:05.000000000 +0100 @@ -86,7 +86,7 @@ for c in obj.cat.categories: if not isinstance(c, str): raise ValueError('Converting pandas "Category" series to R factor is only possible when categories are strings.') - res = IntSexpVector(list(x+1 for x in obj.cat.codes)) + res = IntSexpVector(list(rinterface.NA_Integer if x == -1 else x+1 for x in obj.cat.codes)) res.do_slot_assign('levels', StrSexpVector(obj.cat.categories)) if obj.cat.ordered: res.rclass = StrSexpVector(('ordered', 'factor')) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rpy2-2.9.4/rpy/robjects/tests/testPandasConversions.py new/rpy2-2.9.5/rpy/robjects/tests/testPandasConversions.py --- old/rpy2-2.9.4/rpy/robjects/tests/testPandasConversions.py 2018-01-15 19:30:09.000000000 +0100 +++ new/rpy2-2.9.5/rpy/robjects/tests/testPandasConversions.py 2018-11-27 14:39:05.000000000 +0100 @@ -116,6 +116,13 @@ with localconverter(default_converter + rpyp.converter) as cv: rp_c = robjects.conversion.py2ro(category) self.assertEqual(robjects.vectors.FactorVector, type(rp_c)) + + def test_categorywithNA2Factor(self): + category = pandas.Series(['a', 'b', 'c', numpy.nan], dtype='category') + with localconverter(default_converter + rpyp.converter) as cv: + rp_c = robjects.conversion.py2rpy(category) + assert isinstance(rp_c, robjects.vectors.FactorVector) + assert rp_c[3] == rinterface.NA_Integer def testOrderedCategory2Factor(self): category = pandas.Series(pandas.Categorical(['a','b','c','a'], diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rpy2-2.9.4/rpy2.egg-info/PKG-INFO new/rpy2-2.9.5/rpy2.egg-info/PKG-INFO --- old/rpy2-2.9.4/rpy2.egg-info/PKG-INFO 2018-06-26 00:20:43.000000000 +0200 +++ new/rpy2-2.9.5/rpy2.egg-info/PKG-INFO 2018-11-27 14:40:50.000000000 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: rpy2 -Version: 2.9.4 +Version: 2.9.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-2.9.4/rpy2.egg-info/SOURCES.txt new/rpy2-2.9.5/rpy2.egg-info/SOURCES.txt --- old/rpy2-2.9.4/rpy2.egg-info/SOURCES.txt 2018-06-26 00:20:43.000000000 +0200 +++ new/rpy2-2.9.5/rpy2.egg-info/SOURCES.txt 2018-11-27 14:40:51.000000000 +0100 @@ -3,7 +3,6 @@ NEWS README.rst gpl-2.0.txt -setup.cfg setup.py ./rpy/__init__.py ./rpy/rpy_classic.py @@ -84,7 +83,6 @@ ./rpy/robjects/tests/testRobjects.py ./rpy/robjects/tests/testVector.py doc/Makefile -doc/generated_rst/README rpy/__init__.py rpy/rpy_classic.py rpy/situation.py diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rpy2-2.9.4/setup.cfg new/rpy2-2.9.5/setup.cfg --- old/rpy2-2.9.4/setup.cfg 2018-06-26 00:20:43.000000000 +0200 +++ new/rpy2-2.9.5/setup.cfg 2018-11-27 14:40:51.000000000 +0100 @@ -1,5 +1,3 @@ -[easy_install] - [egg_info] tag_build = tag_date = 0