Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 501558 - >dev-python/rpy-2.3 should depend on dev-lang/python[sqlite]
Summary: >dev-python/rpy-2.3 should depend on dev-lang/python[sqlite]
Status: RESOLVED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-02-17 08:12 UTC by mike johnson
Modified: 2014-03-25 05:17 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description mike johnson 2014-02-17 08:12:17 UTC
There is an undocumented dependency on sqlite3. I belive this dependency should be removed.

Exception Type: 	ImportError
Exception Value: 	No module named sqlite3
Exception Location: 	/usr/lib/python2.7/site-packages/rpy2/robjects/help.py in <module>, line 7
Comment 1 mike johnson 2014-02-19 07:18:28 UTC
I think its unitentional. The exception is thrown at the import. I commented out the import and haven't experienced any negative consequences yet. I can't judge whether its a genuine dependency or a failure to remove the import after development/testing.
Comment 2 Ian Delaney (RETIRED) gentoo-dev 2014-03-22 07:04:09 UTC
(In reply to mike johnson from comment #1)
> I think its unitentional. The exception is thrown at the import. I commented
> out the import and haven't experienced any negative consequences yet. I
> can't judge whether its a genuine dependency or a failure to remove the
> import after development/testing.

huh! commented out the importing of sqlite3 from the help.py?
Comment 3 mike johnson 2014-03-22 08:58:49 UTC
I took some time to look at where its being used:
rd_meta_dbcon = sqlite3.connect(':memory:')

For what I'm doing, I'd rather comment out the import than build in yet another (unnecessary in my opinion) dependency. I'm up to my ears in dependencies already. I don't understand why RPy2 should have such a help feature. How is this used? Perhaps I've been getting my "help" the hard way. Is there a user interface I'm not aware of? In any case, I suppose sqlite3 should be added as a dependency.
Comment 4 Ian Delaney (RETIRED) gentoo-dev 2014-03-22 12:44:16 UTC
mike j.

<There is an undocumented dependency on sqlite3>

Wouldn't be the first.  Yes it would appear it's required, however, please explain
"I belive this dependency should be removed"
Do you not mean
"I belive this dependency should be added" ??

Let's check.  Is this the source?

$ python -c "from rpy2.robjects import help"

that yields 

Exception Type: 	ImportError
etc. ?

gentoo64 / # python3.3 -c "from rpy2.robjects import help"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/lib64/python3.3/site-packages/rpy2/robjects/__init__.py", line 22, in <module>
    from rpy2.robjects.methods import RS4
  File "/usr/lib64/python3.3/site-packages/rpy2/robjects/methods.py", line 5, in <module>
    from . import help as rhelp
  File "/usr/lib64/python3.3/site-packages/rpy2/robjects/help.py", line 7, in <module>
    import sqlite3
ImportError: No module named 'sqlite3'

appears to confirm.

Let's be clear, commenting out the import does NOT make for a fix to the ebuild. All you need do is rebuild python 2.7 3.3 with the sqlite use flag, run the above manual import and see that it has success.  (It does for me on this system) Currently   The fix to the ebuild of rpy-2.3* is all of one line.  Do the above and re-post and 99% I will fix it. Otherwise there is doubt because you've not indicated the trigger for the import failure which is a basic requirement so as to replicate and verify the bug you declare.
Comment 5 mike johnson 2014-03-23 10:05:46 UTC
Thanks for the response Ian.

I'm using rpy and R in a web app backend that I'm developing using python and Django. When I deploy the app, the server can't get past that one import statement. That's where I'm seeing the ImportError, but yes, it does occur as well by running: python2.7 -c "from rpy2.robjects import help" from the command line.

Rpy-2.2.6 was building/installing/running fine. Then I updated R and was required to update rpy. Versions 2.3.8 and 2.3.9 both have this dependency on sqlite3. I originally thought it might be an oversight on the part of the developer. There is something odd about a database dependency in a binding library. I thought possibly sqlite was used in testing and some code was inadvertently left behind. I was wrong. Apparently sqlite is being used to provide documentation of sorts.
Comment 6 Ian Delaney (RETIRED) gentoo-dev 2014-03-25 05:17:30 UTC
 25 Mar 2014; Ian Delaney <idella4@gentoo.org> rpy-2.3.8.ebuild,
  rpy-2.3.9.ebuild:
  Add PYTHON_REQ_USE, fixes Bug #501558 by M. Johnson, rm old