Skip to content

Loading…

Missing libraries cause ImportError in tests #375

Closed
jstenar opened this Issue · 13 comments

3 participants

@jstenar
IPython: interactive computing in Python member

If pexepect, pyzmq or sympy are not installed I get ImportErrors in the testsuite.

See log from testrun: https://gist.github.com/918116

Test suite completed for system with the following information:
{'commit_hash': '9e2a3f4',
'commit_source': 'repository',
'ipython_path': 'c:\python\external\ipython\IPython',
'ipython_version': '0.11.dev',
'os_name': 'nt',
'platform': 'Windows-7-6.1.7601-SP1',
'sys_executable': 'c:\python26\python.exe',
'sys_platform': 'win32',
'sys_version': '2.6.6 (r266:84297, Aug 24 2010, 18:46:32) [MSC v.1500 32 bit (Intel)]'}

Tools and libraries NOT available at test time:
curses foolscap gobject gtk pexpect twisted wx wx.aui zope.interface

@minrk
IPython: interactive computing in Python member

Can you try rerunning with current IPython? the commit hash you list is from over a month ago, and there have been a lot of changes since then.

@jstenar
IPython: interactive computing in Python member

I reran the tests and have updated the gist https://gist.github.com/918116 with the new log now using:

{'commit_hash': '271141b',
'commit_source': 'repository',
'ipython_path': 'c:\python\external\ipython-master\IPython',
'ipython_version': '0.11.dev',
'os_name': 'nt',
'platform': 'Windows-7-6.1.7601-SP1',
'sys_executable': 'c:\python26\python.exe',
'sys_platform': 'win32',
'sys_version': '2.6.6 (r266:84297, Aug 24 2010, 18:46:32) [MSC v.1500 32 bit (Intel)]'}

@jstenar jstenar closed this
@minrk minrk reopened this
@minrk
IPython: interactive computing in Python member

Thanks - most of these issues still exist.

I believe I've fixed the ImportErrors (exclusions had gotten stale, as files were added), in 241dc9a04b2078922eb4cf53567b85cff284a7b3.

A large fraction of the errors appear to be index errors in pyreadline during readline_no_record, which presumably behaves differently somehow from regular readline (or we are treating it differently).

I should note that I do not get index errors (I have pyreadline 1.5), I get a missing method self.shell.readline.get_current_history_length.

Some path escape issues also show up, and are now reported as #378

@takluyver
IPython: interactive computing in Python member

Ah, sorry, readline_no_record is something I wrote. I'd assumed readline had the same interface everywhere. I'll try to work out a cross platform way to do it.

@takluyver takluyver was assigned
@takluyver
IPython: interactive computing in Python member

Assigning myself for the readline issues.

@takluyver
IPython: interactive computing in Python member

OK, I've worked it out. GNU readline has a 1-based index for get_history_item, and pyreadline (at least in trunk) has a 0-based index (it's just indexing a Python list). Evidently 1.5 doesn't implement a particular method. Is there some interface I can use instead for pyreadline? If not, we either have to let readline history get 'dirty' with input given to subprograms, or load 1000 lines from the database after each subprogram run.

@jstenar
IPython: interactive computing in Python member
@takluyver
IPython: interactive computing in Python member

That's probably a good idea. But we should still do something for compatibility with existing versions of pyreadline that are already out there.

@takluyver
IPython: interactive computing in Python member

Can you test my pyreadline-errors branch? https://github.com/takluyver/ipython/tree/pyreadline-errors

@jstenar
IPython: interactive computing in Python member
@takluyver
IPython: interactive computing in Python member

Closed by b63ca13.

@takluyver takluyver closed this
@minrk minrk reopened this
@minrk
IPython: interactive computing in Python member

Note that you didn't actually close the titular issue. That issue will be closed by PR #385.

@takluyver
IPython: interactive computing in Python member

Oh, sorry. I thought the other issues were already fixed, or moved to another bug. Thanks.

@minrk minrk was assigned
@minrk minrk added a commit that closed this issue
@minrk minrk update test exclusions
exclude test_irunner w/o pexpect
exclude frontend/qt w/o pyzmq or qt

closes gh-375
3085904
@minrk minrk closed this in 3085904
@ellisonbg ellisonbg referenced this issue
Commit has since been removed from the repository and is no longer available.
@mattvonrocketstein mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this issue
@minrk minrk update test exclusions
exclude test_irunner w/o pexpect
exclude frontend/qt w/o pyzmq or qt

closes gh-375
96efb99
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.