Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test failures with Python 3.9.0b1 #549

Comments

@hroncok
Copy link

hroncok commented May 31, 2020

$ tox -e py39
GLOB sdist-make: .../PyCQA/pyflakes/setup.py
py39 inst-nodeps: .../PyCQA/pyflakes/.tox/.tmp/package/1/pyflakes-2.2.0.zip
py39 installed: flake8==3.6.0,mccabe==0.6.1,pycodestyle==2.4.0,pyflakes==2.2.0
py39 run-test-pre: PYTHONHASHSEED='3762849954'
py39 run-test: commands[0] | python -m unittest discover pyflakes
......F....FFF........................s..........................s.......s....................s..............................s...s.............s...............................s...............................................s....s..................s......s..............................................s............ss..s.........s.s.................s...s.............s...............................s...............................................................................................................s....s..................s......s.................s............................................s.....................sss............................................................................s............ss..s.........s.s.
======================================================================
FAIL: test_invalidEscape (test.test_api.CheckTests)
The invalid escape syntax raises ValueError in Python 2
----------------------------------------------------------------------
Traceback (most recent call last):
  File ".../PyCQA/pyflakes/pyflakes/test/test_api.py", line 599, in test_invalidEscape
    self.assertHasErrors(
  File ".../PyCQA/pyflakes/pyflakes/test/test_api.py", line 379, in assertHasErrors
    self.assertEqual(
AssertionError: Tuples differ: (1, "[14 chars]5_:1:13: (unicode error) 'unicodeescape' codec[88 chars]^\n") != (1, "[14 chars]5_:1:7: (unicode error) 'unicodeescape' codec [81 chars]^\n")

First differing element 1:
"/tmp/tmps32en05_:1:13: (unicode error) 'unicodeescape' codec[87 chars] ^\n"
"/tmp/tmps32en05_:1:7: (unicode error) 'unicodeescape' codec [80 chars] ^\n"

  (1,
-  "/tmp/tmps32en05_:1:13: (unicode error) 'unicodeescape' codec can't decode "
?                      ^^

+  "/tmp/tmps32en05_:1:7: (unicode error) 'unicodeescape' codec can't decode "
?                      ^

   'bytes in position 0-1: truncated \\xXX escape\n'
   "foo = '\\xyz'\n"
-  '            ^\n')
?   ------

+  '      ^\n')

======================================================================
FAIL: test_multilineSyntaxError (test.test_api.CheckTests)
Source which includes a syntax error which results in the raised
----------------------------------------------------------------------
Traceback (most recent call last):
  File ".../PyCQA/pyflakes/pyflakes/test/test_api.py", line 458, in test_multilineSyntaxError
    self.assertHasErrors(
  File ".../PyCQA/pyflakes/pyflakes/test/test_api.py", line 379, in assertHasErrors
    self.assertEqual(
AssertionError: Tuples differ: (1, "/tmp/tmpjs72k5vs:8:8: invalid syntax\n    '''quux'''\n       ^\n") != (1, "/tmp/tmpjs72k5vs:8:8: invalid string prefix\n    '''quux'''\n       ^\n")

First differing element 1:
"/tmp/tmpjs72k5vs:8:8: invalid syntax\n    '''quux'''\n       ^\n"
"/tmp/tmpjs72k5vs:8:8: invalid string prefix\n    '''quux'''\n       ^\n"

- (1, "/tmp/tmpjs72k5vs:8:8: invalid syntax\n    '''quux'''\n       ^\n")
?                                     ^ ^^

+ (1, "/tmp/tmpjs72k5vs:8:8: invalid string prefix\n    '''quux'''\n       ^\n")
?                                     ^^^ ^^^^^^^


======================================================================
FAIL: test_nonDefaultFollowsDefaultSyntaxError (test.test_api.CheckTests)
Source which has a non-default argument following a default argument
----------------------------------------------------------------------
Traceback (most recent call last):
  File ".../PyCQA/pyflakes/pyflakes/test/test_api.py", line 528, in test_nonDefaultFollowsDefaultSyntaxError
    self.assertHasErrors(
  File ".../PyCQA/pyflakes/pyflakes/test/test_api.py", line 379, in assertHasErrors
    self.assertEqual(
AssertionError: Tuples differ: (1, '[14 chars]n2:1:21: non-default argument follows default [54 chars]^\n') != (1, '[14 chars]n2:1:9: non-default argument follows default a[41 chars]^\n')

First differing element 1:
'/tmp/tmpms87axn2:1:21: non-default argument follows default [53 chars] ^\n'
'/tmp/tmpms87axn2:1:9: non-default argument follows default a[40 chars] ^\n'

  (1,
-  '/tmp/tmpms87axn2:1:21: non-default argument follows default argument\n'
?                      ^^

+  '/tmp/tmpms87axn2:1:9: non-default argument follows default argument\n'
?                      ^

   'def foo(bar=baz, bax):\n'
-  '                    ^\n')
+  '        ^\n')

======================================================================
FAIL: test_nonKeywordAfterKeywordSyntaxError (test.test_api.CheckTests)
Source which has a non-keyword argument after a keyword argument should
----------------------------------------------------------------------
Traceback (most recent call last):
  File ".../PyCQA/pyflakes/pyflakes/test/test_api.py", line 562, in test_nonKeywordAfterKeywordSyntaxError
    self.assertHasErrors(
  File ".../PyCQA/pyflakes/pyflakes/test/test_api.py", line 379, in assertHasErrors
    self.assertEqual(
AssertionError: Tuples differ: (1, '[15 chars]t:1:17: positional argument follows keyword ar[43 chars]^\n') != (1, '[15 chars]t:1:14: positional argument follows keyword ar[40 chars]^\n')

First differing element 1:
'/tmp/tmpqv6chdyt:1:17: positional argument follows keyword ar[42 chars] ^\n'
'/tmp/tmpqv6chdyt:1:14: positional argument follows keyword ar[39 chars] ^\n'

  (1,
-  '/tmp/tmpqv6chdyt:1:17: positional argument follows keyword argument\n'
?                       ^

+  '/tmp/tmpqv6chdyt:1:14: positional argument follows keyword argument\n'
?                       ^

   'foo(bar=baz, bax)\n'
-  '                ^\n')
?   ---

+  '             ^\n')

----------------------------------------------------------------------
Ran 736 tests in 0.975s

FAILED (failures=4, skipped=37)
ERROR: InvocationError for command .../PyCQA/pyflakes/.tox/py39/bin/python -m unittest discover pyflakes (exited with code 1)
___________________________________ summary ____________________________________
ERROR:   py39: commands failed

This is on master @ cd261ab

@asottile
Copy link
Member

some of these were bugs in cpython introduced by the PEG parser so we disabled the tests in #532 -- we'll be following up in the later betas to see if any of them get fixed and then re-enabling / adjusting the tests

@sbraz
Copy link
Contributor

sbraz commented Oct 2, 2020

Here are logs from the git master with Python 3.9 rc2. I think with the final version scheduled next week, it is safe to say that there won't be many changes:

......F....FFF........................s..........................s.......s....................s..............................s...s.............s...............................s...............................................s....s..................s......s..............................................s............ss..s.........s.s.................s...s.............s...............................s................................................................................................................s....s..................s......s.................s............................................s.....................sss.................................................................................s............ss..s.........s.s.
======================================================================
FAIL: test_invalidEscape (test.test_api.CheckTests)
The invalid escape syntax raises ValueError in Python 2
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/tmp/pyflakes/pyflakes/test/test_api.py", line 599, in test_invalidEscape
    self.assertHasErrors(
  File "/tmp/pyflakes/pyflakes/test/test_api.py", line 379, in assertHasErrors
    self.assertEqual(
AssertionError: Tuples differ: (1, "[14 chars]xv:1:13: (unicode error) 'unicodeescape' codec[88 chars]^\n") != (1, "[14 chars]xv:1:7: (unicode error) 'unicodeescape' codec [81 chars]^\n")

First differing element 1:
"/tmp/tmpg59cc4xv:1:13: (unicode error) 'unicodeescape' codec[87 chars] ^\n"
"/tmp/tmpg59cc4xv:1:7: (unicode error) 'unicodeescape' codec [80 chars] ^\n"

  (1,
-  "/tmp/tmpg59cc4xv:1:13: (unicode error) 'unicodeescape' codec can't decode "
?                      ^^

+  "/tmp/tmpg59cc4xv:1:7: (unicode error) 'unicodeescape' codec can't decode "
?                      ^

   'bytes in position 0-1: truncated \\xXX escape\n'
   "foo = '\\xyz'\n"
-  '            ^\n')
?   ------

+  '      ^\n')

======================================================================
FAIL: test_multilineSyntaxError (test.test_api.CheckTests)
Source which includes a syntax error which results in the raised
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/tmp/pyflakes/pyflakes/test/test_api.py", line 458, in test_multilineSyntaxError
    self.assertHasErrors(
  File "/tmp/pyflakes/pyflakes/test/test_api.py", line 379, in assertHasErrors
    self.assertEqual(
AssertionError: Tuples differ: (1, "/tmp/tmp150q9qmj:8:8: invalid syntax\n    '''quux'''\n       ^\n") != (1, "/tmp/tmp150q9qmj:8:8: invalid string prefix\n    '''quux'''\n       ^\n")

First differing element 1:
"/tmp/tmp150q9qmj:8:8: invalid syntax\n    '''quux'''\n       ^\n"
"/tmp/tmp150q9qmj:8:8: invalid string prefix\n    '''quux'''\n       ^\n"

- (1, "/tmp/tmp150q9qmj:8:8: invalid syntax\n    '''quux'''\n       ^\n")
?                                     ^ ^^

+ (1, "/tmp/tmp150q9qmj:8:8: invalid string prefix\n    '''quux'''\n       ^\n")
?                                     ^^^ ^^^^^^^


======================================================================
FAIL: test_nonDefaultFollowsDefaultSyntaxError (test.test_api.CheckTests)
Source which has a non-default argument following a default argument
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/tmp/pyflakes/pyflakes/test/test_api.py", line 528, in test_nonDefaultFollowsDefaultSyntaxError
    self.assertHasErrors(
  File "/tmp/pyflakes/pyflakes/test/test_api.py", line 379, in assertHasErrors
    self.assertEqual(
AssertionError: Tuples differ: (1, '[14 chars]r0:1:21: non-default argument follows default [54 chars]^\n') != (1, '[14 chars]r0:1:9: non-default argument follows default a[41 chars]^\n')

First differing element 1:
'/tmp/tmphau2car0:1:21: non-default argument follows default [53 chars] ^\n'
'/tmp/tmphau2car0:1:9: non-default argument follows default a[40 chars] ^\n'

  (1,
-  '/tmp/tmphau2car0:1:21: non-default argument follows default argument\n'
?                      ^^

+  '/tmp/tmphau2car0:1:9: non-default argument follows default argument\n'
?                      ^

   'def foo(bar=baz, bax):\n'
-  '                    ^\n')
+  '        ^\n')

======================================================================
FAIL: test_nonKeywordAfterKeywordSyntaxError (test.test_api.CheckTests)
Source which has a non-keyword argument after a keyword argument should
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/tmp/pyflakes/pyflakes/test/test_api.py", line 562, in test_nonKeywordAfterKeywordSyntaxError
    self.assertHasErrors(
  File "/tmp/pyflakes/pyflakes/test/test_api.py", line 379, in assertHasErrors
    self.assertEqual(
AssertionError: Tuples differ: (1, '[15 chars]b:1:17: positional argument follows keyword ar[43 chars]^\n') != (1, '[15 chars]b:1:14: positional argument follows keyword ar[40 chars]^\n')

First differing element 1:
'/tmp/tmpinz8pyxb:1:17: positional argument follows keyword ar[42 chars] ^\n'
'/tmp/tmpinz8pyxb:1:14: positional argument follows keyword ar[39 chars] ^\n'

  (1,
-  '/tmp/tmpinz8pyxb:1:17: positional argument follows keyword argument\n'
?                       ^

+  '/tmp/tmpinz8pyxb:1:14: positional argument follows keyword argument\n'
?                       ^

   'foo(bar=baz, bax)\n'
-  '                ^\n')
?   ---

+  '             ^\n')

----------------------------------------------------------------------
Ran 742 tests in 0.775s

FAILED (failures=4, skipped=37)

sbraz added a commit to sbraz/pyflakes that referenced this issue Oct 2, 2020
sbraz added a commit to sbraz/pyflakes that referenced this issue Oct 2, 2020
sbraz added a commit to sbraz/pyflakes that referenced this issue Oct 2, 2020
Stop allowing failures on Python nightly.
sbraz added a commit to sbraz/pyflakes that referenced this issue Oct 3, 2020
Stop allowing failures on Python nightly.
This was referenced Mar 15, 2021
This was referenced Mar 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment