Patch 8.2.1912
Problem:    With Python 3.9 some tests fail.
Solution:   Take into account the different error message. (James McCoy,
            closes #7210)
Files:      src/testdir/test_python3.vim


*** ../vim-8.2.1911/src/testdir/test_python3.vim        2020-08-31 
21:30:28.994020232 +0200
--- src/testdir/test_python3.vim        2020-10-27 19:58:35.930585270 +0100
***************
*** 23,28 ****
--- 23,29 ----
  
      py33_type_error_pattern = re.compile('^__call__\(\) takes (\d+) 
positional argument but (\d+) were given$')
      py37_exception_repr = re.compile(r'([^\(\),])(\)+)$')
+     py39_type_error_pattern = re.compile('\w+\.([^(]+\(\) takes)')
  
      def emsg(ei):
        return ei[0].__name__ + ':' + repr(ei[1].args)
***************
*** 56,61 ****
--- 57,64 ----
                          oldmsg2 = '''"Can't convert 'int' object to str 
implicitly"'''
                          if msg.find(newmsg2) > -1:
                              msg = msg.replace(newmsg2, oldmsg2)
+                         # Python 3.9 reports errors like "vim.command() takes 
..." instead of "command() takes ..."
+                         msg = py39_type_error_pattern.sub(r'\1', msg)
                  elif sys.version_info >= (3, 5) and e.__class__ is ValueError 
and str(e) == 'embedded null byte':
                      msg = repr((TypeError, TypeError('expected bytes with no 
null')))
                  else:
***************
*** 3812,3818 ****
      vim.current.xxx = True:(<class 'AttributeError'>, AttributeError('xxx',))
    END
  
!   call assert_equal(expected, getline(2, '$'))
    close!
  endfunc
  
--- 3815,3830 ----
      vim.current.xxx = True:(<class 'AttributeError'>, AttributeError('xxx',))
    END
  
!   let actual = getline(2, '$')
!   let n_expected = len(expected)
!   let n_actual = len(actual)
!   call assert_equal(n_expected, n_actual, 'number of lines to compare')
! 
!   " Compare line by line so the errors are easier to understand.  Missing 
lines
!   " are compared with an empty string.
!   for i in range(n_expected > n_actual ? n_expected : n_actual)
!     call assert_equal(i >= n_expected ? '' : expected[i], i >= n_actual ? '' 
: actual[i])
!   endfor
    close!
  endfunc
  
*** ../vim-8.2.1911/src/version.c       2020-10-27 09:12:41.136329137 +0100
--- src/version.c       2020-10-27 19:53:55.135424341 +0100
***************
*** 752,753 ****
--- 752,755 ----
  {   /* Add new patch number below this line */
+ /**/
+     1912,
  /**/

-- 
The coffee just wasn't strong enough to defend itself -- Tom Waits

 /// Bram Moolenaar -- [email protected] -- 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    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/202010271859.09RIxjmY1946449%40masaka.moolenaar.net.

Raspunde prin e-mail lui