Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#19638 closed defect (fixed)

upgrade rpy2 to 2.7.5

Reported by: Emmanuel Charpentier Owned by:
Priority: minor Milestone: sage-6.10
Component: packages: standard Keywords: r-project jupyter
Cc: François Bissey Merged in:
Authors: Emmanuel Charpentier Reviewers: François Bissey, Travis Scrimshaw
Report Upstream: N/A Work issues:
Branch: 50462d2 (Commits, GitHub, GitLab) Commit:
Dependencies: Stopgaps:

Status badges

Description (last modified by Emmanuel Charpentier)

The current version (2.3.8) of rpy2 packaged in Sage is too old to work with the current version of the Jupyter notebook

Manually upgrading to 2.7.4 (via sage -pip install --upgrade rpy2 seems to work. However in also upgrades six (to 1.10.0-py2.py3-non-any.whl (???) and singledispatch (but seems to use the current (cached) version).

I also get the following warning :

DEPRECATION: Uninstalling a distutils installed project (rpy2) has been deprecated and will be removed in a future version. This is due to the fact that uninstalling a distutils project will only partially uninstall the project.

which I do not really understand....

New tarballs attached ; you may also download rpy2, six and singledispatch directly from python.org.

Edit : version bumped to 2.7.5

Attachments (4)

singledispatch-3.4.0.3.tar.gz (9.3 KB) - added by Emmanuel Charpentier 7 years ago.
Tarball for the new sigledispatch package
six-1.10.0.tar.gz (28.9 KB) - added by Emmanuel Charpentier 7 years ago.
New tarball for six
rpy2-2.7.4.tar.gz (172.9 KB) - added by Emmanuel Charpentier 7 years ago.
New tarball for rpy2
rpy2-2.7.5.tar.gz (173.2 KB) - added by Emmanuel Charpentier 7 years ago.
New tarball for rpy2-2.7.5

Download all attachments as: .zip

Change History (25)

comment:1 Changed 7 years ago by Emmanuel Charpentier

Extract from this question on sage-devel :

My pip upgrade showed me that this upgrade entails :

  • an upgrade to six, which is already packaged in Sagemath (no problem)
  • installing the singledispatch package, which is NOT packaged.

ISTR that, on sage-devel, it has been decided that a new package should remain optional for at least a year before becoming a standard package. If we follow this policy, the standard package rpy2 would depend on the optional package singledispatch. This seems a bit incoherent...

Another solution would be to keep the standard rpy2 package at 2.3.8, and have a rpy2-newer optional, depending on singledispatch. This seems a bit contrived, to say the least. Furthermore, I do not know how to proceed...

A third solution would be to silently include singledispatch in the source to rpy2. This "solution" seems to guarantee future incompatibilities.

What should I do ?

Bonus question : how to package rpy2 to signal that it depends on singledispatch ?

comment:2 Changed 7 years ago by Emmanuel Charpentier

Branch: u/charpent/upgrade_rpy2_to_2_7_4

comment:3 Changed 7 years ago by Emmanuel Charpentier

Authors: Emmanuel Charpentier
Commit: e50329501295a1905bd4e9121b76d820bbeeaee8
Description: modified (diff)

This version does the job (%R and %%R run OK in the Jupyter notebook).

Not yet ready for review, because :

  • No documentation (yet) of this new interface
  • not yet ptestlong'ed (and won't be until late tonight)...

Any suggestion on how to document the Jupyter interface ?

Changed 7 years ago by Emmanuel Charpentier

Tarball for the new sigledispatch package

Changed 7 years ago by Emmanuel Charpentier

Attachment: six-1.10.0.tar.gz added

New tarball for six

Changed 7 years ago by Emmanuel Charpentier

Attachment: rpy2-2.7.4.tar.gz added

New tarball for rpy2

comment:4 Changed 7 years ago by Emmanuel Charpentier

Our damn "corporate" firewall mangled the upload of new tarballs...

comment:5 Changed 7 years ago by Emmanuel Charpentier

Status: newneeds_review

Passes ptestlong with no error.

I still haven't the foggiest idea about where to document the Jupyter interface. We need to mention four things at the very minimum :

  • Load it with %load_ext rpy2.ipython.
  • Line magic : %R (may take args to pass data from/to Sage).
  • Cell magic : {{{%%R}} (idem).
  • Help is available online.

By the way, the Jupyter notebook doesn't seem documented in the Sage documentation.

comment:6 Changed 7 years ago by François Bissey

We don't put tarball in attachment anymore, we rarely put any attachment anymore actually. We usually put a pointer to where to download the source in the description, see for example #10295.

comment:7 Changed 7 years ago by Emmanuel Charpentier

Description: modified (diff)

Links to the original tarballs added in the description.

I'm still waiting for comments on the right place to add documentation.

comment:8 Changed 7 years ago by François Bissey

I honestly don't know where to document it in this case. You may have to try to stir things up on sage-devel.

The warning you get from pip is nothing to worry about. If I am not mistaken it is just complaining that you are uninstalling/upgrading something that wasn't installed with pip and that support for this will be discontinued (and rightly so, there is no sane way for pip to know it is doing a good job with the removal. pip as a package manager actually tracks the file installed, not so for stuff that has been installed with plain distutils).

comment:9 Changed 7 years ago by git

Commit: e50329501295a1905bd4e9121b76d820bbeeaee8b4e97738e0988f5e673347e71479b5fb2a37b879

Branch pushed to git repo; I updated commit sha1. New commits:

b4e9773Embryonic documentation for the RPy2 interface.

comment:10 Changed 7 years ago by Emmanuel Charpentier

Passes ptestlong when added to a pristine 6.10rc0 git clone.

Embryonic documentation added as an addendum to the r interface documentation.

It appears that, while useful in its present state, this work should be extended to a (re-)implementation of the R interface (our present implementation uses expect).

I shall question sage-devel and open another ticket for this.

Still requiring review.

comment:11 Changed 7 years ago by Emmanuel Charpentier

Cc: François Bissey added

comment:12 Changed 7 years ago by François Bissey

Reviewers: François Bissey
Status: needs_reviewpositive_review

Good enough for me. I have been using rpy-2.7.x since October in sage-on-gentoo without a hitch and 2.7.4 in particular since the end of November.

comment:13 Changed 7 years ago by François Bissey

2.7.5 is out since we are now aiming for sage-6.11 I am ok to re-review it after a revision bump.

Changed 7 years ago by Emmanuel Charpentier

Attachment: rpy2-2.7.5.tar.gz added

New tarball for rpy2-2.7.5

comment:14 Changed 7 years ago by git

Commit: b4e97738e0988f5e673347e71479b5fb2a37b87950462d27ad993a622d7084f14d50e201b4589c18
Status: positive_reviewneeds_review

Branch pushed to git repo; I updated commit sha1 and set ticket back to needs_review. New commits:

50462d2Upgrade rpy2 to rpy2-2.7.5.

comment:15 Changed 7 years ago by Emmanuel Charpentier

Description: modified (diff)
Summary: upgrade rpy2 to 2.7.4upgrade rpy2 to 2.7.5

Passes ptestlong.

comment:16 Changed 7 years ago by Travis Scrimshaw

Status: needs_reviewpositive_review

I have verified this.

comment:17 in reply to:  16 Changed 7 years ago by Emmanuel Charpentier

Replying to tscrim:

I have verified this.

Thanks. You should add your (real) name to the "Reviewers" field...

comment:18 Changed 7 years ago by François Bissey

Reviewers: François BisseyFrançois Bissey, Travis Scrimshaw

comment:19 Changed 7 years ago by Volker Braun

Please don't attach tarballs to trac tickets, they just end up in our trac database forever

comment:20 Changed 7 years ago by Volker Braun

Branch: u/charpent/upgrade_rpy2_to_2_7_450462d27ad993a622d7084f14d50e201b4589c18
Resolution: fixed
Status: positive_reviewclosed

comment:21 Changed 7 years ago by Karl-Dieter Crisman

Commit: 50462d27ad993a622d7084f14d50e201b4589c18
Reviewers: François Bissey, Travis ScrimshawFrançois Bissey, Travis Scrimshaw
Note: See TracTickets for help on using tickets.