To: vim_dev@googlegroups.com
Subject: Patch 7.3.1237
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
------------
Patch 7.3.1237
Problem: Python: non-import errors not handled correctly.
Solution: Let non-ImportError exceptions pass the finder. (ZyX)
Files: src/if_py_both.h, src/testdir/test86.ok, src/testdir/test87.ok
*** ../vim-7.3.1236/src/if_py_both.h 2013-06-23 16:35:32.000000000 +0200
--- src/if_py_both.h 2013-06-23 16:38:39.000000000 +0200
***************
*** 1199,1204 ****
--- 1199,1212 ----
if (!module)
{
+ if (PyErr_Occurred())
+ {
+ if (PyErr_ExceptionMatches(PyExc_ImportError))
+ PyErr_Clear();
+ else
+ return NULL;
+ }
+
Py_INCREF(Py_None);
return Py_None;
}
*** ../vim-7.3.1236/src/testdir/test86.ok 2013-06-23 16:35:32.000000000 +0200
--- src/testdir/test86.ok 2013-06-23 16:38:39.000000000 +0200
***************
*** 497,503 ****
> import
import xxx_no_such_module_xxx:ImportError:('No module named xxx_no_such_module_xxx',)
import failing_import:ImportError:('No module named failing_import',)
! import failing:ImportError:('No module named failing',)
> Dictionary
>> DictionaryConstructor
vim.Dictionary("abcI"):ValueError:('expected sequence element of size 2, but got sequence of size 1',)
--- 497,503 ----
> import
import xxx_no_such_module_xxx:ImportError:('No module named xxx_no_such_module_xxx',)
import failing_import:ImportError:('No module named failing_import',)
! import failing:NotImplementedError:()
> Dictionary
>> DictionaryConstructor
vim.Dictionary("abcI"):ValueError:('expected sequence element of size 2, but got sequence of size 1',)
*** ../vim-7.3.1236/src/testdir/test87.ok 2013-06-23 16:35:32.000000000 +0200
--- src/testdir/test87.ok 2013-06-23 16:38:39.000000000 +0200
***************
*** 486,492 ****
> import
import xxx_no_such_module_xxx:(<class 'ImportError'>, ImportError('No module named xxx_no_such_module_xxx',))
import failing_import:(<class 'ImportError'>, ImportError('No module named failing_import',))
! import failing:(<class 'ImportError'>, ImportError('No module named failing',))
> Dictionary
>> DictionaryConstructor
vim.Dictionary("abcI"):(<class 'ValueError'>, ValueError('expected sequence element of size 2, but got sequence of size 1',))
--- 486,492 ----
> import
import xxx_no_such_module_xxx:(<class 'ImportError'>, ImportError('No module named xxx_no_such_module_xxx',))
import failing_import:(<class 'ImportError'>, ImportError('No module named failing_import',))
! import failing:(<class 'NotImplementedError'>, NotImplementedError())
> Dictionary
>> DictionaryConstructor
vim.Dictionary("abcI"):(<class 'ValueError'>, ValueError('expected sequence element of size 2, but got sequence of size 1',))
*** ../vim-7.3.1236/src/version.c 2013-06-23 16:35:32.000000000 +0200
--- src/version.c 2013-06-23 16:38:20.000000000 +0200
***************
*** 730,731 ****
--- 730,733 ----
{ /* Add new patch number below this line */
+ /**/
+ 1237,
/**/
--
This is an airconditioned room, do not open Windows.
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///