Hello community,
here is the log from the commit of package python-rpy2 for openSUSE:Factory checked in at 2018-08-10 09:50:03
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-rpy2 (Old)
and /work/SRC/openSUSE:Factory/.python-rpy2.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-rpy2"
Fri Aug 10 09:50:03 2018 rev:3 rq:628247 version:2.9.4
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-rpy2/python-rpy2.changes 2018-05-19 15:43:41.955920963 +0200
+++ /work/SRC/openSUSE:Factory/.python-rpy2.new/python-rpy2.changes 2018-08-10 09:50:05.814300784 +0200
@@ -1,0 +2,20 @@
+Wed Aug 8 17:33:45 UTC 2018 - toddrme2178@gmail.com
+
+- Update to 2.9.4
+ * Fallback for failure to import numpy or pandas is now dissociated from
+ failure to import :mod:`numpy2ri` or :mod:`pandas2ri` (issue #463).
+ * :func:`repr` for R POSIX date/time vectors is now showing a string
+ representation of the date/time rather than the timestamp as a float
+ (issue #467).
+ * The HTML representation of R data frame (the default representation in the
+ Jupyter notebook) was displaying an inconsistent number of rows
+ (found while workin on issue #466).
+ * Handle time zones in timezones in Pandas when converting to R data frames
+ (issue #454).
+ * When exiting the Python process, the R cleanup is now explicitly request
+ to happen before Python's exit. This is preventing possible segfaults
+ the process is terminating (issue #471).
+ * dplyr method `ungroup()` was missing from
+ :class:`rpy2.robjects.lib.dplyr.DataFrame` (issue #473).
+
+-------------------------------------------------------------------
Old:
----
rpy2-2.9.3.tar.gz
New:
----
rpy2-2.9.4.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-rpy2.spec ++++++
--- /var/tmp/diff_new_pack.HI9tAi/_old 2018-08-10 09:50:06.770302326 +0200
+++ /var/tmp/diff_new_pack.HI9tAi/_new 2018-08-10 09:50:06.774302332 +0200
@@ -20,7 +20,7 @@
%define skip_python2 1
%bcond_with test
Name: python-rpy2
-Version: 2.9.3
+Version: 2.9.4
Release: 0
Summary: A Python interface to the R Programming Language
License: GPL-2.0-or-later
++++++ rpy2-2.9.3.tar.gz -> rpy2-2.9.4.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rpy2-2.9.3/NEWS new/rpy2-2.9.4/NEWS
--- old/rpy2-2.9.3/NEWS 2018-04-14 16:22:00.000000000 +0200
+++ new/rpy2-2.9.4/NEWS 2018-06-26 00:19:53.000000000 +0200
@@ -1,3 +1,31 @@
+Release 2.9.4
+=============
+
+Bugs fixed
+----------
+
+- Fallback for failure to import numpy or pandas is now dissociated from
+ failure to import :mod:`numpy2ri` or :mod:`pandas2ri` (issue #463).
+
+- :func:`repr` for R POSIX date/time vectors is now showing a string
+ representation of the date/time rather than the timestamp as a float
+ (issue #467).
+
+- The HTML representation of R data frame (the default representation in the
+ Jupyter notebook) was displaying an inconsistent number of rows
+ (found while workin on issue #466).
+
+- Handle time zones in timezones in Pandas when converting to R data frames
+ (issue #454).
+
+- When exiting the Python process, the R cleanup is now explicitly request
+ to happen before Python's exit. This is preventing possible segfaults
+ the process is terminating (issue #471).
+
+- dplyr method `ungroup()` was missing from
+ :class:`rpy2.robjects.lib.dplyr.DataFrame` (issue #473).
+
+
Release 2.9.3
=============
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rpy2-2.9.3/PKG-INFO new/rpy2-2.9.4/PKG-INFO
--- old/rpy2-2.9.3/PKG-INFO 2018-04-14 16:22:35.000000000 +0200
+++ new/rpy2-2.9.4/PKG-INFO 2018-06-26 00:20:43.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: rpy2
-Version: 2.9.3
+Version: 2.9.4
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.3/doc/generated_rst/README new/rpy2-2.9.4/doc/generated_rst/README
--- old/rpy2-2.9.3/doc/generated_rst/README 1970-01-01 01:00:00.000000000 +0100
+++ new/rpy2-2.9.4/doc/generated_rst/README 2015-09-28 02:33:20.000000000 +0200
@@ -0,0 +1 @@
+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.3/rpy/__init__.py new/rpy2-2.9.4/rpy/__init__.py
--- old/rpy2-2.9.3/rpy/__init__.py 2018-04-14 16:22:00.000000000 +0200
+++ new/rpy2-2.9.4/rpy/__init__.py 2018-06-26 00:19:53.000000000 +0200
@@ -1,5 +1,5 @@
-__version_vector__ = ((2,9,3), '')
+__version_vector__ = ((2,9,4), '')
__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.3/rpy/ipython/rmagic.py new/rpy2-2.9.4/rpy/ipython/rmagic.py
--- old/rpy2-2.9.3/rpy/ipython/rmagic.py 2018-04-14 16:22:00.000000000 +0200
+++ new/rpy2-2.9.4/rpy/ipython/rmagic.py 2018-06-26 00:19:53.000000000 +0200
@@ -61,25 +61,30 @@
# Try loading pandas and numpy, emitting a warning if either cannot be
# loaded.
try:
- from rpy2.robjects import numpy2ri
- template_converter += numpy2ri.converter
+ import numpy
try:
- from rpy2.robjects import pandas2ri
- template_converter += pandas2ri.converter
+ import pandas
except ImportError:
+ pandas = None
warnings.warn(' '.join(("The Python package 'pandas' is strongly"
"recommended when using `rpy2.ipython`.",
"Unfortunately it could not be loaded,",
"but at least we found 'numpy'.")))
except ImportError:
# Give up on numerics
+ numpy = None
warnings.warn(' '.join(("The Python package 'pandas' is strongly",
"recommended when using `rpy2.ipython`.",
"Unfortunately it could not be loaded,",
"as we did not manage to load 'numpy'",
"first.")))
-
-
+if numpy:
+ from rpy2.robjects import numpy2ri
+ template_converter += numpy2ri.converter
+ if pandas:
+ from rpy2.robjects import pandas2ri
+ template_converter += pandas2ri.converter
+
# IPython imports
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rpy2-2.9.3/rpy/ipython/tests/test_rmagic.py new/rpy2-2.9.4/rpy/ipython/tests/test_rmagic.py
--- old/rpy2-2.9.3/rpy/ipython/tests/test_rmagic.py 2018-04-14 16:22:00.000000000 +0200
+++ new/rpy2-2.9.4/rpy/ipython/tests/test_rmagic.py 2018-06-16 21:17:15.000000000 +0200
@@ -30,6 +30,7 @@
import rpy2.robjects.packages as rpacks
class TestRmagic(unittest.TestCase):
+
@classmethod
def setUpClass(cls):
'''Set up an IPython session just once.
@@ -44,6 +45,7 @@
def setUp(self):
if hasattr(rmagic.template_converter, 'activate'):
rmagic.template_converter.activate()
+
def tearDown(self):
# This seems like the safest thing to return to a safe state
self.ip.run_line_magic('Rdevice', 'png')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rpy2-2.9.3/rpy/rinterface/__init__.py new/rpy2-2.9.4/rpy/rinterface/__init__.py
--- old/rpy2-2.9.3/rpy/rinterface/__init__.py 2017-11-04 17:54:54.000000000 +0100
+++ new/rpy2-2.9.4/rpy/rinterface/__init__.py 2018-06-26 00:19:53.000000000 +0200
@@ -1,3 +1,4 @@
+import atexit
import os
import sys
import warnings
@@ -200,6 +201,12 @@
template[0][2][1][2] = rpy_fun
return baseenv['eval'](template)
+_initr = initr
+def initr(r_preservehash=False):
+ """"Wrapper around rpy2.rinterface._rinterface.initr()."""
+ atexit.register(endr, 0)
+ _initr(r_preservehash=r_preservehash)
+
# def cleanUp(saveact, status, runlast):
# return True
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rpy2-2.9.3/rpy/rinterface/tests/test_Sexp.py new/rpy2-2.9.4/rpy/rinterface/tests/test_Sexp.py
--- old/rpy2-2.9.3/rpy/rinterface/tests/test_Sexp.py 2015-09-05 01:15:16.000000000 +0200
+++ new/rpy2-2.9.4/rpy/rinterface/tests/test_Sexp.py 2018-06-17 03:25:12.000000000 +0200
@@ -183,7 +183,7 @@
sexp = rinterface.IntSexpVector([1,2,3])
self.assertEqual(0, sexp.named)
rinterface.baseenv.get("identity")(sexp)
- self.assertEqual(2, sexp.named)
+ self.assertGreaterEqual(sexp.named, 2)
sexp2 = sexp.__deepcopy__()
self.assertEqual(sexp.typeof, sexp2.typeof)
self.assertEqual(list(sexp), list(sexp2))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rpy2-2.9.3/rpy/robjects/lib/dbplyr.py new/rpy2-2.9.4/rpy/robjects/lib/dbplyr.py
--- old/rpy2-2.9.3/rpy/robjects/lib/dbplyr.py 1970-01-01 01:00:00.000000000 +0100
+++ new/rpy2-2.9.4/rpy/robjects/lib/dbplyr.py 2018-06-24 21:29:54.000000000 +0200
@@ -0,0 +1,30 @@
+from collections import namedtuple
+from six import with_metaclass
+from rpy2.robjects.packages import (importr, data,
+ Package, default_symbol_r2python,
+ default_symbol_check_after,
+ WeakPackage)
+import warnings
+
+with warnings.catch_warnings():
+ warnings.simplefilter("ignore")
+ dbplyr = importr('dbplyr', on_conflict="warn")
+ lazyeval = importr('lazyeval', on_conflict="warn")
+ dbplyr = WeakPackage(dbplyr._env,
+ dbplyr.__rname__,
+ translation=dbplyr._translation,
+ exported_names=dbplyr._exported_names,
+ on_conflict="warn",
+ version=dbplyr.__version__,
+ symbol_r2python=dbplyr._symbol_r2python,
+ symbol_check_after=dbplyr._symbol_check_after)
+TARGET_VERSION = '1.2.1'
+if dbplyr.__version__ != TARGET_VERSION:
+ warnings.warn('This was designed againt dbplyr version %s but you have %s' % (TARGET_VERSION, dbplyr.__version__))
+
+
+from rpy2 import robjects
+from rpy2.robjects.lib import dplyr
+
+
+sql = dbplyr.sql
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rpy2-2.9.3/rpy/robjects/lib/dplyr.py new/rpy2-2.9.4/rpy/robjects/lib/dplyr.py
--- old/rpy2-2.9.3/rpy/robjects/lib/dplyr.py 2017-11-04 17:54:54.000000000 +0100
+++ new/rpy2-2.9.4/rpy/robjects/lib/dplyr.py 2018-06-24 21:38:46.000000000 +0200
@@ -19,7 +19,7 @@
version=dplyr.__version__,
symbol_r2python=dplyr._symbol_r2python,
symbol_check_after=dplyr._symbol_check_after)
-TARGET_VERSION = '0.7.4'
+TARGET_VERSION = '0.7.5'
if dplyr.__version__ != TARGET_VERSION:
warnings.warn('This was designed againt dplyr version %s but you have %s' % (TARGET_VERSION, dplyr.__version__))
@@ -139,6 +139,7 @@
DataFrame.filter = _wrap(dplyr.filter_, None)
DataFrame.select = _wrap(dplyr.select_, None)
DataFrame.group_by = _wrap(dplyr.group_by_, GroupedDataFrame)
+DataFrame.ungroup = _wrap(dplyr.ungroup, None)
DataFrame.distinct = _wrap(dplyr.distinct_, None)
DataFrame.inner_join = _wrap2(dplyr.inner_join, None)
DataFrame.left_join = _wrap2(dplyr.left_join, None)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rpy2-2.9.3/rpy/robjects/pandas2ri.py new/rpy2-2.9.4/rpy/robjects/pandas2ri.py
--- old/rpy2-2.9.3/rpy/robjects/pandas2ri.py 2018-04-14 16:22:00.000000000 +0200
+++ new/rpy2-2.9.4/rpy/robjects/pandas2ri.py 2018-06-11 03:39:44.000000000 +0200
@@ -15,6 +15,7 @@
from pandas.core.frame import DataFrame as PandasDataFrame
from pandas.core.series import Series as PandasSeries
from pandas.core.index import Index as PandasIndex
+from pandas.core.dtypes.api import is_datetime64_any_dtype
import pandas
from numpy import recarray
import numpy
@@ -49,7 +50,6 @@
ri2ro = converter.ri2ro
# numpy types for Pandas columns that require (even more) special handling
-dt_datetime64ns_type = numpy.dtype('datetime64[ns]')
dt_O_type = numpy.dtype('O')
default_timezone = None
@@ -102,15 +102,16 @@
elif obj.dtype.name == 'category':
res = py2ri_categoryseries(obj)
res = FactorVector(res)
- elif obj.dtype == dt_datetime64ns_type:
+ elif is_datetime64_any_dtype(obj.dtype):
# time series
+ tzname = obj.dt.tz.zone if obj.dt.tz else ''
d = [IntVector([x.year for x in obj]),
IntVector([x.month for x in obj]),
IntVector([x.day for x in obj]),
IntVector([x.hour for x in obj]),
IntVector([x.minute for x in obj]),
IntVector([x.second for x in obj])]
- res = ISOdatetime(*d)
+ res = ISOdatetime(*d, tz=StrSexpVector([tzname]))
#FIXME: can the POSIXct be created from the POSIXct constructor ?
# (is '