Missing libraries cause ImportError in tests #375

Closed
jstenar opened this Issue Apr 13, 2011 · 13 comments

Comments

Projects
None yet
3 participants
@jstenar
Member

jstenar commented Apr 13, 2011

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

This comment has been minimized.

Show comment
Hide comment
@minrk

minrk Apr 13, 2011

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.

Member

minrk commented Apr 13, 2011

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

This comment has been minimized.

Show comment
Hide comment
@jstenar

jstenar Apr 13, 2011

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)]'}

Member

jstenar commented Apr 13, 2011

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 Apr 13, 2011

@minrk minrk reopened this Apr 13, 2011

@minrk

This comment has been minimized.

Show comment
Hide comment
@minrk

minrk Apr 13, 2011

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

Member

minrk commented Apr 13, 2011

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

This comment has been minimized.

Show comment
Hide comment
@takluyver

takluyver Apr 13, 2011

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.

Member

takluyver commented Apr 13, 2011

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.

@ghost ghost assigned takluyver Apr 13, 2011

@takluyver

This comment has been minimized.

Show comment
Hide comment
@takluyver

takluyver Apr 13, 2011

Member

Assigning myself for the readline issues.

Member

takluyver commented Apr 13, 2011

Assigning myself for the readline issues.

@takluyver

This comment has been minimized.

Show comment
Hide comment
@takluyver

takluyver Apr 13, 2011

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.

Member

takluyver commented Apr 13, 2011

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

This comment has been minimized.

Show comment
Hide comment
@jstenar

jstenar Apr 14, 2011

Member

takluyver skrev 2011-04-13 23:40:

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.

I could also implement a change in pyreadline to go with 1-based index
to get better cross-platform compatibility.

/Jörgen

Member

jstenar commented Apr 14, 2011

takluyver skrev 2011-04-13 23:40:

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.

I could also implement a change in pyreadline to go with 1-based index
to get better cross-platform compatibility.

/Jörgen

@takluyver

This comment has been minimized.

Show comment
Hide comment
@takluyver

takluyver Apr 14, 2011

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.

Member

takluyver commented Apr 14, 2011

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

This comment has been minimized.

Show comment
Hide comment
Member

takluyver commented Apr 14, 2011

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

@jstenar

This comment has been minimized.

Show comment
Hide comment
@jstenar

jstenar Apr 14, 2011

Member

takluyver skrev 2011-04-14 21:16:

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

Looks good, no more failures in pyreadline. I just released pyreadline
1.7 which has a fixed api.

/Jörgen

Member

jstenar commented Apr 14, 2011

takluyver skrev 2011-04-14 21:16:

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

Looks good, no more failures in pyreadline. I just released pyreadline
1.7 which has a fixed api.

/Jörgen

@takluyver

This comment has been minimized.

Show comment
Hide comment
@takluyver

takluyver Apr 14, 2011

Member

Closed by b63ca13.

Member

takluyver commented Apr 14, 2011

Closed by b63ca13.

@takluyver takluyver closed this Apr 14, 2011

@minrk minrk reopened this Apr 14, 2011

@minrk

This comment has been minimized.

Show comment
Hide comment
@minrk

minrk Apr 14, 2011

Member

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

Member

minrk commented Apr 14, 2011

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

@takluyver

This comment has been minimized.

Show comment
Hide comment
@takluyver

takluyver Apr 14, 2011

Member

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

Member

takluyver commented Apr 14, 2011

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

@ghost ghost assigned minrk Apr 14, 2011

@minrk minrk closed this in 3085904 Apr 14, 2011

mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this issue Nov 3, 2014

update test exclusions
exclude test_irunner w/o pexpect
exclude frontend/qt w/o pyzmq or qt

closes gh-375
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment