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

bpo-35224: Reverse evaluation order of key: value in dict comprehensions #14139

Merged

Conversation

@joernheissler
Copy link
Contributor

commented Jun 17, 2019

… as proposed in PEP 572; key is now evaluated before value.

https://bugs.python.org/issue35224

@the-knights-who-say-ni

This comment has been minimized.

Copy link

commented Jun 17, 2019

Hello, and thanks for your contribution!

I'm a bot set up to make sure that the project can legally accept your contribution by verifying you have signed the PSF contributor agreement (CLA).

Our records indicate we have not received your CLA. For legal reasons we need you to sign this before we can look at your contribution. Please follow the steps outlined in the CPython devguide to rectify this issue.

If you have recently signed the CLA, please wait at least one business day
before our records are updated.

You can check yourself to see if the CLA has been received.

Thanks again for your contribution, we look forward to reviewing it!

@joernheissler

This comment has been minimized.

Copy link
Contributor Author

commented Jun 17, 2019

If you have recently signed the CLA, please wait at least one business day
before our records are updated.

I signed it just before submitting the PR.

@gvanrossum

This comment has been minimized.

Copy link
Member

commented Jun 17, 2019

I like this -- very minimalist. Would you be so kind as to fill out the CLA and add a news item?

Jörn Heissler
bpo-35224: Reverse evaluation order of key: value in dict comprehensi…
…ons as proposed in PEP 572; key is now evaluated before value.

@joernheissler joernheissler force-pushed the joernheissler:pep-572-dictcomp-eval-order branch from 8ee192e to f1a48f0 Jun 17, 2019

@methane methane removed the CLA not signed label Jun 18, 2019

@methane

This comment has been minimized.

Copy link
Member

commented Jun 18, 2019

Would you update the document of MAP_ADD in Doc/library/dis.rst?

@gvanrossum
Copy link
Member

left a comment

@joernheissler Please update the MAP_ADD docs as requested by Inada-san. Then I'll approve it and it will go into beta 2.

@bedevere-bot

This comment has been minimized.

Copy link

commented Jun 21, 2019

A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated.

Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

Jörn Heissler
@joernheissler

This comment has been minimized.

Copy link
Contributor Author

commented Jun 22, 2019

I have made the requested changes; please review again.
Thanks for the hints!

@bedevere-bot

This comment has been minimized.

Copy link

commented Jun 22, 2019

Thanks for making the requested changes!

@gvanrossum: please review the changes made to this pull request.

@miss-islington miss-islington merged commit c8a3541 into python:master Jun 22, 2019

5 checks passed

Azure Pipelines PR #20190622.7 succeeded
Details
bedevere/issue-number Issue number 35224 found
Details
bedevere/news News entry found in Misc/NEWS.d
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@gvanrossum

This comment has been minimized.

Copy link
Member

commented Jun 22, 2019

Thanks for helping out making the code conform to the PEP!

@bedevere-bot

This comment has been minimized.

Copy link

commented Jun 22, 2019

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot AMD64 Windows8.1 Non-Debug 3.x has failed when building commit c8a3541.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/all/#builders/12/builds/2766) and take a look at the build logs.
  4. Check if the failure is related to this commit (c8a3541) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/all/#builders/12/builds/2766

Click to see traceback logs
Traceback (most recent call last):
  File "D:\buildarea\3.x.ware-win81-release.nondebug\build\Tools\clinic\clinic.py", line 2006, in parse_file
    language = extensions[extension](filename)
KeyError: 'c'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "D:\buildarea\3.x.ware-win81-release.nondebug\build\lib\test\test_clinic.py", line 811, in test_external
    clinic.parse_file(testfile, force=True)
  File "D:\buildarea\3.x.ware-win81-release.nondebug\build\Tools\clinic\clinic.py", line 2008, in parse_file
    fail("Can't identify file type for file " + repr(filename))
  File "D:\buildarea\3.x.ware-win81-release.nondebug\build\Tools\clinic\clinic.py", line 129, in fail
    return warn_or_fail(True, *args, filename=filename, line_number=line_number)
  File "D:\buildarea\3.x.ware-win81-release.nondebug\build\Tools\clinic\clinic.py", line 122, in warn_or_fail
    sys.exit(-1)
SystemExit: -1

======================================================================
ERROR: test_param_default_expression (test.test_clinic.ClinicParserTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "D:\buildarea\3.x.ware-win81-release.nondebug\build\lib\test\test_clinic.py", line 327, in test_param_default_expression
    function = self.parse_function("module os\nos.access\n    follow_symlinks: int(c_default='MAXSIZE') = sys.maxsize")
  File "D:\buildarea\3.x.ware-win81-release.nondebug\build\lib\test\test_clinic.py", line 781, in parse_function
    block = self.parse(text)
  File "D:\buildarea\3.x.ware-win81-release.nondebug\build\lib\test\test_clinic.py", line 777, in parse
    parser.parse(block)
  File "D:\buildarea\3.x.ware-win81-release.nondebug\build\Tools\clinic\clinic.py", line 3973, in parse
    self.state(line)
  File "D:\buildarea\3.x.ware-win81-release.nondebug\build\Tools\clinic\clinic.py", line 4235, in state_parameters_start
    return self.next(self.state_parameter, line)
  File "D:\buildarea\3.x.ware-win81-release.nondebug\build\Tools\clinic\clinic.py", line 4006, in next
    self.state(line)
  File "D:\buildarea\3.x.ware-win81-release.nondebug\build\Tools\clinic\clinic.py", line 4430, in state_parameter
    fail("When you specify a named constant (" + repr(py_default) + ") as your default value,\nyou MUST specify a valid c_default.")
  File "D:\buildarea\3.x.ware-win81-release.nondebug\build\Tools\clinic\clinic.py", line 129, in fail
    return warn_or_fail(True, *args, filename=filename, line_number=line_number)
  File "D:\buildarea\3.x.ware-win81-release.nondebug\build\Tools\clinic\clinic.py", line 122, in warn_or_fail
    sys.exit(-1)
SystemExit: -1

----------------------------------------------------------------------

Ran 55 tests in 0.931s

FAILED (errors=2)


Traceback (most recent call last):
  File "D:\buildarea\3.x.ware-win81-release.nondebug\build\lib\test\test_asdl_parser.py", line 64, in test_attributes
    stmt = self.types['stmt']
KeyError: 'stmt'

======================================================================
ERROR: test_constructor_fields (test.test_asdl_parser.TestAsdlParser)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "D:\buildarea\3.x.ware-win81-release.nondebug\build\lib\test\test_asdl_parser.py", line 72, in test_constructor_fields
    ehandler = self.types['excepthandler']
KeyError: 'excepthandler'

======================================================================
ERROR: test_definitions (test.test_asdl_parser.TestAsdlParser)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "D:\buildarea\3.x.ware-win81-release.nondebug\build\lib\test\test_asdl_parser.py", line 54, in test_definitions
    self.assertIsInstance(self.types['withitem'], self.asdl.Product)
KeyError: 'withitem'

======================================================================
ERROR: test_product (test.test_asdl_parser.TestAsdlParser)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "D:\buildarea\3.x.ware-win81-release.nondebug\build\lib\test\test_asdl_parser.py", line 58, in test_product
    alias = self.types['alias']
KeyError: 'alias'

======================================================================
ERROR: test_visitor (test.test_asdl_parser.TestAsdlParser)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "D:\buildarea\3.x.ware-win81-release.nondebug\build\lib\test\test_asdl_parser.py", line 119, in test_visitor
    v.visit(self.types['mod'])
KeyError: 'mod'

======================================================================
FAIL: test_module (test.test_asdl_parser.TestAsdlParser)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "D:\buildarea\3.x.ware-win81-release.nondebug\build\lib\test\test_asdl_parser.py", line 45, in test_module
    self.assertIn('stmt', self.types)
AssertionError: 'stmt' not found in {Sum([Constructor(Module, [Field(stmt, body, seq=True), Field(type_ignore, type_ignores, seq=True)]), Constructor(Interactive, [Field(stmt, body, seq=True)]), Constructor(Expression, [Field(expr, body)]), Constructor(FunctionType, [Field(expr, argtypes, seq=True), Field(expr, returns)]), Constructor(Suite, [Field(stmt, body, seq=True)])]): 'mod', Sum([Constructor(FunctionDef, [Field(identifier, name), Field(arguments, args), Field(stmt, body, seq=True), Field(expr, decorator_list, seq=True), Field(expr, returns, opt=True), Field(string, type_comment, opt=True)]), Constructor(AsyncFunctionDef, [Field(identifier, name), Field(arguments, args), Field(stmt, body, seq=True), Field(expr, decorator_list, seq=True), Field(expr, returns, opt=True), Field(string, type_comment, opt=True)]), Constructor(ClassDef, [Field(identifier, name), Field(expr, bases, seq=True), Field(keyword, keywords, seq=True), Field(stmt, body, seq=True), Field(expr, decorator_list, seq=True)]), Constructor(Return, [Field(expr, value, opt=True)]), Constructor(Delete, [Field(expr, targets, seq=True)]), Constructor(Assign, [Field(expr, targets, seq=True), Field(expr, value), Field(string, type_comment, opt=True)]), Constructor(AugAssign, [Field(expr, target), Field(operator, op), Field(expr, value)]), Constructor(AnnAssign, [Field(expr, target), Field(expr, annotation), Field(expr, value, opt=True), Field(int, simple)]), Constructor(For, [Field(expr, target), Field(expr, iter), Field(stmt, body, seq=True), Field(stmt, orelse, seq=True), Field(string, type_comment, opt=True)]), Constructor(AsyncFor, [Field(expr, target), Field(expr, iter), Field(stmt, body, seq=True), Field(stmt, orelse, seq=True), Field(string, type_comment, opt=True)]), Constructor(While, [Field(expr, test), Field(stmt, body, seq=True), Field(stmt, orelse, seq=True)]), Constructor(If, [Field(expr, test), Field(stmt, body, seq=True), Field(stmt, orelse, seq=True)]), Constructor(With, [Field(withitem, items, seq=True), Field(stmt, body, seq=True), Field(string, type_comment, opt=True)]), Constructor(AsyncWith, [Field(withitem, items, seq=True), Field(stmt, body, seq=True), Field(string, type_comment, opt=True)]), Constructor(Raise, [Field(expr, exc, opt=True), Field(expr, cause, opt=True)]), Constructor(Try, [Field(stmt, body, seq=True), Field(excepthandler, handlers, seq=True), Field(stmt, orelse, seq=True), Field(stmt, finalbody, seq=True)]), Constructor(Assert, [Field(expr, test), Field(expr, msg, opt=True)]), Constructor(Import, [Field(alias, names, seq=True)]), Constructor(ImportFrom, [Field(identifier, module, opt=True), Field(alias, names, seq=True), Field(int, level, opt=True)]), Constructor(Global, [Field(identifier, names, seq=True)]), Constructor(Nonlocal, [Field(identifier, names, seq=True)]), Constructor(Expr, [Field(expr, value)]), Constructor(Pass, []), Constructor(Break, []), Constructor(Continue, [])], [Field(int, lineno), Field(int, col_offset), Field(int, end_lineno, opt=True), Field(int, end_col_offset, opt=True)]): 'stmt', Sum([Constructor(BoolOp, [Field(boolop, op), Field(expr, values, seq=True)]), Constructor(NamedExpr, [Field(expr, target), Field(expr, value)]), Constructor(BinOp, [Field(expr, left), Field(operator, op), Field(expr, right)]), Constructor(UnaryOp, [Field(unaryop, op), Field(expr, operand)]), Constructor(Lambda, [Field(arguments, args), Field(expr, body)]), Constructor(IfExp, [Field(expr, test), Field(expr, body), Field(expr, orelse)]), Constructor(Dict, [Field(expr, keys, seq=True), Field(expr, values, seq=True)]), Constructor(Set, [Field(expr, elts, seq=True)]), Constructor(ListComp, [Field(expr, elt), Field(comprehension, generators, seq=True)]), Constructor(SetComp, [Field(expr, elt), Field(comprehension, generators, seq=True)]), Constructor(DictComp, [Field(expr, key), Field(expr, value), Field(comprehension, generators, seq=True)]), Constructor(GeneratorExp, [Field(expr, elt), Field(comprehension, generators, seq=True)]), Constructor(Await, [Field(expr, value)]), Constructor(Yield, [Field(expr, value, opt=True)]), Constructor(YieldFrom, [Field(expr, value)]), Constructor(Compare, [Field(expr, left), Field(cmpop, ops, seq=True), Field(expr, comparators, seq=True)]), Constructor(Call, [Field(expr, func), Field(expr, args, seq=True), Field(keyword, keywords, seq=True)]), Constructor(FormattedValue, [Field(expr, value), Field(int, conversion, opt=True), Field(expr, format_spec, opt=True)]), Constructor(JoinedStr, [Field(expr, values, seq=True)]), Constructor(Constant, [Field(constant, value), Field(string, kind, opt=True)]), Constructor(Attribute, [Field(expr, value), Field(identifier, attr), Field(expr_context, ctx)]), Constructor(Subscript, [Field(expr, value), Field(slice, slice), Field(expr_context, ctx)]), Constructor(Starred, [Field(expr, value), Field(expr_context, ctx)]), Constructor(Name, [Field(identifier, id), Field(expr_context, ctx)]), Constructor(List, [Field(expr, elts, seq=True), Field(expr_context, ctx)]), Constructor(Tuple, [Field(expr, elts, seq=True), Field(expr_context, ctx)])], [Field(int, lineno), Field(int, col_offset), Field(int, end_lineno, opt=True), Field(int, end_col_offset, opt=True)]): 'expr', Sum([Constructor(Load, []), Constructor(Store, []), Constructor(Del, []), Constructor(AugLoad, []), Constructor(AugStore, []), Constructor(Param, [])]): 'expr_context', Sum([Constructor(Slice, [Field(expr, lower, opt=True), Field(expr, upper, opt=True), Field(expr, step, opt=True)]), Constructor(ExtSlice, [Field(slice, dims, seq=True)]), Constructor(Index, [Field(expr, value)])]): 'slice', Sum([Constructor(And, []), Constructor(Or, [])]): 'boolop', Sum([Constructor(Add, []), Constructor(Sub, []), Constructor(Mult, []), Constructor(MatMult, []), Constructor(Div, []), Constructor(Mod, []), Constructor(Pow, []), Constructor(LShift, []), Constructor(RShift, []), Constructor(BitOr, []), Constructor(BitXor, []), Constructor(BitAnd, []), Constructor(FloorDiv, [])]): 'operator', Sum([Constructor(Invert, []), Constructor(Not, []), Constructor(UAdd, []), Constructor(USub, [])]): 'unaryop', Sum([Constructor(Eq, []), Constructor(NotEq, []), Constructor(Lt, []), Constructor(LtE, []), Constructor(Gt, []), Constructor(GtE, []), Constructor(Is, []), Constructor(IsNot, []), Constructor(In, []), Constructor(NotIn, [])]): 'cmpop', Product([Field(expr, target), Field(expr, iter), Field(expr, ifs, seq=True), Field(int, is_async)]): 'comprehension', Sum([Constructor(ExceptHandler, [Field(expr, type, opt=True), Field(identifier, name, opt=True), Field(stmt, body, seq=True)])], [Field(int, lineno), Field(int, col_offset), Field(int, end_lineno, opt=True), Field(int, end_col_offset, opt=True)]): 'excepthandler', Product([Field(arg, args, seq=True), Field(arg, posonlyargs, seq=True), Field(arg, vararg, opt=True), Field(arg, kwonlyargs, seq=True), Field(expr, kw_defaults, seq=True), Field(arg, kwarg, opt=True), Field(expr, defaults, seq=True)]): 'arguments', Product([Field(identifier, arg), Field(expr, annotation, opt=True), Field(string, type_comment, opt=True)], [Field(int, lineno), Field(int, col_offset), Field(int, end_lineno, opt=True), Field(int, end_col_offset, opt=True)]): 'arg', Product([Field(identifier, arg, opt=True), Field(expr, value)]): 'keyword', Product([Field(identifier, name), Field(identifier, asname, opt=True)]): 'alias', Product([Field(expr, context_expr), Field(expr, optional_vars, opt=True)]): 'withitem', Sum([Constructor(TypeIgnore, [Field(int, lineno), Field(string, tag)])]): 'type_ignore'}

----------------------------------------------------------------------

Ran 6 tests in 0.011s

FAILED (failures=1, errors=5)


Traceback (most recent call last):
  File "D:\buildarea\3.x.ware-win81-release.nondebug\build\Tools\clinic\clinic.py", line 2006, in parse_file
    language = extensions[extension](filename)
KeyError: 'c'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "D:\buildarea\3.x.ware-win81-release.nondebug\build\lib\test\test_clinic.py", line 811, in test_external
    clinic.parse_file(testfile, force=True)
  File "D:\buildarea\3.x.ware-win81-release.nondebug\build\Tools\clinic\clinic.py", line 2008, in parse_file
    fail("Can't identify file type for file " + repr(filename))
  File "D:\buildarea\3.x.ware-win81-release.nondebug\build\Tools\clinic\clinic.py", line 129, in fail
    return warn_or_fail(True, *args, filename=filename, line_number=line_number)
  File "D:\buildarea\3.x.ware-win81-release.nondebug\build\Tools\clinic\clinic.py", line 122, in warn_or_fail
    sys.exit(-1)
SystemExit: -1

======================================================================
ERROR: test_param_default_expression (test.test_clinic.ClinicParserTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "D:\buildarea\3.x.ware-win81-release.nondebug\build\lib\test\test_clinic.py", line 327, in test_param_default_expression
    function = self.parse_function("module os\nos.access\n    follow_symlinks: int(c_default='MAXSIZE') = sys.maxsize")
  File "D:\buildarea\3.x.ware-win81-release.nondebug\build\lib\test\test_clinic.py", line 781, in parse_function
    block = self.parse(text)
  File "D:\buildarea\3.x.ware-win81-release.nondebug\build\lib\test\test_clinic.py", line 777, in parse
    parser.parse(block)
  File "D:\buildarea\3.x.ware-win81-release.nondebug\build\Tools\clinic\clinic.py", line 3973, in parse
    self.state(line)
  File "D:\buildarea\3.x.ware-win81-release.nondebug\build\Tools\clinic\clinic.py", line 4235, in state_parameters_start
    return self.next(self.state_parameter, line)
  File "D:\buildarea\3.x.ware-win81-release.nondebug\build\Tools\clinic\clinic.py", line 4006, in next
    self.state(line)
  File "D:\buildarea\3.x.ware-win81-release.nondebug\build\Tools\clinic\clinic.py", line 4430, in state_parameter
    fail("When you specify a named constant (" + repr(py_default) + ") as your default value,\nyou MUST specify a valid c_default.")
  File "D:\buildarea\3.x.ware-win81-release.nondebug\build\Tools\clinic\clinic.py", line 129, in fail
    return warn_or_fail(True, *args, filename=filename, line_number=line_number)
  File "D:\buildarea\3.x.ware-win81-release.nondebug\build\Tools\clinic\clinic.py", line 122, in warn_or_fail
    sys.exit(-1)
SystemExit: -1

----------------------------------------------------------------------

Ran 55 tests in 0.044s

FAILED (errors=2)
Re-running test_asdl_parser in verbose mode


Traceback (most recent call last):
  File "D:\buildarea\3.x.ware-win81-release.nondebug\build\lib\test\test_asdl_parser.py", line 64, in test_attributes
    stmt = self.types['stmt']
KeyError: 'stmt'

======================================================================
ERROR: test_constructor_fields (test.test_asdl_parser.TestAsdlParser)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "D:\buildarea\3.x.ware-win81-release.nondebug\build\lib\test\test_asdl_parser.py", line 72, in test_constructor_fields
    ehandler = self.types['excepthandler']
KeyError: 'excepthandler'

======================================================================
ERROR: test_definitions (test.test_asdl_parser.TestAsdlParser)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "D:\buildarea\3.x.ware-win81-release.nondebug\build\lib\test\test_asdl_parser.py", line 54, in test_definitions
    self.assertIsInstance(self.types['withitem'], self.asdl.Product)
KeyError: 'withitem'

======================================================================
ERROR: test_product (test.test_asdl_parser.TestAsdlParser)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "D:\buildarea\3.x.ware-win81-release.nondebug\build\lib\test\test_asdl_parser.py", line 58, in test_product
    alias = self.types['alias']
KeyError: 'alias'

======================================================================
ERROR: test_visitor (test.test_asdl_parser.TestAsdlParser)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "D:\buildarea\3.x.ware-win81-release.nondebug\build\lib\test\test_asdl_parser.py", line 119, in test_visitor
    v.visit(self.types['mod'])
KeyError: 'mod'

======================================================================
FAIL: test_module (test.test_asdl_parser.TestAsdlParser)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "D:\buildarea\3.x.ware-win81-release.nondebug\build\lib\test\test_asdl_parser.py", line 45, in test_module
    self.assertIn('stmt', self.types)
AssertionError: 'stmt' not found in {Sum([Constructor(Module, [Field(stmt, body, seq=True), Field(type_ignore, type_ignores, seq=True)]), Constructor(Interactive, [Field(stmt, body, seq=True)]), Constructor(Expression, [Field(expr, body)]), Constructor(FunctionType, [Field(expr, argtypes, seq=True), Field(expr, returns)]), Constructor(Suite, [Field(stmt, body, seq=True)])]): 'mod', Sum([Constructor(FunctionDef, [Field(identifier, name), Field(arguments, args), Field(stmt, body, seq=True), Field(expr, decorator_list, seq=True), Field(expr, returns, opt=True), Field(string, type_comment, opt=True)]), Constructor(AsyncFunctionDef, [Field(identifier, name), Field(arguments, args), Field(stmt, body, seq=True), Field(expr, decorator_list, seq=True), Field(expr, returns, opt=True), Field(string, type_comment, opt=True)]), Constructor(ClassDef, [Field(identifier, name), Field(expr, bases, seq=True), Field(keyword, keywords, seq=True), Field(stmt, body, seq=True), Field(expr, decorator_list, seq=True)]), Constructor(Return, [Field(expr, value, opt=True)]), Constructor(Delete, [Field(expr, targets, seq=True)]), Constructor(Assign, [Field(expr, targets, seq=True), Field(expr, value), Field(string, type_comment, opt=True)]), Constructor(AugAssign, [Field(expr, target), Field(operator, op), Field(expr, value)]), Constructor(AnnAssign, [Field(expr, target), Field(expr, annotation), Field(expr, value, opt=True), Field(int, simple)]), Constructor(For, [Field(expr, target), Field(expr, iter), Field(stmt, body, seq=True), Field(stmt, orelse, seq=True), Field(string, type_comment, opt=True)]), Constructor(AsyncFor, [Field(expr, target), Field(expr, iter), Field(stmt, body, seq=True), Field(stmt, orelse, seq=True), Field(string, type_comment, opt=True)]), Constructor(While, [Field(expr, test), Field(stmt, body, seq=True), Field(stmt, orelse, seq=True)]), Constructor(If, [Field(expr, test), Field(stmt, body, seq=True), Field(stmt, orelse, seq=True)]), Constructor(With, [Field(withitem, items, seq=True), Field(stmt, body, seq=True), Field(string, type_comment, opt=True)]), Constructor(AsyncWith, [Field(withitem, items, seq=True), Field(stmt, body, seq=True), Field(string, type_comment, opt=True)]), Constructor(Raise, [Field(expr, exc, opt=True), Field(expr, cause, opt=True)]), Constructor(Try, [Field(stmt, body, seq=True), Field(excepthandler, handlers, seq=True), Field(stmt, orelse, seq=True), Field(stmt, finalbody, seq=True)]), Constructor(Assert, [Field(expr, test), Field(expr, msg, opt=True)]), Constructor(Import, [Field(alias, names, seq=True)]), Constructor(ImportFrom, [Field(identifier, module, opt=True), Field(alias, names, seq=True), Field(int, level, opt=True)]), Constructor(Global, [Field(identifier, names, seq=True)]), Constructor(Nonlocal, [Field(identifier, names, seq=True)]), Constructor(Expr, [Field(expr, value)]), Constructor(Pass, []), Constructor(Break, []), Constructor(Continue, [])], [Field(int, lineno), Field(int, col_offset), Field(int, end_lineno, opt=True), Field(int, end_col_offset, opt=True)]): 'stmt', Sum([Constructor(BoolOp, [Field(boolop, op), Field(expr, values, seq=True)]), Constructor(NamedExpr, [Field(expr, target), Field(expr, value)]), Constructor(BinOp, [Field(expr, left), Field(operator, op), Field(expr, right)]), Constructor(UnaryOp, [Field(unaryop, op), Field(expr, operand)]), Constructor(Lambda, [Field(arguments, args), Field(expr, body)]), Constructor(IfExp, [Field(expr, test), Field(expr, body), Field(expr, orelse)]), Constructor(Dict, [Field(expr, keys, seq=True), Field(expr, values, seq=True)]), Constructor(Set, [Field(expr, elts, seq=True)]), Constructor(ListComp, [Field(expr, elt), Field(comprehension, generators, seq=True)]), Constructor(SetComp, [Field(expr, elt), Field(comprehension, generators, seq=True)]), Constructor(DictComp, [Field(expr, key), Field(expr, value), Field(comprehension, generators, seq=True)]), Constructor(GeneratorExp, [Field(expr, elt), Field(comprehension, generators, seq=True)]), Constructor(Await, [Field(expr, value)]), Constructor(Yield, [Field(expr, value, opt=True)]), Constructor(YieldFrom, [Field(expr, value)]), Constructor(Compare, [Field(expr, left), Field(cmpop, ops, seq=True), Field(expr, comparators, seq=True)]), Constructor(Call, [Field(expr, func), Field(expr, args, seq=True), Field(keyword, keywords, seq=True)]), Constructor(FormattedValue, [Field(expr, value), Field(int, conversion, opt=True), Field(expr, format_spec, opt=True)]), Constructor(JoinedStr, [Field(expr, values, seq=True)]), Constructor(Constant, [Field(constant, value), Field(string, kind, opt=True)]), Constructor(Attribute, [Field(expr, value), Field(identifier, attr), Field(expr_context, ctx)]), Constructor(Subscript, [Field(expr, value), Field(slice, slice), Field(expr_context, ctx)]), Constructor(Starred, [Field(expr, value), Field(expr_context, ctx)]), Constructor(Name, [Field(identifier, id), Field(expr_context, ctx)]), Constructor(List, [Field(expr, elts, seq=True), Field(expr_context, ctx)]), Constructor(Tuple, [Field(expr, elts, seq=True), Field(expr_context, ctx)])], [Field(int, lineno), Field(int, col_offset), Field(int, end_lineno, opt=True), Field(int, end_col_offset, opt=True)]): 'expr', Sum([Constructor(Load, []), Constructor(Store, []), Constructor(Del, []), Constructor(AugLoad, []), Constructor(AugStore, []), Constructor(Param, [])]): 'expr_context', Sum([Constructor(Slice, [Field(expr, lower, opt=True), Field(expr, upper, opt=True), Field(expr, step, opt=True)]), Constructor(ExtSlice, [Field(slice, dims, seq=True)]), Constructor(Index, [Field(expr, value)])]): 'slice', Sum([Constructor(And, []), Constructor(Or, [])]): 'boolop', Sum([Constructor(Add, []), Constructor(Sub, []), Constructor(Mult, []), Constructor(MatMult, []), Constructor(Div, []), Constructor(Mod, []), Constructor(Pow, []), Constructor(LShift, []), Constructor(RShift, []), Constructor(BitOr, []), Constructor(BitXor, []), Constructor(BitAnd, []), Constructor(FloorDiv, [])]): 'operator', Sum([Constructor(Invert, []), Constructor(Not, []), Constructor(UAdd, []), Constructor(USub, [])]): 'unaryop', Sum([Constructor(Eq, []), Constructor(NotEq, []), Constructor(Lt, []), Constructor(LtE, []), Constructor(Gt, []), Constructor(GtE, []), Constructor(Is, []), Constructor(IsNot, []), Constructor(In, []), Constructor(NotIn, [])]): 'cmpop', Product([Field(expr, target), Field(expr, iter), Field(expr, ifs, seq=True), Field(int, is_async)]): 'comprehension', Sum([Constructor(ExceptHandler, [Field(expr, type, opt=True), Field(identifier, name, opt=True), Field(stmt, body, seq=True)])], [Field(int, lineno), Field(int, col_offset), Field(int, end_lineno, opt=True), Field(int, end_col_offset, opt=True)]): 'excepthandler', Product([Field(arg, args, seq=True), Field(arg, posonlyargs, seq=True), Field(arg, vararg, opt=True), Field(arg, kwonlyargs, seq=True), Field(expr, kw_defaults, seq=True), Field(arg, kwarg, opt=True), Field(expr, defaults, seq=True)]): 'arguments', Product([Field(identifier, arg), Field(expr, annotation, opt=True), Field(string, type_comment, opt=True)], [Field(int, lineno), Field(int, col_offset), Field(int, end_lineno, opt=True), Field(int, end_col_offset, opt=True)]): 'arg', Product([Field(identifier, arg, opt=True), Field(expr, value)]): 'keyword', Product([Field(identifier, name), Field(identifier, asname, opt=True)]): 'alias', Product([Field(expr, context_expr), Field(expr, optional_vars, opt=True)]): 'withitem', Sum([Constructor(TypeIgnore, [Field(int, lineno), Field(string, tag)])]): 'type_ignore'}

----------------------------------------------------------------------

Ran 6 tests in 0.009s

FAILED (failures=1, errors=5)
@bedevere-bot

This comment has been minimized.

Copy link

commented Jun 22, 2019

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot AMD64 Windows7 SP1 3.x has failed when building commit c8a3541.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/all/#builders/40/builds/2621) and take a look at the build logs.
  4. Check if the failure is related to this commit (c8a3541) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/all/#builders/40/builds/2621

Click to see traceback logs
Traceback (most recent call last):
  File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\test\test_asdl_parser.py", line 64, in test_attributes
    stmt = self.types['stmt']
KeyError: 'stmt'

======================================================================
ERROR: test_constructor_fields (test.test_asdl_parser.TestAsdlParser)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\test\test_asdl_parser.py", line 72, in test_constructor_fields
    ehandler = self.types['excepthandler']
KeyError: 'excepthandler'

======================================================================
ERROR: test_definitions (test.test_asdl_parser.TestAsdlParser)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\test\test_asdl_parser.py", line 54, in test_definitions
    self.assertIsInstance(self.types['withitem'], self.asdl.Product)
KeyError: 'withitem'

======================================================================
ERROR: test_product (test.test_asdl_parser.TestAsdlParser)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\test\test_asdl_parser.py", line 58, in test_product
    alias = self.types['alias']
KeyError: 'alias'

======================================================================
ERROR: test_visitor (test.test_asdl_parser.TestAsdlParser)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\test\test_asdl_parser.py", line 119, in test_visitor
    v.visit(self.types['mod'])
KeyError: 'mod'

======================================================================
FAIL: test_module (test.test_asdl_parser.TestAsdlParser)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\test\test_asdl_parser.py", line 45, in test_module
    self.assertIn('stmt', self.types)
AssertionError: 'stmt' not found in {Sum([Constructor(Module, [Field(stmt, body, seq=True), Field(type_ignore, type_ignores, seq=True)]), Constructor(Interactive, [Field(stmt, body, seq=True)]), Constructor(Expression, [Field(expr, body)]), Constructor(FunctionType, [Field(expr, argtypes, seq=True), Field(expr, returns)]), Constructor(Suite, [Field(stmt, body, seq=True)])]): 'mod', Sum([Constructor(FunctionDef, [Field(identifier, name), Field(arguments, args), Field(stmt, body, seq=True), Field(expr, decorator_list, seq=True), Field(expr, returns, opt=True), Field(string, type_comment, opt=True)]), Constructor(AsyncFunctionDef, [Field(identifier, name), Field(arguments, args), Field(stmt, body, seq=True), Field(expr, decorator_list, seq=True), Field(expr, returns, opt=True), Field(string, type_comment, opt=True)]), Constructor(ClassDef, [Field(identifier, name), Field(expr, bases, seq=True), Field(keyword, keywords, seq=True), Field(stmt, body, seq=True), Field(expr, decorator_list, seq=True)]), Constructor(Return, [Field(expr, value, opt=True)]), Constructor(Delete, [Field(expr, targets, seq=True)]), Constructor(Assign, [Field(expr, targets, seq=True), Field(expr, value), Field(string, type_comment, opt=True)]), Constructor(AugAssign, [Field(expr, target), Field(operator, op), Field(expr, value)]), Constructor(AnnAssign, [Field(expr, target), Field(expr, annotation), Field(expr, value, opt=True), Field(int, simple)]), Constructor(For, [Field(expr, target), Field(expr, iter), Field(stmt, body, seq=True), Field(stmt, orelse, seq=True), Field(string, type_comment, opt=True)]), Constructor(AsyncFor, [Field(expr, target), Field(expr, iter), Field(stmt, body, seq=True), Field(stmt, orelse, seq=True), Field(string, type_comment, opt=True)]), Constructor(While, [Field(expr, test), Field(stmt, body, seq=True), Field(stmt, orelse, seq=True)]), Constructor(If, [Field(expr, test), Field(stmt, body, seq=True), Field(stmt, orelse, seq=True)]), Constructor(With, [Field(withitem, items, seq=True), Field(stmt, body, seq=True), Field(string, type_comment, opt=True)]), Constructor(AsyncWith, [Field(withitem, items, seq=True), Field(stmt, body, seq=True), Field(string, type_comment, opt=True)]), Constructor(Raise, [Field(expr, exc, opt=True), Field(expr, cause, opt=True)]), Constructor(Try, [Field(stmt, body, seq=True), Field(excepthandler, handlers, seq=True), Field(stmt, orelse, seq=True), Field(stmt, finalbody, seq=True)]), Constructor(Assert, [Field(expr, test), Field(expr, msg, opt=True)]), Constructor(Import, [Field(alias, names, seq=True)]), Constructor(ImportFrom, [Field(identifier, module, opt=True), Field(alias, names, seq=True), Field(int, level, opt=True)]), Constructor(Global, [Field(identifier, names, seq=True)]), Constructor(Nonlocal, [Field(identifier, names, seq=True)]), Constructor(Expr, [Field(expr, value)]), Constructor(Pass, []), Constructor(Break, []), Constructor(Continue, [])], [Field(int, lineno), Field(int, col_offset), Field(int, end_lineno, opt=True), Field(int, end_col_offset, opt=True)]): 'stmt', Sum([Constructor(BoolOp, [Field(boolop, op), Field(expr, values, seq=True)]), Constructor(NamedExpr, [Field(expr, target), Field(expr, value)]), Constructor(BinOp, [Field(expr, left), Field(operator, op), Field(expr, right)]), Constructor(UnaryOp, [Field(unaryop, op), Field(expr, operand)]), Constructor(Lambda, [Field(arguments, args), Field(expr, body)]), Constructor(IfExp, [Field(expr, test), Field(expr, body), Field(expr, orelse)]), Constructor(Dict, [Field(expr, keys, seq=True), Field(expr, values, seq=True)]), Constructor(Set, [Field(expr, elts, seq=True)]), Constructor(ListComp, [Field(expr, elt), Field(comprehension, generators, seq=True)]), Constructor(SetComp, [Field(expr, elt), Field(comprehension, generators, seq=True)]), Constructor(DictComp, [Field(expr, key), Field(expr, value), Field(comprehension, generators, seq=True)]), Constructor(GeneratorExp, [Field(expr, elt), Field(comprehension, generators, seq=True)]), Constructor(Await, [Field(expr, value)]), Constructor(Yield, [Field(expr, value, opt=True)]), Constructor(YieldFrom, [Field(expr, value)]), Constructor(Compare, [Field(expr, left), Field(cmpop, ops, seq=True), Field(expr, comparators, seq=True)]), Constructor(Call, [Field(expr, func), Field(expr, args, seq=True), Field(keyword, keywords, seq=True)]), Constructor(FormattedValue, [Field(expr, value), Field(int, conversion, opt=True), Field(expr, format_spec, opt=True)]), Constructor(JoinedStr, [Field(expr, values, seq=True)]), Constructor(Constant, [Field(constant, value), Field(string, kind, opt=True)]), Constructor(Attribute, [Field(expr, value), Field(identifier, attr), Field(expr_context, ctx)]), Constructor(Subscript, [Field(expr, value), Field(slice, slice), Field(expr_context, ctx)]), Constructor(Starred, [Field(expr, value), Field(expr_context, ctx)]), Constructor(Name, [Field(identifier, id), Field(expr_context, ctx)]), Constructor(List, [Field(expr, elts, seq=True), Field(expr_context, ctx)]), Constructor(Tuple, [Field(expr, elts, seq=True), Field(expr_context, ctx)])], [Field(int, lineno), Field(int, col_offset), Field(int, end_lineno, opt=True), Field(int, end_col_offset, opt=True)]): 'expr', Sum([Constructor(Load, []), Constructor(Store, []), Constructor(Del, []), Constructor(AugLoad, []), Constructor(AugStore, []), Constructor(Param, [])]): 'expr_context', Sum([Constructor(Slice, [Field(expr, lower, opt=True), Field(expr, upper, opt=True), Field(expr, step, opt=True)]), Constructor(ExtSlice, [Field(slice, dims, seq=True)]), Constructor(Index, [Field(expr, value)])]): 'slice', Sum([Constructor(And, []), Constructor(Or, [])]): 'boolop', Sum([Constructor(Add, []), Constructor(Sub, []), Constructor(Mult, []), Constructor(MatMult, []), Constructor(Div, []), Constructor(Mod, []), Constructor(Pow, []), Constructor(LShift, []), Constructor(RShift, []), Constructor(BitOr, []), Constructor(BitXor, []), Constructor(BitAnd, []), Constructor(FloorDiv, [])]): 'operator', Sum([Constructor(Invert, []), Constructor(Not, []), Constructor(UAdd, []), Constructor(USub, [])]): 'unaryop', Sum([Constructor(Eq, []), Constructor(NotEq, []), Constructor(Lt, []), Constructor(LtE, []), Constructor(Gt, []), Constructor(GtE, []), Constructor(Is, []), Constructor(IsNot, []), Constructor(In, []), Constructor(NotIn, [])]): 'cmpop', Product([Field(expr, target), Field(expr, iter), Field(expr, ifs, seq=True), Field(int, is_async)]): 'comprehension', Sum([Constructor(ExceptHandler, [Field(expr, type, opt=True), Field(identifier, name, opt=True), Field(stmt, body, seq=True)])], [Field(int, lineno), Field(int, col_offset), Field(int, end_lineno, opt=True), Field(int, end_col_offset, opt=True)]): 'excepthandler', Product([Field(arg, args, seq=True), Field(arg, posonlyargs, seq=True), Field(arg, vararg, opt=True), Field(arg, kwonlyargs, seq=True), Field(expr, kw_defaults, seq=True), Field(arg, kwarg, opt=True), Field(expr, defaults, seq=True)]): 'arguments', Product([Field(identifier, arg), Field(expr, annotation, opt=True), Field(string, type_comment, opt=True)], [Field(int, lineno), Field(int, col_offset), Field(int, end_lineno, opt=True), Field(int, end_col_offset, opt=True)]): 'arg', Product([Field(identifier, arg, opt=True), Field(expr, value)]): 'keyword', Product([Field(identifier, name), Field(identifier, asname, opt=True)]): 'alias', Product([Field(expr, context_expr), Field(expr, optional_vars, opt=True)]): 'withitem', Sum([Constructor(TypeIgnore, [Field(int, lineno), Field(string, tag)])]): 'type_ignore'}

----------------------------------------------------------------------

Ran 6 tests in 0.022s

FAILED (failures=1, errors=5)


Traceback (most recent call last):
  File "C:\buildbot.python.org\3.x.kloth-win64\build\Tools\clinic\clinic.py", line 2006, in parse_file
    language = extensions[extension](filename)
KeyError: 'c'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\test\test_clinic.py", line 811, in test_external
    clinic.parse_file(testfile, force=True)
  File "C:\buildbot.python.org\3.x.kloth-win64\build\Tools\clinic\clinic.py", line 2008, in parse_file
    fail("Can't identify file type for file " + repr(filename))
  File "C:\buildbot.python.org\3.x.kloth-win64\build\Tools\clinic\clinic.py", line 129, in fail
    return warn_or_fail(True, *args, filename=filename, line_number=line_number)
  File "C:\buildbot.python.org\3.x.kloth-win64\build\Tools\clinic\clinic.py", line 122, in warn_or_fail
    sys.exit(-1)
SystemExit: -1

======================================================================
ERROR: test_param_default_expression (test.test_clinic.ClinicParserTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\test\test_clinic.py", line 327, in test_param_default_expression
    function = self.parse_function("module os\nos.access\n    follow_symlinks: int(c_default='MAXSIZE') = sys.maxsize")
  File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\test\test_clinic.py", line 781, in parse_function
    block = self.parse(text)
  File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\test\test_clinic.py", line 777, in parse
    parser.parse(block)
  File "C:\buildbot.python.org\3.x.kloth-win64\build\Tools\clinic\clinic.py", line 3973, in parse
    self.state(line)
  File "C:\buildbot.python.org\3.x.kloth-win64\build\Tools\clinic\clinic.py", line 4235, in state_parameters_start
    return self.next(self.state_parameter, line)
  File "C:\buildbot.python.org\3.x.kloth-win64\build\Tools\clinic\clinic.py", line 4006, in next
    self.state(line)
  File "C:\buildbot.python.org\3.x.kloth-win64\build\Tools\clinic\clinic.py", line 4430, in state_parameter
    fail("When you specify a named constant (" + repr(py_default) + ") as your default value,\nyou MUST specify a valid c_default.")
  File "C:\buildbot.python.org\3.x.kloth-win64\build\Tools\clinic\clinic.py", line 129, in fail
    return warn_or_fail(True, *args, filename=filename, line_number=line_number)
  File "C:\buildbot.python.org\3.x.kloth-win64\build\Tools\clinic\clinic.py", line 122, in warn_or_fail
    sys.exit(-1)
SystemExit: -1

----------------------------------------------------------------------

Ran 55 tests in 0.104s

FAILED (errors=2)


Traceback (most recent call last):
  File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\test\test_asdl_parser.py", line 64, in test_attributes
    stmt = self.types['stmt']
KeyError: 'stmt'

======================================================================
ERROR: test_constructor_fields (test.test_asdl_parser.TestAsdlParser)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\test\test_asdl_parser.py", line 72, in test_constructor_fields
    ehandler = self.types['excepthandler']
KeyError: 'excepthandler'

======================================================================
ERROR: test_definitions (test.test_asdl_parser.TestAsdlParser)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\test\test_asdl_parser.py", line 54, in test_definitions
    self.assertIsInstance(self.types['withitem'], self.asdl.Product)
KeyError: 'withitem'

======================================================================
ERROR: test_product (test.test_asdl_parser.TestAsdlParser)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\test\test_asdl_parser.py", line 58, in test_product
    alias = self.types['alias']
KeyError: 'alias'

======================================================================
ERROR: test_visitor (test.test_asdl_parser.TestAsdlParser)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\test\test_asdl_parser.py", line 119, in test_visitor
    v.visit(self.types['mod'])
KeyError: 'mod'

======================================================================
FAIL: test_module (test.test_asdl_parser.TestAsdlParser)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\test\test_asdl_parser.py", line 45, in test_module
    self.assertIn('stmt', self.types)
AssertionError: 'stmt' not found in {Sum([Constructor(Module, [Field(stmt, body, seq=True), Field(type_ignore, type_ignores, seq=True)]), Constructor(Interactive, [Field(stmt, body, seq=True)]), Constructor(Expression, [Field(expr, body)]), Constructor(FunctionType, [Field(expr, argtypes, seq=True), Field(expr, returns)]), Constructor(Suite, [Field(stmt, body, seq=True)])]): 'mod', Sum([Constructor(FunctionDef, [Field(identifier, name), Field(arguments, args), Field(stmt, body, seq=True), Field(expr, decorator_list, seq=True), Field(expr, returns, opt=True), Field(string, type_comment, opt=True)]), Constructor(AsyncFunctionDef, [Field(identifier, name), Field(arguments, args), Field(stmt, body, seq=True), Field(expr, decorator_list, seq=True), Field(expr, returns, opt=True), Field(string, type_comment, opt=True)]), Constructor(ClassDef, [Field(identifier, name), Field(expr, bases, seq=True), Field(keyword, keywords, seq=True), Field(stmt, body, seq=True), Field(expr, decorator_list, seq=True)]), Constructor(Return, [Field(expr, value, opt=True)]), Constructor(Delete, [Field(expr, targets, seq=True)]), Constructor(Assign, [Field(expr, targets, seq=True), Field(expr, value), Field(string, type_comment, opt=True)]), Constructor(AugAssign, [Field(expr, target), Field(operator, op), Field(expr, value)]), Constructor(AnnAssign, [Field(expr, target), Field(expr, annotation), Field(expr, value, opt=True), Field(int, simple)]), Constructor(For, [Field(expr, target), Field(expr, iter), Field(stmt, body, seq=True), Field(stmt, orelse, seq=True), Field(string, type_comment, opt=True)]), Constructor(AsyncFor, [Field(expr, target), Field(expr, iter), Field(stmt, body, seq=True), Field(stmt, orelse, seq=True), Field(string, type_comment, opt=True)]), Constructor(While, [Field(expr, test), Field(stmt, body, seq=True), Field(stmt, orelse, seq=True)]), Constructor(If, [Field(expr, test), Field(stmt, body, seq=True), Field(stmt, orelse, seq=True)]), Constructor(With, [Field(withitem, items, seq=True), Field(stmt, body, seq=True), Field(string, type_comment, opt=True)]), Constructor(AsyncWith, [Field(withitem, items, seq=True), Field(stmt, body, seq=True), Field(string, type_comment, opt=True)]), Constructor(Raise, [Field(expr, exc, opt=True), Field(expr, cause, opt=True)]), Constructor(Try, [Field(stmt, body, seq=True), Field(excepthandler, handlers, seq=True), Field(stmt, orelse, seq=True), Field(stmt, finalbody, seq=True)]), Constructor(Assert, [Field(expr, test), Field(expr, msg, opt=True)]), Constructor(Import, [Field(alias, names, seq=True)]), Constructor(ImportFrom, [Field(identifier, module, opt=True), Field(alias, names, seq=True), Field(int, level, opt=True)]), Constructor(Global, [Field(identifier, names, seq=True)]), Constructor(Nonlocal, [Field(identifier, names, seq=True)]), Constructor(Expr, [Field(expr, value)]), Constructor(Pass, []), Constructor(Break, []), Constructor(Continue, [])], [Field(int, lineno), Field(int, col_offset), Field(int, end_lineno, opt=True), Field(int, end_col_offset, opt=True)]): 'stmt', Sum([Constructor(BoolOp, [Field(boolop, op), Field(expr, values, seq=True)]), Constructor(NamedExpr, [Field(expr, target), Field(expr, value)]), Constructor(BinOp, [Field(expr, left), Field(operator, op), Field(expr, right)]), Constructor(UnaryOp, [Field(unaryop, op), Field(expr, operand)]), Constructor(Lambda, [Field(arguments, args), Field(expr, body)]), Constructor(IfExp, [Field(expr, test), Field(expr, body), Field(expr, orelse)]), Constructor(Dict, [Field(expr, keys, seq=True), Field(expr, values, seq=True)]), Constructor(Set, [Field(expr, elts, seq=True)]), Constructor(ListComp, [Field(expr, elt), Field(comprehension, generators, seq=True)]), Constructor(SetComp, [Field(expr, elt), Field(comprehension, generators, seq=True)]), Constructor(DictComp, [Field(expr, key), Field(expr, value), Field(comprehension, generators, seq=True)]), Constructor(GeneratorExp, [Field(expr, elt), Field(comprehension, generators, seq=True)]), Constructor(Await, [Field(expr, value)]), Constructor(Yield, [Field(expr, value, opt=True)]), Constructor(YieldFrom, [Field(expr, value)]), Constructor(Compare, [Field(expr, left), Field(cmpop, ops, seq=True), Field(expr, comparators, seq=True)]), Constructor(Call, [Field(expr, func), Field(expr, args, seq=True), Field(keyword, keywords, seq=True)]), Constructor(FormattedValue, [Field(expr, value), Field(int, conversion, opt=True), Field(expr, format_spec, opt=True)]), Constructor(JoinedStr, [Field(expr, values, seq=True)]), Constructor(Constant, [Field(constant, value), Field(string, kind, opt=True)]), Constructor(Attribute, [Field(expr, value), Field(identifier, attr), Field(expr_context, ctx)]), Constructor(Subscript, [Field(expr, value), Field(slice, slice), Field(expr_context, ctx)]), Constructor(Starred, [Field(expr, value), Field(expr_context, ctx)]), Constructor(Name, [Field(identifier, id), Field(expr_context, ctx)]), Constructor(List, [Field(expr, elts, seq=True), Field(expr_context, ctx)]), Constructor(Tuple, [Field(expr, elts, seq=True), Field(expr_context, ctx)])], [Field(int, lineno), Field(int, col_offset), Field(int, end_lineno, opt=True), Field(int, end_col_offset, opt=True)]): 'expr', Sum([Constructor(Load, []), Constructor(Store, []), Constructor(Del, []), Constructor(AugLoad, []), Constructor(AugStore, []), Constructor(Param, [])]): 'expr_context', Sum([Constructor(Slice, [Field(expr, lower, opt=True), Field(expr, upper, opt=True), Field(expr, step, opt=True)]), Constructor(ExtSlice, [Field(slice, dims, seq=True)]), Constructor(Index, [Field(expr, value)])]): 'slice', Sum([Constructor(And, []), Constructor(Or, [])]): 'boolop', Sum([Constructor(Add, []), Constructor(Sub, []), Constructor(Mult, []), Constructor(MatMult, []), Constructor(Div, []), Constructor(Mod, []), Constructor(Pow, []), Constructor(LShift, []), Constructor(RShift, []), Constructor(BitOr, []), Constructor(BitXor, []), Constructor(BitAnd, []), Constructor(FloorDiv, [])]): 'operator', Sum([Constructor(Invert, []), Constructor(Not, []), Constructor(UAdd, []), Constructor(USub, [])]): 'unaryop', Sum([Constructor(Eq, []), Constructor(NotEq, []), Constructor(Lt, []), Constructor(LtE, []), Constructor(Gt, []), Constructor(GtE, []), Constructor(Is, []), Constructor(IsNot, []), Constructor(In, []), Constructor(NotIn, [])]): 'cmpop', Product([Field(expr, target), Field(expr, iter), Field(expr, ifs, seq=True), Field(int, is_async)]): 'comprehension', Sum([Constructor(ExceptHandler, [Field(expr, type, opt=True), Field(identifier, name, opt=True), Field(stmt, body, seq=True)])], [Field(int, lineno), Field(int, col_offset), Field(int, end_lineno, opt=True), Field(int, end_col_offset, opt=True)]): 'excepthandler', Product([Field(arg, args, seq=True), Field(arg, posonlyargs, seq=True), Field(arg, vararg, opt=True), Field(arg, kwonlyargs, seq=True), Field(expr, kw_defaults, seq=True), Field(arg, kwarg, opt=True), Field(expr, defaults, seq=True)]): 'arguments', Product([Field(identifier, arg), Field(expr, annotation, opt=True), Field(string, type_comment, opt=True)], [Field(int, lineno), Field(int, col_offset), Field(int, end_lineno, opt=True), Field(int, end_col_offset, opt=True)]): 'arg', Product([Field(identifier, arg, opt=True), Field(expr, value)]): 'keyword', Product([Field(identifier, name), Field(identifier, asname, opt=True)]): 'alias', Product([Field(expr, context_expr), Field(expr, optional_vars, opt=True)]): 'withitem', Sum([Constructor(TypeIgnore, [Field(int, lineno), Field(string, tag)])]): 'type_ignore'}

----------------------------------------------------------------------

Ran 6 tests in 0.019s

FAILED (failures=1, errors=5)
Re-running test_clinic in verbose mode


Traceback (most recent call last):
  File "C:\buildbot.python.org\3.x.kloth-win64\build\Tools\clinic\clinic.py", line 2006, in parse_file
    language = extensions[extension](filename)
KeyError: 'c'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\test\test_clinic.py", line 811, in test_external
    clinic.parse_file(testfile, force=True)
  File "C:\buildbot.python.org\3.x.kloth-win64\build\Tools\clinic\clinic.py", line 2008, in parse_file
    fail("Can't identify file type for file " + repr(filename))
  File "C:\buildbot.python.org\3.x.kloth-win64\build\Tools\clinic\clinic.py", line 129, in fail
    return warn_or_fail(True, *args, filename=filename, line_number=line_number)
  File "C:\buildbot.python.org\3.x.kloth-win64\build\Tools\clinic\clinic.py", line 122, in warn_or_fail
    sys.exit(-1)
SystemExit: -1

======================================================================
ERROR: test_param_default_expression (test.test_clinic.ClinicParserTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\test\test_clinic.py", line 327, in test_param_default_expression
    function = self.parse_function("module os\nos.access\n    follow_symlinks: int(c_default='MAXSIZE') = sys.maxsize")
  File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\test\test_clinic.py", line 781, in parse_function
    block = self.parse(text)
  File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\test\test_clinic.py", line 777, in parse
    parser.parse(block)
  File "C:\buildbot.python.org\3.x.kloth-win64\build\Tools\clinic\clinic.py", line 3973, in parse
    self.state(line)
  File "C:\buildbot.python.org\3.x.kloth-win64\build\Tools\clinic\clinic.py", line 4235, in state_parameters_start
    return self.next(self.state_parameter, line)
  File "C:\buildbot.python.org\3.x.kloth-win64\build\Tools\clinic\clinic.py", line 4006, in next
    self.state(line)
  File "C:\buildbot.python.org\3.x.kloth-win64\build\Tools\clinic\clinic.py", line 4430, in state_parameter
    fail("When you specify a named constant (" + repr(py_default) + ") as your default value,\nyou MUST specify a valid c_default.")
  File "C:\buildbot.python.org\3.x.kloth-win64\build\Tools\clinic\clinic.py", line 129, in fail
    return warn_or_fail(True, *args, filename=filename, line_number=line_number)
  File "C:\buildbot.python.org\3.x.kloth-win64\build\Tools\clinic\clinic.py", line 122, in warn_or_fail
    sys.exit(-1)
SystemExit: -1

----------------------------------------------------------------------

Ran 55 tests in 0.094s

FAILED (errors=2)
@bedevere-bot

This comment has been minimized.

Copy link

commented Jun 22, 2019

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot AMD64 Windows10 3.x has failed when building commit c8a3541.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/all/#builders/3/builds/3026) and take a look at the build logs.
  4. Check if the failure is related to this commit (c8a3541) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/all/#builders/3/builds/3026

Click to see traceback logs
Traceback (most recent call last):
  File "D:\buildarea\3.x.bolen-windows10\build\Tools\clinic\clinic.py", line 2006, in parse_file
    language = extensions[extension](filename)
KeyError: 'c'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "D:\buildarea\3.x.bolen-windows10\build\lib\test\test_clinic.py", line 811, in test_external
    clinic.parse_file(testfile, force=True)
  File "D:\buildarea\3.x.bolen-windows10\build\Tools\clinic\clinic.py", line 2008, in parse_file
    fail("Can't identify file type for file " + repr(filename))
  File "D:\buildarea\3.x.bolen-windows10\build\Tools\clinic\clinic.py", line 129, in fail
    return warn_or_fail(True, *args, filename=filename, line_number=line_number)
  File "D:\buildarea\3.x.bolen-windows10\build\Tools\clinic\clinic.py", line 122, in warn_or_fail
    sys.exit(-1)
SystemExit: -1

======================================================================
ERROR: test_param_default_expression (test.test_clinic.ClinicParserTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "D:\buildarea\3.x.bolen-windows10\build\lib\test\test_clinic.py", line 327, in test_param_default_expression
    function = self.parse_function("module os\nos.access\n    follow_symlinks: int(c_default='MAXSIZE') = sys.maxsize")
  File "D:\buildarea\3.x.bolen-windows10\build\lib\test\test_clinic.py", line 781, in parse_function
    block = self.parse(text)
  File "D:\buildarea\3.x.bolen-windows10\build\lib\test\test_clinic.py", line 777, in parse
    parser.parse(block)
  File "D:\buildarea\3.x.bolen-windows10\build\Tools\clinic\clinic.py", line 3973, in parse
    self.state(line)
  File "D:\buildarea\3.x.bolen-windows10\build\Tools\clinic\clinic.py", line 4235, in state_parameters_start
    return self.next(self.state_parameter, line)
  File "D:\buildarea\3.x.bolen-windows10\build\Tools\clinic\clinic.py", line 4006, in next
    self.state(line)
  File "D:\buildarea\3.x.bolen-windows10\build\Tools\clinic\clinic.py", line 4430, in state_parameter
    fail("When you specify a named constant (" + repr(py_default) + ") as your default value,\nyou MUST specify a valid c_default.")
  File "D:\buildarea\3.x.bolen-windows10\build\Tools\clinic\clinic.py", line 129, in fail
    return warn_or_fail(True, *args, filename=filename, line_number=line_number)
  File "D:\buildarea\3.x.bolen-windows10\build\Tools\clinic\clinic.py", line 122, in warn_or_fail
    sys.exit(-1)
SystemExit: -1

----------------------------------------------------------------------

Ran 55 tests in 0.113s

FAILED (errors=2)


Traceback (most recent call last):
  File "D:\buildarea\3.x.bolen-windows10\build\lib\test\test_asdl_parser.py", line 64, in test_attributes
    stmt = self.types['stmt']
KeyError: 'stmt'

======================================================================
ERROR: test_constructor_fields (test.test_asdl_parser.TestAsdlParser)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "D:\buildarea\3.x.bolen-windows10\build\lib\test\test_asdl_parser.py", line 72, in test_constructor_fields
    ehandler = self.types['excepthandler']
KeyError: 'excepthandler'

======================================================================
ERROR: test_definitions (test.test_asdl_parser.TestAsdlParser)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "D:\buildarea\3.x.bolen-windows10\build\lib\test\test_asdl_parser.py", line 54, in test_definitions
    self.assertIsInstance(self.types['withitem'], self.asdl.Product)
KeyError: 'withitem'

======================================================================
ERROR: test_product (test.test_asdl_parser.TestAsdlParser)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "D:\buildarea\3.x.bolen-windows10\build\lib\test\test_asdl_parser.py", line 58, in test_product
    alias = self.types['alias']
KeyError: 'alias'

======================================================================
ERROR: test_visitor (test.test_asdl_parser.TestAsdlParser)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "D:\buildarea\3.x.bolen-windows10\build\lib\test\test_asdl_parser.py", line 119, in test_visitor
    v.visit(self.types['mod'])
KeyError: 'mod'

======================================================================
FAIL: test_module (test.test_asdl_parser.TestAsdlParser)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "D:\buildarea\3.x.bolen-windows10\build\lib\test\test_asdl_parser.py", line 45, in test_module
    self.assertIn('stmt', self.types)
AssertionError: 'stmt' not found in {Sum([Constructor(Module, [Field(stmt, body, seq=True), Field(type_ignore, type_ignores, seq=True)]), Constructor(Interactive, [Field(stmt, body, seq=True)]), Constructor(Expression, [Field(expr, body)]), Constructor(FunctionType, [Field(expr, argtypes, seq=True), Field(expr, returns)]), Constructor(Suite, [Field(stmt, body, seq=True)])]): 'mod', Sum([Constructor(FunctionDef, [Field(identifier, name), Field(arguments, args), Field(stmt, body, seq=True), Field(expr, decorator_list, seq=True), Field(expr, returns, opt=True), Field(string, type_comment, opt=True)]), Constructor(AsyncFunctionDef, [Field(identifier, name), Field(arguments, args), Field(stmt, body, seq=True), Field(expr, decorator_list, seq=True), Field(expr, returns, opt=True), Field(string, type_comment, opt=True)]), Constructor(ClassDef, [Field(identifier, name), Field(expr, bases, seq=True), Field(keyword, keywords, seq=True), Field(stmt, body, seq=True), Field(expr, decorator_list, seq=True)]), Constructor(Return, [Field(expr, value, opt=True)]), Constructor(Delete, [Field(expr, targets, seq=True)]), Constructor(Assign, [Field(expr, targets, seq=True), Field(expr, value), Field(string, type_comment, opt=True)]), Constructor(AugAssign, [Field(expr, target), Field(operator, op), Field(expr, value)]), Constructor(AnnAssign, [Field(expr, target), Field(expr, annotation), Field(expr, value, opt=True), Field(int, simple)]), Constructor(For, [Field(expr, target), Field(expr, iter), Field(stmt, body, seq=True), Field(stmt, orelse, seq=True), Field(string, type_comment, opt=True)]), Constructor(AsyncFor, [Field(expr, target), Field(expr, iter), Field(stmt, body, seq=True), Field(stmt, orelse, seq=True), Field(string, type_comment, opt=True)]), Constructor(While, [Field(expr, test), Field(stmt, body, seq=True), Field(stmt, orelse, seq=True)]), Constructor(If, [Field(expr, test), Field(stmt, body, seq=True), Field(stmt, orelse, seq=True)]), Constructor(With, [Field(withitem, items, seq=True), Field(stmt, body, seq=True), Field(string, type_comment, opt=True)]), Constructor(AsyncWith, [Field(withitem, items, seq=True), Field(stmt, body, seq=True), Field(string, type_comment, opt=True)]), Constructor(Raise, [Field(expr, exc, opt=True), Field(expr, cause, opt=True)]), Constructor(Try, [Field(stmt, body, seq=True), Field(excepthandler, handlers, seq=True), Field(stmt, orelse, seq=True), Field(stmt, finalbody, seq=True)]), Constructor(Assert, [Field(expr, test), Field(expr, msg, opt=True)]), Constructor(Import, [Field(alias, names, seq=True)]), Constructor(ImportFrom, [Field(identifier, module, opt=True), Field(alias, names, seq=True), Field(int, level, opt=True)]), Constructor(Global, [Field(identifier, names, seq=True)]), Constructor(Nonlocal, [Field(identifier, names, seq=True)]), Constructor(Expr, [Field(expr, value)]), Constructor(Pass, []), Constructor(Break, []), Constructor(Continue, [])], [Field(int, lineno), Field(int, col_offset), Field(int, end_lineno, opt=True), Field(int, end_col_offset, opt=True)]): 'stmt', Sum([Constructor(BoolOp, [Field(boolop, op), Field(expr, values, seq=True)]), Constructor(NamedExpr, [Field(expr, target), Field(expr, value)]), Constructor(BinOp, [Field(expr, left), Field(operator, op), Field(expr, right)]), Constructor(UnaryOp, [Field(unaryop, op), Field(expr, operand)]), Constructor(Lambda, [Field(arguments, args), Field(expr, body)]), Constructor(IfExp, [Field(expr, test), Field(expr, body), Field(expr, orelse)]), Constructor(Dict, [Field(expr, keys, seq=True), Field(expr, values, seq=True)]), Constructor(Set, [Field(expr, elts, seq=True)]), Constructor(ListComp, [Field(expr, elt), Field(comprehension, generators, seq=True)]), Constructor(SetComp, [Field(expr, elt), Field(comprehension, generators, seq=True)]), Constructor(DictComp, [Field(expr, key), Field(expr, value), Field(comprehension, generators, seq=True)]), Constructor(GeneratorExp, [Field(expr, elt), Field(comprehension, generators, seq=True)]), Constructor(Await, [Field(expr, value)]), Constructor(Yield, [Field(expr, value, opt=True)]), Constructor(YieldFrom, [Field(expr, value)]), Constructor(Compare, [Field(expr, left), Field(cmpop, ops, seq=True), Field(expr, comparators, seq=True)]), Constructor(Call, [Field(expr, func), Field(expr, args, seq=True), Field(keyword, keywords, seq=True)]), Constructor(FormattedValue, [Field(expr, value), Field(int, conversion, opt=True), Field(expr, format_spec, opt=True)]), Constructor(JoinedStr, [Field(expr, values, seq=True)]), Constructor(Constant, [Field(constant, value), Field(string, kind, opt=True)]), Constructor(Attribute, [Field(expr, value), Field(identifier, attr), Field(expr_context, ctx)]), Constructor(Subscript, [Field(expr, value), Field(slice, slice), Field(expr_context, ctx)]), Constructor(Starred, [Field(expr, value), Field(expr_context, ctx)]), Constructor(Name, [Field(identifier, id), Field(expr_context, ctx)]), Constructor(List, [Field(expr, elts, seq=True), Field(expr_context, ctx)]), Constructor(Tuple, [Field(expr, elts, seq=True), Field(expr_context, ctx)])], [Field(int, lineno), Field(int, col_offset), Field(int, end_lineno, opt=True), Field(int, end_col_offset, opt=True)]): 'expr', Sum([Constructor(Load, []), Constructor(Store, []), Constructor(Del, []), Constructor(AugLoad, []), Constructor(AugStore, []), Constructor(Param, [])]): 'expr_context', Sum([Constructor(Slice, [Field(expr, lower, opt=True), Field(expr, upper, opt=True), Field(expr, step, opt=True)]), Constructor(ExtSlice, [Field(slice, dims, seq=True)]), Constructor(Index, [Field(expr, value)])]): 'slice', Sum([Constructor(And, []), Constructor(Or, [])]): 'boolop', Sum([Constructor(Add, []), Constructor(Sub, []), Constructor(Mult, []), Constructor(MatMult, []), Constructor(Div, []), Constructor(Mod, []), Constructor(Pow, []), Constructor(LShift, []), Constructor(RShift, []), Constructor(BitOr, []), Constructor(BitXor, []), Constructor(BitAnd, []), Constructor(FloorDiv, [])]): 'operator', Sum([Constructor(Invert, []), Constructor(Not, []), Constructor(UAdd, []), Constructor(USub, [])]): 'unaryop', Sum([Constructor(Eq, []), Constructor(NotEq, []), Constructor(Lt, []), Constructor(LtE, []), Constructor(Gt, []), Constructor(GtE, []), Constructor(Is, []), Constructor(IsNot, []), Constructor(In, []), Constructor(NotIn, [])]): 'cmpop', Product([Field(expr, target), Field(expr, iter), Field(expr, ifs, seq=True), Field(int, is_async)]): 'comprehension', Sum([Constructor(ExceptHandler, [Field(expr, type, opt=True), Field(identifier, name, opt=True), Field(stmt, body, seq=True)])], [Field(int, lineno), Field(int, col_offset), Field(int, end_lineno, opt=True), Field(int, end_col_offset, opt=True)]): 'excepthandler', Product([Field(arg, args, seq=True), Field(arg, posonlyargs, seq=True), Field(arg, vararg, opt=True), Field(arg, kwonlyargs, seq=True), Field(expr, kw_defaults, seq=True), Field(arg, kwarg, opt=True), Field(expr, defaults, seq=True)]): 'arguments', Product([Field(identifier, arg), Field(expr, annotation, opt=True), Field(string, type_comment, opt=True)], [Field(int, lineno), Field(int, col_offset), Field(int, end_lineno, opt=True), Field(int, end_col_offset, opt=True)]): 'arg', Product([Field(identifier, arg, opt=True), Field(expr, value)]): 'keyword', Product([Field(identifier, name), Field(identifier, asname, opt=True)]): 'alias', Product([Field(expr, context_expr), Field(expr, optional_vars, opt=True)]): 'withitem', Sum([Constructor(TypeIgnore, [Field(int, lineno), Field(string, tag)])]): 'type_ignore'}

----------------------------------------------------------------------

Ran 6 tests in 0.022s

FAILED (failures=1, errors=5)


Traceback (most recent call last):
  File "D:\buildarea\3.x.bolen-windows10\build\Tools\clinic\clinic.py", line 2006, in parse_file
    language = extensions[extension](filename)
KeyError: 'c'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "D:\buildarea\3.x.bolen-windows10\build\lib\test\test_clinic.py", line 811, in test_external
    clinic.parse_file(testfile, force=True)
  File "D:\buildarea\3.x.bolen-windows10\build\Tools\clinic\clinic.py", line 2008, in parse_file
    fail("Can't identify file type for file " + repr(filename))
  File "D:\buildarea\3.x.bolen-windows10\build\Tools\clinic\clinic.py", line 129, in fail
    return warn_or_fail(True, *args, filename=filename, line_number=line_number)
  File "D:\buildarea\3.x.bolen-windows10\build\Tools\clinic\clinic.py", line 122, in warn_or_fail
    sys.exit(-1)
SystemExit: -1

======================================================================
ERROR: test_param_default_expression (test.test_clinic.ClinicParserTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "D:\buildarea\3.x.bolen-windows10\build\lib\test\test_clinic.py", line 327, in test_param_default_expression
    function = self.parse_function("module os\nos.access\n    follow_symlinks: int(c_default='MAXSIZE') = sys.maxsize")
  File "D:\buildarea\3.x.bolen-windows10\build\lib\test\test_clinic.py", line 781, in parse_function
    block = self.parse(text)
  File "D:\buildarea\3.x.bolen-windows10\build\lib\test\test_clinic.py", line 777, in parse
    parser.parse(block)
  File "D:\buildarea\3.x.bolen-windows10\build\Tools\clinic\clinic.py", line 3973, in parse
    self.state(line)
  File "D:\buildarea\3.x.bolen-windows10\build\Tools\clinic\clinic.py", line 4235, in state_parameters_start
    return self.next(self.state_parameter, line)
  File "D:\buildarea\3.x.bolen-windows10\build\Tools\clinic\clinic.py", line 4006, in next
    self.state(line)
  File "D:\buildarea\3.x.bolen-windows10\build\Tools\clinic\clinic.py", line 4430, in state_parameter
    fail("When you specify a named constant (" + repr(py_default) + ") as your default value,\nyou MUST specify a valid c_default.")
  File "D:\buildarea\3.x.bolen-windows10\build\Tools\clinic\clinic.py", line 129, in fail
    return warn_or_fail(True, *args, filename=filename, line_number=line_number)
  File "D:\buildarea\3.x.bolen-windows10\build\Tools\clinic\clinic.py", line 122, in warn_or_fail
    sys.exit(-1)
SystemExit: -1

----------------------------------------------------------------------

Ran 55 tests in 0.075s

FAILED (errors=2)
Re-running test_asdl_parser in verbose mode


Traceback (most recent call last):
  File "D:\buildarea\3.x.bolen-windows10\build\lib\test\test_asdl_parser.py", line 64, in test_attributes
    stmt = self.types['stmt']
KeyError: 'stmt'

======================================================================
ERROR: test_constructor_fields (test.test_asdl_parser.TestAsdlParser)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "D:\buildarea\3.x.bolen-windows10\build\lib\test\test_asdl_parser.py", line 72, in test_constructor_fields
    ehandler = self.types['excepthandler']
KeyError: 'excepthandler'

======================================================================
ERROR: test_definitions (test.test_asdl_parser.TestAsdlParser)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "D:\buildarea\3.x.bolen-windows10\build\lib\test\test_asdl_parser.py", line 54, in test_definitions
    self.assertIsInstance(self.types['withitem'], self.asdl.Product)
KeyError: 'withitem'

======================================================================
ERROR: test_product (test.test_asdl_parser.TestAsdlParser)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "D:\buildarea\3.x.bolen-windows10\build\lib\test\test_asdl_parser.py", line 58, in test_product
    alias = self.types['alias']
KeyError: 'alias'

======================================================================
ERROR: test_visitor (test.test_asdl_parser.TestAsdlParser)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "D:\buildarea\3.x.bolen-windows10\build\lib\test\test_asdl_parser.py", line 119, in test_visitor
    v.visit(self.types['mod'])
KeyError: 'mod'

======================================================================
FAIL: test_module (test.test_asdl_parser.TestAsdlParser)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "D:\buildarea\3.x.bolen-windows10\build\lib\test\test_asdl_parser.py", line 45, in test_module
    self.assertIn('stmt', self.types)
AssertionError: 'stmt' not found in {Sum([Constructor(Module, [Field(stmt, body, seq=True), Field(type_ignore, type_ignores, seq=True)]), Constructor(Interactive, [Field(stmt, body, seq=True)]), Constructor(Expression, [Field(expr, body)]), Constructor(FunctionType, [Field(expr, argtypes, seq=True), Field(expr, returns)]), Constructor(Suite, [Field(stmt, body, seq=True)])]): 'mod', Sum([Constructor(FunctionDef, [Field(identifier, name), Field(arguments, args), Field(stmt, body, seq=True), Field(expr, decorator_list, seq=True), Field(expr, returns, opt=True), Field(string, type_comment, opt=True)]), Constructor(AsyncFunctionDef, [Field(identifier, name), Field(arguments, args), Field(stmt, body, seq=True), Field(expr, decorator_list, seq=True), Field(expr, returns, opt=True), Field(string, type_comment, opt=True)]), Constructor(ClassDef, [Field(identifier, name), Field(expr, bases, seq=True), Field(keyword, keywords, seq=True), Field(stmt, body, seq=True), Field(expr, decorator_list, seq=True)]), Constructor(Return, [Field(expr, value, opt=True)]), Constructor(Delete, [Field(expr, targets, seq=True)]), Constructor(Assign, [Field(expr, targets, seq=True), Field(expr, value), Field(string, type_comment, opt=True)]), Constructor(AugAssign, [Field(expr, target), Field(operator, op), Field(expr, value)]), Constructor(AnnAssign, [Field(expr, target), Field(expr, annotation), Field(expr, value, opt=True), Field(int, simple)]), Constructor(For, [Field(expr, target), Field(expr, iter), Field(stmt, body, seq=True), Field(stmt, orelse, seq=True), Field(string, type_comment, opt=True)]), Constructor(AsyncFor, [Field(expr, target), Field(expr, iter), Field(stmt, body, seq=True), Field(stmt, orelse, seq=True), Field(string, type_comment, opt=True)]), Constructor(While, [Field(expr, test), Field(stmt, body, seq=True), Field(stmt, orelse, seq=True)]), Constructor(If, [Field(expr, test), Field(stmt, body, seq=True), Field(stmt, orelse, seq=True)]), Constructor(With, [Field(withitem, items, seq=True), Field(stmt, body, seq=True), Field(string, type_comment, opt=True)]), Constructor(AsyncWith, [Field(withitem, items, seq=True), Field(stmt, body, seq=True), Field(string, type_comment, opt=True)]), Constructor(Raise, [Field(expr, exc, opt=True), Field(expr, cause, opt=True)]), Constructor(Try, [Field(stmt, body, seq=True), Field(excepthandler, handlers, seq=True), Field(stmt, orelse, seq=True), Field(stmt, finalbody, seq=True)]), Constructor(Assert, [Field(expr, test), Field(expr, msg, opt=True)]), Constructor(Import, [Field(alias, names, seq=True)]), Constructor(ImportFrom, [Field(identifier, module, opt=True), Field(alias, names, seq=True), Field(int, level, opt=True)]), Constructor(Global, [Field(identifier, names, seq=True)]), Constructor(Nonlocal, [Field(identifier, names, seq=True)]), Constructor(Expr, [Field(expr, value)]), Constructor(Pass, []), Constructor(Break, []), Constructor(Continue, [])], [Field(int, lineno), Field(int, col_offset), Field(int, end_lineno, opt=True), Field(int, end_col_offset, opt=True)]): 'stmt', Sum([Constructor(BoolOp, [Field(boolop, op), Field(expr, values, seq=True)]), Constructor(NamedExpr, [Field(expr, target), Field(expr, value)]), Constructor(BinOp, [Field(expr, left), Field(operator, op), Field(expr, right)]), Constructor(UnaryOp, [Field(unaryop, op), Field(expr, operand)]), Constructor(Lambda, [Field(arguments, args), Field(expr, body)]), Constructor(IfExp, [Field(expr, test), Field(expr, body), Field(expr, orelse)]), Constructor(Dict, [Field(expr, keys, seq=True), Field(expr, values, seq=True)]), Constructor(Set, [Field(expr, elts, seq=True)]), Constructor(ListComp, [Field(expr, elt), Field(comprehension, generators, seq=True)]), Constructor(SetComp, [Field(expr, elt), Field(comprehension, generators, seq=True)]), Constructor(DictComp, [Field(expr, key), Field(expr, value), Field(comprehension, generators, seq=True)]), Constructor(GeneratorExp, [Field(expr, elt), Field(comprehension, generators, seq=True)]), Constructor(Await, [Field(expr, value)]), Constructor(Yield, [Field(expr, value, opt=True)]), Constructor(YieldFrom, [Field(expr, value)]), Constructor(Compare, [Field(expr, left), Field(cmpop, ops, seq=True), Field(expr, comparators, seq=True)]), Constructor(Call, [Field(expr, func), Field(expr, args, seq=True), Field(keyword, keywords, seq=True)]), Constructor(FormattedValue, [Field(expr, value), Field(int, conversion, opt=True), Field(expr, format_spec, opt=True)]), Constructor(JoinedStr, [Field(expr, values, seq=True)]), Constructor(Constant, [Field(constant, value), Field(string, kind, opt=True)]), Constructor(Attribute, [Field(expr, value), Field(identifier, attr), Field(expr_context, ctx)]), Constructor(Subscript, [Field(expr, value), Field(slice, slice), Field(expr_context, ctx)]), Constructor(Starred, [Field(expr, value), Field(expr_context, ctx)]), Constructor(Name, [Field(identifier, id), Field(expr_context, ctx)]), Constructor(List, [Field(expr, elts, seq=True), Field(expr_context, ctx)]), Constructor(Tuple, [Field(expr, elts, seq=True), Field(expr_context, ctx)])], [Field(int, lineno), Field(int, col_offset), Field(int, end_lineno, opt=True), Field(int, end_col_offset, opt=True)]): 'expr', Sum([Constructor(Load, []), Constructor(Store, []), Constructor(Del, []), Constructor(AugLoad, []), Constructor(AugStore, []), Constructor(Param, [])]): 'expr_context', Sum([Constructor(Slice, [Field(expr, lower, opt=True), Field(expr, upper, opt=True), Field(expr, step, opt=True)]), Constructor(ExtSlice, [Field(slice, dims, seq=True)]), Constructor(Index, [Field(expr, value)])]): 'slice', Sum([Constructor(And, []), Constructor(Or, [])]): 'boolop', Sum([Constructor(Add, []), Constructor(Sub, []), Constructor(Mult, []), Constructor(MatMult, []), Constructor(Div, []), Constructor(Mod, []), Constructor(Pow, []), Constructor(LShift, []), Constructor(RShift, []), Constructor(BitOr, []), Constructor(BitXor, []), Constructor(BitAnd, []), Constructor(FloorDiv, [])]): 'operator', Sum([Constructor(Invert, []), Constructor(Not, []), Constructor(UAdd, []), Constructor(USub, [])]): 'unaryop', Sum([Constructor(Eq, []), Constructor(NotEq, []), Constructor(Lt, []), Constructor(LtE, []), Constructor(Gt, []), Constructor(GtE, []), Constructor(Is, []), Constructor(IsNot, []), Constructor(In, []), Constructor(NotIn, [])]): 'cmpop', Product([Field(expr, target), Field(expr, iter), Field(expr, ifs, seq=True), Field(int, is_async)]): 'comprehension', Sum([Constructor(ExceptHandler, [Field(expr, type, opt=True), Field(identifier, name, opt=True), Field(stmt, body, seq=True)])], [Field(int, lineno), Field(int, col_offset), Field(int, end_lineno, opt=True), Field(int, end_col_offset, opt=True)]): 'excepthandler', Product([Field(arg, args, seq=True), Field(arg, posonlyargs, seq=True), Field(arg, vararg, opt=True), Field(arg, kwonlyargs, seq=True), Field(expr, kw_defaults, seq=True), Field(arg, kwarg, opt=True), Field(expr, defaults, seq=True)]): 'arguments', Product([Field(identifier, arg), Field(expr, annotation, opt=True), Field(string, type_comment, opt=True)], [Field(int, lineno), Field(int, col_offset), Field(int, end_lineno, opt=True), Field(int, end_col_offset, opt=True)]): 'arg', Product([Field(identifier, arg, opt=True), Field(expr, value)]): 'keyword', Product([Field(identifier, name), Field(identifier, asname, opt=True)]): 'alias', Product([Field(expr, context_expr), Field(expr, optional_vars, opt=True)]): 'withitem', Sum([Constructor(TypeIgnore, [Field(int, lineno), Field(string, tag)])]): 'type_ignore'}

----------------------------------------------------------------------

Ran 6 tests in 0.019s

FAILED (failures=1, errors=5)

@joernheissler joernheissler deleted the joernheissler:pep-572-dictcomp-eval-order branch Jun 22, 2019

@joernheissler

This comment has been minimized.

Copy link
Contributor Author

commented Jun 22, 2019

For the Buildbot failure, refer to https://bugs.python.org/issue35224; msg346287, msg346292 and following.

@miss-islington

This comment has been minimized.

Copy link

commented Jun 22, 2019

Thanks @joernheissler for the PR 🌮🎉.. I'm working now to backport this PR to: 3.8.
🐍🍒🤖

miss-islington added a commit to miss-islington/cpython that referenced this pull request Jun 22, 2019
bpo-35224: Reverse evaluation order of key: value in dict comprehensi…
…ons (pythonGH-14139)

… as proposed in PEP 572; key is now evaluated before value.

https://bugs.python.org/issue35224
(cherry picked from commit c8a3541)

Co-authored-by: Jörn Heissler <joernheissler@users.noreply.github.com>
@bedevere-bot

This comment has been minimized.

Copy link

commented Jun 22, 2019

GH-14314 is a backport of this pull request to the 3.8 branch.

miss-islington added a commit that referenced this pull request Jun 22, 2019
bpo-35224: Reverse evaluation order of key: value in dict comprehensi…
…ons (GH-14139)

… as proposed in PEP 572; key is now evaluated before value.

https://bugs.python.org/issue35224
(cherry picked from commit c8a3541)

Co-authored-by: Jörn Heissler <joernheissler@users.noreply.github.com>
@bedevere-bot

This comment has been minimized.

Copy link

commented Jun 22, 2019

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot AMD64 Windows7 SP1 3.8 has failed when building commit 874ff65.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/all/#builders/208/builds/99) and take a look at the build logs.
  4. Check if the failure is related to this commit (874ff65) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/all/#builders/208/builds/99

Click to see traceback logs
Traceback (most recent call last):
  File "C:\buildbot.python.org\3.8.kloth-win64\build\lib\test\test_asdl_parser.py", line 64, in test_attributes
    stmt = self.types['stmt']
KeyError: 'stmt'

======================================================================
ERROR: test_constructor_fields (test.test_asdl_parser.TestAsdlParser)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\buildbot.python.org\3.8.kloth-win64\build\lib\test\test_asdl_parser.py", line 72, in test_constructor_fields
    ehandler = self.types['excepthandler']
KeyError: 'excepthandler'

======================================================================
ERROR: test_definitions (test.test_asdl_parser.TestAsdlParser)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\buildbot.python.org\3.8.kloth-win64\build\lib\test\test_asdl_parser.py", line 54, in test_definitions
    self.assertIsInstance(self.types['withitem'], self.asdl.Product)
KeyError: 'withitem'

======================================================================
ERROR: test_product (test.test_asdl_parser.TestAsdlParser)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\buildbot.python.org\3.8.kloth-win64\build\lib\test\test_asdl_parser.py", line 58, in test_product
    alias = self.types['alias']
KeyError: 'alias'

======================================================================
ERROR: test_visitor (test.test_asdl_parser.TestAsdlParser)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\buildbot.python.org\3.8.kloth-win64\build\lib\test\test_asdl_parser.py", line 119, in test_visitor
    v.visit(self.types['mod'])
KeyError: 'mod'

======================================================================
FAIL: test_module (test.test_asdl_parser.TestAsdlParser)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\buildbot.python.org\3.8.kloth-win64\build\lib\test\test_asdl_parser.py", line 45, in test_module
    self.assertIn('stmt', self.types)
AssertionError: 'stmt' not found in {Sum([Constructor(Module, [Field(stmt, body, seq=True), Field(type_ignore, type_ignores, seq=True)]), Constructor(Interactive, [Field(stmt, body, seq=True)]), Constructor(Expression, [Field(expr, body)]), Constructor(FunctionType, [Field(expr, argtypes, seq=True), Field(expr, returns)]), Constructor(Suite, [Field(stmt, body, seq=True)])]): 'mod', Sum([Constructor(FunctionDef, [Field(identifier, name), Field(arguments, args), Field(stmt, body, seq=True), Field(expr, decorator_list, seq=True), Field(expr, returns, opt=True), Field(string, type_comment, opt=True)]), Constructor(AsyncFunctionDef, [Field(identifier, name), Field(arguments, args), Field(stmt, body, seq=True), Field(expr, decorator_list, seq=True), Field(expr, returns, opt=True), Field(string, type_comment, opt=True)]), Constructor(ClassDef, [Field(identifier, name), Field(expr, bases, seq=True), Field(keyword, keywords, seq=True), Field(stmt, body, seq=True), Field(expr, decorator_list, seq=True)]), Constructor(Return, [Field(expr, value, opt=True)]), Constructor(Delete, [Field(expr, targets, seq=True)]), Constructor(Assign, [Field(expr, targets, seq=True), Field(expr, value), Field(string, type_comment, opt=True)]), Constructor(AugAssign, [Field(expr, target), Field(operator, op), Field(expr, value)]), Constructor(AnnAssign, [Field(expr, target), Field(expr, annotation), Field(expr, value, opt=True), Field(int, simple)]), Constructor(For, [Field(expr, target), Field(expr, iter), Field(stmt, body, seq=True), Field(stmt, orelse, seq=True), Field(string, type_comment, opt=True)]), Constructor(AsyncFor, [Field(expr, target), Field(expr, iter), Field(stmt, body, seq=True), Field(stmt, orelse, seq=True), Field(string, type_comment, opt=True)]), Constructor(While, [Field(expr, test), Field(stmt, body, seq=True), Field(stmt, orelse, seq=True)]), Constructor(If, [Field(expr, test), Field(stmt, body, seq=True), Field(stmt, orelse, seq=True)]), Constructor(With, [Field(withitem, items, seq=True), Field(stmt, body, seq=True), Field(string, type_comment, opt=True)]), Constructor(AsyncWith, [Field(withitem, items, seq=True), Field(stmt, body, seq=True), Field(string, type_comment, opt=True)]), Constructor(Raise, [Field(expr, exc, opt=True), Field(expr, cause, opt=True)]), Constructor(Try, [Field(stmt, body, seq=True), Field(excepthandler, handlers, seq=True), Field(stmt, orelse, seq=True), Field(stmt, finalbody, seq=True)]), Constructor(Assert, [Field(expr, test), Field(expr, msg, opt=True)]), Constructor(Import, [Field(alias, names, seq=True)]), Constructor(ImportFrom, [Field(identifier, module, opt=True), Field(alias, names, seq=True), Field(int, level, opt=True)]), Constructor(Global, [Field(identifier, names, seq=True)]), Constructor(Nonlocal, [Field(identifier, names, seq=True)]), Constructor(Expr, [Field(expr, value)]), Constructor(Pass, []), Constructor(Break, []), Constructor(Continue, [])], [Field(int, lineno), Field(int, col_offset), Field(int, end_lineno, opt=True), Field(int, end_col_offset, opt=True)]): 'stmt', Sum([Constructor(BoolOp, [Field(boolop, op), Field(expr, values, seq=True)]), Constructor(NamedExpr, [Field(expr, target), Field(expr, value)]), Constructor(BinOp, [Field(expr, left), Field(operator, op), Field(expr, right)]), Constructor(UnaryOp, [Field(unaryop, op), Field(expr, operand)]), Constructor(Lambda, [Field(arguments, args), Field(expr, body)]), Constructor(IfExp, [Field(expr, test), Field(expr, body), Field(expr, orelse)]), Constructor(Dict, [Field(expr, keys, seq=True), Field(expr, values, seq=True)]), Constructor(Set, [Field(expr, elts, seq=True)]), Constructor(ListComp, [Field(expr, elt), Field(comprehension, generators, seq=True)]), Constructor(SetComp, [Field(expr, elt), Field(comprehension, generators, seq=True)]), Constructor(DictComp, [Field(expr, key), Field(expr, value), Field(comprehension, generators, seq=True)]), Constructor(GeneratorExp, [Field(expr, elt), Field(comprehension, generators, seq=True)]), Constructor(Await, [Field(expr, value)]), Constructor(Yield, [Field(expr, value, opt=True)]), Constructor(YieldFrom, [Field(expr, value)]), Constructor(Compare, [Field(expr, left), Field(cmpop, ops, seq=True), Field(expr, comparators, seq=True)]), Constructor(Call, [Field(expr, func), Field(expr, args, seq=True), Field(keyword, keywords, seq=True)]), Constructor(FormattedValue, [Field(expr, value), Field(int, conversion, opt=True), Field(expr, format_spec, opt=True)]), Constructor(JoinedStr, [Field(expr, values, seq=True)]), Constructor(Constant, [Field(constant, value), Field(string, kind, opt=True)]), Constructor(Attribute, [Field(expr, value), Field(identifier, attr), Field(expr_context, ctx)]), Constructor(Subscript, [Field(expr, value), Field(slice, slice), Field(expr_context, ctx)]), Constructor(Starred, [Field(expr, value), Field(expr_context, ctx)]), Constructor(Name, [Field(identifier, id), Field(expr_context, ctx)]), Constructor(List, [Field(expr, elts, seq=True), Field(expr_context, ctx)]), Constructor(Tuple, [Field(expr, elts, seq=True), Field(expr_context, ctx)])], [Field(int, lineno), Field(int, col_offset), Field(int, end_lineno, opt=True), Field(int, end_col_offset, opt=True)]): 'expr', Sum([Constructor(Load, []), Constructor(Store, []), Constructor(Del, []), Constructor(AugLoad, []), Constructor(AugStore, []), Constructor(Param, [])]): 'expr_context', Sum([Constructor(Slice, [Field(expr, lower, opt=True), Field(expr, upper, opt=True), Field(expr, step, opt=True)]), Constructor(ExtSlice, [Field(slice, dims, seq=True)]), Constructor(Index, [Field(expr, value)])]): 'slice', Sum([Constructor(And, []), Constructor(Or, [])]): 'boolop', Sum([Constructor(Add, []), Constructor(Sub, []), Constructor(Mult, []), Constructor(MatMult, []), Constructor(Div, []), Constructor(Mod, []), Constructor(Pow, []), Constructor(LShift, []), Constructor(RShift, []), Constructor(BitOr, []), Constructor(BitXor, []), Constructor(BitAnd, []), Constructor(FloorDiv, [])]): 'operator', Sum([Constructor(Invert, []), Constructor(Not, []), Constructor(UAdd, []), Constructor(USub, [])]): 'unaryop', Sum([Constructor(Eq, []), Constructor(NotEq, []), Constructor(Lt, []), Constructor(LtE, []), Constructor(Gt, []), Constructor(GtE, []), Constructor(Is, []), Constructor(IsNot, []), Constructor(In, []), Constructor(NotIn, [])]): 'cmpop', Product([Field(expr, target), Field(expr, iter), Field(expr, ifs, seq=True), Field(int, is_async)]): 'comprehension', Sum([Constructor(ExceptHandler, [Field(expr, type, opt=True), Field(identifier, name, opt=True), Field(stmt, body, seq=True)])], [Field(int, lineno), Field(int, col_offset), Field(int, end_lineno, opt=True), Field(int, end_col_offset, opt=True)]): 'excepthandler', Product([Field(arg, args, seq=True), Field(arg, posonlyargs, seq=True), Field(arg, vararg, opt=True), Field(arg, kwonlyargs, seq=True), Field(expr, kw_defaults, seq=True), Field(arg, kwarg, opt=True), Field(expr, defaults, seq=True)]): 'arguments', Product([Field(identifier, arg), Field(expr, annotation, opt=True), Field(string, type_comment, opt=True)], [Field(int, lineno), Field(int, col_offset), Field(int, end_lineno, opt=True), Field(int, end_col_offset, opt=True)]): 'arg', Product([Field(identifier, arg, opt=True), Field(expr, value)]): 'keyword', Product([Field(identifier, name), Field(identifier, asname, opt=True)]): 'alias', Product([Field(expr, context_expr), Field(expr, optional_vars, opt=True)]): 'withitem', Sum([Constructor(TypeIgnore, [Field(int, lineno), Field(string, tag)])]): 'type_ignore'}

----------------------------------------------------------------------

Ran 6 tests in 0.021s

FAILED (failures=1, errors=5)


Traceback (most recent call last):
  File "C:\buildbot.python.org\3.8.kloth-win64\build\Tools\clinic\clinic.py", line 2006, in parse_file
    language = extensions[extension](filename)
KeyError: 'c'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\buildbot.python.org\3.8.kloth-win64\build\lib\test\test_clinic.py", line 811, in test_external
    clinic.parse_file(testfile, force=True)
  File "C:\buildbot.python.org\3.8.kloth-win64\build\Tools\clinic\clinic.py", line 2008, in parse_file
    fail("Can't identify file type for file " + repr(filename))
  File "C:\buildbot.python.org\3.8.kloth-win64\build\Tools\clinic\clinic.py", line 129, in fail
    return warn_or_fail(True, *args, filename=filename, line_number=line_number)
  File "C:\buildbot.python.org\3.8.kloth-win64\build\Tools\clinic\clinic.py", line 122, in warn_or_fail
    sys.exit(-1)
SystemExit: -1

======================================================================
ERROR: test_param_default_expression (test.test_clinic.ClinicParserTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\buildbot.python.org\3.8.kloth-win64\build\lib\test\test_clinic.py", line 327, in test_param_default_expression
    function = self.parse_function("module os\nos.access\n    follow_symlinks: int(c_default='MAXSIZE') = sys.maxsize")
  File "C:\buildbot.python.org\3.8.kloth-win64\build\lib\test\test_clinic.py", line 781, in parse_function
    block = self.parse(text)
  File "C:\buildbot.python.org\3.8.kloth-win64\build\lib\test\test_clinic.py", line 777, in parse
    parser.parse(block)
  File "C:\buildbot.python.org\3.8.kloth-win64\build\Tools\clinic\clinic.py", line 3973, in parse
    self.state(line)
  File "C:\buildbot.python.org\3.8.kloth-win64\build\Tools\clinic\clinic.py", line 4235, in state_parameters_start
    return self.next(self.state_parameter, line)
  File "C:\buildbot.python.org\3.8.kloth-win64\build\Tools\clinic\clinic.py", line 4006, in next
    self.state(line)
  File "C:\buildbot.python.org\3.8.kloth-win64\build\Tools\clinic\clinic.py", line 4430, in state_parameter
    fail("When you specify a named constant (" + repr(py_default) + ") as your default value,\nyou MUST specify a valid c_default.")
  File "C:\buildbot.python.org\3.8.kloth-win64\build\Tools\clinic\clinic.py", line 129, in fail
    return warn_or_fail(True, *args, filename=filename, line_number=line_number)
  File "C:\buildbot.python.org\3.8.kloth-win64\build\Tools\clinic\clinic.py", line 122, in warn_or_fail
    sys.exit(-1)
SystemExit: -1

----------------------------------------------------------------------

Ran 55 tests in 0.101s

FAILED (errors=2)


Traceback (most recent call last):
  File "C:\buildbot.python.org\3.8.kloth-win64\build\lib\test\test_asdl_parser.py", line 64, in test_attributes
    stmt = self.types['stmt']
KeyError: 'stmt'

======================================================================
ERROR: test_constructor_fields (test.test_asdl_parser.TestAsdlParser)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\buildbot.python.org\3.8.kloth-win64\build\lib\test\test_asdl_parser.py", line 72, in test_constructor_fields
    ehandler = self.types['excepthandler']
KeyError: 'excepthandler'

======================================================================
ERROR: test_definitions (test.test_asdl_parser.TestAsdlParser)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\buildbot.python.org\3.8.kloth-win64\build\lib\test\test_asdl_parser.py", line 54, in test_definitions
    self.assertIsInstance(self.types['withitem'], self.asdl.Product)
KeyError: 'withitem'

======================================================================
ERROR: test_product (test.test_asdl_parser.TestAsdlParser)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\buildbot.python.org\3.8.kloth-win64\build\lib\test\test_asdl_parser.py", line 58, in test_product
    alias = self.types['alias']
KeyError: 'alias'

======================================================================
ERROR: test_visitor (test.test_asdl_parser.TestAsdlParser)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\buildbot.python.org\3.8.kloth-win64\build\lib\test\test_asdl_parser.py", line 119, in test_visitor
    v.visit(self.types['mod'])
KeyError: 'mod'

======================================================================
FAIL: test_module (test.test_asdl_parser.TestAsdlParser)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\buildbot.python.org\3.8.kloth-win64\build\lib\test\test_asdl_parser.py", line 45, in test_module
    self.assertIn('stmt', self.types)
AssertionError: 'stmt' not found in {Sum([Constructor(Module, [Field(stmt, body, seq=True), Field(type_ignore, type_ignores, seq=True)]), Constructor(Interactive, [Field(stmt, body, seq=True)]), Constructor(Expression, [Field(expr, body)]), Constructor(FunctionType, [Field(expr, argtypes, seq=True), Field(expr, returns)]), Constructor(Suite, [Field(stmt, body, seq=True)])]): 'mod', Sum([Constructor(FunctionDef, [Field(identifier, name), Field(arguments, args), Field(stmt, body, seq=True), Field(expr, decorator_list, seq=True), Field(expr, returns, opt=True), Field(string, type_comment, opt=True)]), Constructor(AsyncFunctionDef, [Field(identifier, name), Field(arguments, args), Field(stmt, body, seq=True), Field(expr, decorator_list, seq=True), Field(expr, returns, opt=True), Field(string, type_comment, opt=True)]), Constructor(ClassDef, [Field(identifier, name), Field(expr, bases, seq=True), Field(keyword, keywords, seq=True), Field(stmt, body, seq=True), Field(expr, decorator_list, seq=True)]), Constructor(Return, [Field(expr, value, opt=True)]), Constructor(Delete, [Field(expr, targets, seq=True)]), Constructor(Assign, [Field(expr, targets, seq=True), Field(expr, value), Field(string, type_comment, opt=True)]), Constructor(AugAssign, [Field(expr, target), Field(operator, op), Field(expr, value)]), Constructor(AnnAssign, [Field(expr, target), Field(expr, annotation), Field(expr, value, opt=True), Field(int, simple)]), Constructor(For, [Field(expr, target), Field(expr, iter), Field(stmt, body, seq=True), Field(stmt, orelse, seq=True), Field(string, type_comment, opt=True)]), Constructor(AsyncFor, [Field(expr, target), Field(expr, iter), Field(stmt, body, seq=True), Field(stmt, orelse, seq=True), Field(string, type_comment, opt=True)]), Constructor(While, [Field(expr, test), Field(stmt, body, seq=True), Field(stmt, orelse, seq=True)]), Constructor(If, [Field(expr, test), Field(stmt, body, seq=True), Field(stmt, orelse, seq=True)]), Constructor(With, [Field(withitem, items, seq=True), Field(stmt, body, seq=True), Field(string, type_comment, opt=True)]), Constructor(AsyncWith, [Field(withitem, items, seq=True), Field(stmt, body, seq=True), Field(string, type_comment, opt=True)]), Constructor(Raise, [Field(expr, exc, opt=True), Field(expr, cause, opt=True)]), Constructor(Try, [Field(stmt, body, seq=True), Field(excepthandler, handlers, seq=True), Field(stmt, orelse, seq=True), Field(stmt, finalbody, seq=True)]), Constructor(Assert, [Field(expr, test), Field(expr, msg, opt=True)]), Constructor(Import, [Field(alias, names, seq=True)]), Constructor(ImportFrom, [Field(identifier, module, opt=True), Field(alias, names, seq=True), Field(int, level, opt=True)]), Constructor(Global, [Field(identifier, names, seq=True)]), Constructor(Nonlocal, [Field(identifier, names, seq=True)]), Constructor(Expr, [Field(expr, value)]), Constructor(Pass, []), Constructor(Break, []), Constructor(Continue, [])], [Field(int, lineno), Field(int, col_offset), Field(int, end_lineno, opt=True), Field(int, end_col_offset, opt=True)]): 'stmt', Sum([Constructor(BoolOp, [Field(boolop, op), Field(expr, values, seq=True)]), Constructor(NamedExpr, [Field(expr, target), Field(expr, value)]), Constructor(BinOp, [Field(expr, left), Field(operator, op), Field(expr, right)]), Constructor(UnaryOp, [Field(unaryop, op), Field(expr, operand)]), Constructor(Lambda, [Field(arguments, args), Field(expr, body)]), Constructor(IfExp, [Field(expr, test), Field(expr, body), Field(expr, orelse)]), Constructor(Dict, [Field(expr, keys, seq=True), Field(expr, values, seq=True)]), Constructor(Set, [Field(expr, elts, seq=True)]), Constructor(ListComp, [Field(expr, elt), Field(comprehension, generators, seq=True)]), Constructor(SetComp, [Field(expr, elt), Field(comprehension, generators, seq=True)]), Constructor(DictComp, [Field(expr, key), Field(expr, value), Field(comprehension, generators, seq=True)]), Constructor(GeneratorExp, [Field(expr, elt), Field(comprehension, generators, seq=True)]), Constructor(Await, [Field(expr, value)]), Constructor(Yield, [Field(expr, value, opt=True)]), Constructor(YieldFrom, [Field(expr, value)]), Constructor(Compare, [Field(expr, left), Field(cmpop, ops, seq=True), Field(expr, comparators, seq=True)]), Constructor(Call, [Field(expr, func), Field(expr, args, seq=True), Field(keyword, keywords, seq=True)]), Constructor(FormattedValue, [Field(expr, value), Field(int, conversion, opt=True), Field(expr, format_spec, opt=True)]), Constructor(JoinedStr, [Field(expr, values, seq=True)]), Constructor(Constant, [Field(constant, value), Field(string, kind, opt=True)]), Constructor(Attribute, [Field(expr, value), Field(identifier, attr), Field(expr_context, ctx)]), Constructor(Subscript, [Field(expr, value), Field(slice, slice), Field(expr_context, ctx)]), Constructor(Starred, [Field(expr, value), Field(expr_context, ctx)]), Constructor(Name, [Field(identifier, id), Field(expr_context, ctx)]), Constructor(List, [Field(expr, elts, seq=True), Field(expr_context, ctx)]), Constructor(Tuple, [Field(expr, elts, seq=True), Field(expr_context, ctx)])], [Field(int, lineno), Field(int, col_offset), Field(int, end_lineno, opt=True), Field(int, end_col_offset, opt=True)]): 'expr', Sum([Constructor(Load, []), Constructor(Store, []), Constructor(Del, []), Constructor(AugLoad, []), Constructor(AugStore, []), Constructor(Param, [])]): 'expr_context', Sum([Constructor(Slice, [Field(expr, lower, opt=True), Field(expr, upper, opt=True), Field(expr, step, opt=True)]), Constructor(ExtSlice, [Field(slice, dims, seq=True)]), Constructor(Index, [Field(expr, value)])]): 'slice', Sum([Constructor(And, []), Constructor(Or, [])]): 'boolop', Sum([Constructor(Add, []), Constructor(Sub, []), Constructor(Mult, []), Constructor(MatMult, []), Constructor(Div, []), Constructor(Mod, []), Constructor(Pow, []), Constructor(LShift, []), Constructor(RShift, []), Constructor(BitOr, []), Constructor(BitXor, []), Constructor(BitAnd, []), Constructor(FloorDiv, [])]): 'operator', Sum([Constructor(Invert, []), Constructor(Not, []), Constructor(UAdd, []), Constructor(USub, [])]): 'unaryop', Sum([Constructor(Eq, []), Constructor(NotEq, []), Constructor(Lt, []), Constructor(LtE, []), Constructor(Gt, []), Constructor(GtE, []), Constructor(Is, []), Constructor(IsNot, []), Constructor(In, []), Constructor(NotIn, [])]): 'cmpop', Product([Field(expr, target), Field(expr, iter), Field(expr, ifs, seq=True), Field(int, is_async)]): 'comprehension', Sum([Constructor(ExceptHandler, [Field(expr, type, opt=True), Field(identifier, name, opt=True), Field(stmt, body, seq=True)])], [Field(int, lineno), Field(int, col_offset), Field(int, end_lineno, opt=True), Field(int, end_col_offset, opt=True)]): 'excepthandler', Product([Field(arg, args, seq=True), Field(arg, posonlyargs, seq=True), Field(arg, vararg, opt=True), Field(arg, kwonlyargs, seq=True), Field(expr, kw_defaults, seq=True), Field(arg, kwarg, opt=True), Field(expr, defaults, seq=True)]): 'arguments', Product([Field(identifier, arg), Field(expr, annotation, opt=True), Field(string, type_comment, opt=True)], [Field(int, lineno), Field(int, col_offset), Field(int, end_lineno, opt=True), Field(int, end_col_offset, opt=True)]): 'arg', Product([Field(identifier, arg, opt=True), Field(expr, value)]): 'keyword', Product([Field(identifier, name), Field(identifier, asname, opt=True)]): 'alias', Product([Field(expr, context_expr), Field(expr, optional_vars, opt=True)]): 'withitem', Sum([Constructor(TypeIgnore, [Field(int, lineno), Field(string, tag)])]): 'type_ignore'}

----------------------------------------------------------------------

Ran 6 tests in 0.019s

FAILED (failures=1, errors=5)
Re-running test_clinic in verbose mode


Traceback (most recent call last):
  File "C:\buildbot.python.org\3.8.kloth-win64\build\Tools\clinic\clinic.py", line 2006, in parse_file
    language = extensions[extension](filename)
KeyError: 'c'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\buildbot.python.org\3.8.kloth-win64\build\lib\test\test_clinic.py", line 811, in test_external
    clinic.parse_file(testfile, force=True)
  File "C:\buildbot.python.org\3.8.kloth-win64\build\Tools\clinic\clinic.py", line 2008, in parse_file
    fail("Can't identify file type for file " + repr(filename))
  File "C:\buildbot.python.org\3.8.kloth-win64\build\Tools\clinic\clinic.py", line 129, in fail
    return warn_or_fail(True, *args, filename=filename, line_number=line_number)
  File "C:\buildbot.python.org\3.8.kloth-win64\build\Tools\clinic\clinic.py", line 122, in warn_or_fail
    sys.exit(-1)
SystemExit: -1

======================================================================
ERROR: test_param_default_expression (test.test_clinic.ClinicParserTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\buildbot.python.org\3.8.kloth-win64\build\lib\test\test_clinic.py", line 327, in test_param_default_expression
    function = self.parse_function("module os\nos.access\n    follow_symlinks: int(c_default='MAXSIZE') = sys.maxsize")
  File "C:\buildbot.python.org\3.8.kloth-win64\build\lib\test\test_clinic.py", line 781, in parse_function
    block = self.parse(text)
  File "C:\buildbot.python.org\3.8.kloth-win64\build\lib\test\test_clinic.py", line 777, in parse
    parser.parse(block)
  File "C:\buildbot.python.org\3.8.kloth-win64\build\Tools\clinic\clinic.py", line 3973, in parse
    self.state(line)
  File "C:\buildbot.python.org\3.8.kloth-win64\build\Tools\clinic\clinic.py", line 4235, in state_parameters_start
    return self.next(self.state_parameter, line)
  File "C:\buildbot.python.org\3.8.kloth-win64\build\Tools\clinic\clinic.py", line 4006, in next
    self.state(line)
  File "C:\buildbot.python.org\3.8.kloth-win64\build\Tools\clinic\clinic.py", line 4430, in state_parameter
    fail("When you specify a named constant (" + repr(py_default) + ") as your default value,\nyou MUST specify a valid c_default.")
  File "C:\buildbot.python.org\3.8.kloth-win64\build\Tools\clinic\clinic.py", line 129, in fail
    return warn_or_fail(True, *args, filename=filename, line_number=line_number)
  File "C:\buildbot.python.org\3.8.kloth-win64\build\Tools\clinic\clinic.py", line 122, in warn_or_fail
    sys.exit(-1)
SystemExit: -1

----------------------------------------------------------------------

Ran 55 tests in 0.093s

FAILED (errors=2)
@bedevere-bot

This comment has been minimized.

Copy link

commented Jun 22, 2019

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot AMD64 Windows10 3.8 has failed when building commit 874ff65.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/all/#builders/217/builds/92) and take a look at the build logs.
  4. Check if the failure is related to this commit (874ff65) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/all/#builders/217/builds/92

Click to see traceback logs
Traceback (most recent call last):
  File "D:\buildarea\3.8.bolen-windows10\build\lib\test\test_asdl_parser.py", line 64, in test_attributes
    stmt = self.types['stmt']
KeyError: 'stmt'

======================================================================
ERROR: test_constructor_fields (test.test_asdl_parser.TestAsdlParser)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "D:\buildarea\3.8.bolen-windows10\build\lib\test\test_asdl_parser.py", line 72, in test_constructor_fields
    ehandler = self.types['excepthandler']
KeyError: 'excepthandler'

======================================================================
ERROR: test_definitions (test.test_asdl_parser.TestAsdlParser)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "D:\buildarea\3.8.bolen-windows10\build\lib\test\test_asdl_parser.py", line 54, in test_definitions
    self.assertIsInstance(self.types['withitem'], self.asdl.Product)
KeyError: 'withitem'

======================================================================
ERROR: test_product (test.test_asdl_parser.TestAsdlParser)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "D:\buildarea\3.8.bolen-windows10\build\lib\test\test_asdl_parser.py", line 58, in test_product
    alias = self.types['alias']
KeyError: 'alias'

======================================================================
ERROR: test_visitor (test.test_asdl_parser.TestAsdlParser)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "D:\buildarea\3.8.bolen-windows10\build\lib\test\test_asdl_parser.py", line 119, in test_visitor
    v.visit(self.types['mod'])
KeyError: 'mod'

======================================================================
FAIL: test_module (test.test_asdl_parser.TestAsdlParser)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "D:\buildarea\3.8.bolen-windows10\build\lib\test\test_asdl_parser.py", line 45, in test_module
    self.assertIn('stmt', self.types)
AssertionError: 'stmt' not found in {Sum([Constructor(Module, [Field(stmt, body, seq=True), Field(type_ignore, type_ignores, seq=True)]), Constructor(Interactive, [Field(stmt, body, seq=True)]), Constructor(Expression, [Field(expr, body)]), Constructor(FunctionType, [Field(expr, argtypes, seq=True), Field(expr, returns)]), Constructor(Suite, [Field(stmt, body, seq=True)])]): 'mod', Sum([Constructor(FunctionDef, [Field(identifier, name), Field(arguments, args), Field(stmt, body, seq=True), Field(expr, decorator_list, seq=True), Field(expr, returns, opt=True), Field(string, type_comment, opt=True)]), Constructor(AsyncFunctionDef, [Field(identifier, name), Field(arguments, args), Field(stmt, body, seq=True), Field(expr, decorator_list, seq=True), Field(expr, returns, opt=True), Field(string, type_comment, opt=True)]), Constructor(ClassDef, [Field(identifier, name), Field(expr, bases, seq=True), Field(keyword, keywords, seq=True), Field(stmt, body, seq=True), Field(expr, decorator_list, seq=True)]), Constructor(Return, [Field(expr, value, opt=True)]), Constructor(Delete, [Field(expr, targets, seq=True)]), Constructor(Assign, [Field(expr, targets, seq=True), Field(expr, value), Field(string, type_comment, opt=True)]), Constructor(AugAssign, [Field(expr, target), Field(operator, op), Field(expr, value)]), Constructor(AnnAssign, [Field(expr, target), Field(expr, annotation), Field(expr, value, opt=True), Field(int, simple)]), Constructor(For, [Field(expr, target), Field(expr, iter), Field(stmt, body, seq=True), Field(stmt, orelse, seq=True), Field(string, type_comment, opt=True)]), Constructor(AsyncFor, [Field(expr, target), Field(expr, iter), Field(stmt, body, seq=True), Field(stmt, orelse, seq=True), Field(string, type_comment, opt=True)]), Constructor(While, [Field(expr, test), Field(stmt, body, seq=True), Field(stmt, orelse, seq=True)]), Constructor(If, [Field(expr, test), Field(stmt, body, seq=True), Field(stmt, orelse, seq=True)]), Constructor(With, [Field(withitem, items, seq=True), Field(stmt, body, seq=True), Field(string, type_comment, opt=True)]), Constructor(AsyncWith, [Field(withitem, items, seq=True), Field(stmt, body, seq=True), Field(string, type_comment, opt=True)]), Constructor(Raise, [Field(expr, exc, opt=True), Field(expr, cause, opt=True)]), Constructor(Try, [Field(stmt, body, seq=True), Field(excepthandler, handlers, seq=True), Field(stmt, orelse, seq=True), Field(stmt, finalbody, seq=True)]), Constructor(Assert, [Field(expr, test), Field(expr, msg, opt=True)]), Constructor(Import, [Field(alias, names, seq=True)]), Constructor(ImportFrom, [Field(identifier, module, opt=True), Field(alias, names, seq=True), Field(int, level, opt=True)]), Constructor(Global, [Field(identifier, names, seq=True)]), Constructor(Nonlocal, [Field(identifier, names, seq=True)]), Constructor(Expr, [Field(expr, value)]), Constructor(Pass, []), Constructor(Break, []), Constructor(Continue, [])], [Field(int, lineno), Field(int, col_offset), Field(int, end_lineno, opt=True), Field(int, end_col_offset, opt=True)]): 'stmt', Sum([Constructor(BoolOp, [Field(boolop, op), Field(expr, values, seq=True)]), Constructor(NamedExpr, [Field(expr, target), Field(expr, value)]), Constructor(BinOp, [Field(expr, left), Field(operator, op), Field(expr, right)]), Constructor(UnaryOp, [Field(unaryop, op), Field(expr, operand)]), Constructor(Lambda, [Field(arguments, args), Field(expr, body)]), Constructor(IfExp, [Field(expr, test), Field(expr, body), Field(expr, orelse)]), Constructor(Dict, [Field(expr, keys, seq=True), Field(expr, values, seq=True)]), Constructor(Set, [Field(expr, elts, seq=True)]), Constructor(ListComp, [Field(expr, elt), Field(comprehension, generators, seq=True)]), Constructor(SetComp, [Field(expr, elt), Field(comprehension, generators, seq=True)]), Constructor(DictComp, [Field(expr, key), Field(expr, value), Field(comprehension, generators, seq=True)]), Constructor(GeneratorExp, [Field(expr, elt), Field(comprehension, generators, seq=True)]), Constructor(Await, [Field(expr, value)]), Constructor(Yield, [Field(expr, value, opt=True)]), Constructor(YieldFrom, [Field(expr, value)]), Constructor(Compare, [Field(expr, left), Field(cmpop, ops, seq=True), Field(expr, comparators, seq=True)]), Constructor(Call, [Field(expr, func), Field(expr, args, seq=True), Field(keyword, keywords, seq=True)]), Constructor(FormattedValue, [Field(expr, value), Field(int, conversion, opt=True), Field(expr, format_spec, opt=True)]), Constructor(JoinedStr, [Field(expr, values, seq=True)]), Constructor(Constant, [Field(constant, value), Field(string, kind, opt=True)]), Constructor(Attribute, [Field(expr, value), Field(identifier, attr), Field(expr_context, ctx)]), Constructor(Subscript, [Field(expr, value), Field(slice, slice), Field(expr_context, ctx)]), Constructor(Starred, [Field(expr, value), Field(expr_context, ctx)]), Constructor(Name, [Field(identifier, id), Field(expr_context, ctx)]), Constructor(List, [Field(expr, elts, seq=True), Field(expr_context, ctx)]), Constructor(Tuple, [Field(expr, elts, seq=True), Field(expr_context, ctx)])], [Field(int, lineno), Field(int, col_offset), Field(int, end_lineno, opt=True), Field(int, end_col_offset, opt=True)]): 'expr', Sum([Constructor(Load, []), Constructor(Store, []), Constructor(Del, []), Constructor(AugLoad, []), Constructor(AugStore, []), Constructor(Param, [])]): 'expr_context', Sum([Constructor(Slice, [Field(expr, lower, opt=True), Field(expr, upper, opt=True), Field(expr, step, opt=True)]), Constructor(ExtSlice, [Field(slice, dims, seq=True)]), Constructor(Index, [Field(expr, value)])]): 'slice', Sum([Constructor(And, []), Constructor(Or, [])]): 'boolop', Sum([Constructor(Add, []), Constructor(Sub, []), Constructor(Mult, []), Constructor(MatMult, []), Constructor(Div, []), Constructor(Mod, []), Constructor(Pow, []), Constructor(LShift, []), Constructor(RShift, []), Constructor(BitOr, []), Constructor(BitXor, []), Constructor(BitAnd, []), Constructor(FloorDiv, [])]): 'operator', Sum([Constructor(Invert, []), Constructor(Not, []), Constructor(UAdd, []), Constructor(USub, [])]): 'unaryop', Sum([Constructor(Eq, []), Constructor(NotEq, []), Constructor(Lt, []), Constructor(LtE, []), Constructor(Gt, []), Constructor(GtE, []), Constructor(Is, []), Constructor(IsNot, []), Constructor(In, []), Constructor(NotIn, [])]): 'cmpop', Product([Field(expr, target), Field(expr, iter), Field(expr, ifs, seq=True), Field(int, is_async)]): 'comprehension', Sum([Constructor(ExceptHandler, [Field(expr, type, opt=True), Field(identifier, name, opt=True), Field(stmt, body, seq=True)])], [Field(int, lineno), Field(int, col_offset), Field(int, end_lineno, opt=True), Field(int, end_col_offset, opt=True)]): 'excepthandler', Product([Field(arg, args, seq=True), Field(arg, posonlyargs, seq=True), Field(arg, vararg, opt=True), Field(arg, kwonlyargs, seq=True), Field(expr, kw_defaults, seq=True), Field(arg, kwarg, opt=True), Field(expr, defaults, seq=True)]): 'arguments', Product([Field(identifier, arg), Field(expr, annotation, opt=True), Field(string, type_comment, opt=True)], [Field(int, lineno), Field(int, col_offset), Field(int, end_lineno, opt=True), Field(int, end_col_offset, opt=True)]): 'arg', Product([Field(identifier, arg, opt=True), Field(expr, value)]): 'keyword', Product([Field(identifier, name), Field(identifier, asname, opt=True)]): 'alias', Product([Field(expr, context_expr), Field(expr, optional_vars, opt=True)]): 'withitem', Sum([Constructor(TypeIgnore, [Field(int, lineno), Field(string, tag)])]): 'type_ignore'}

----------------------------------------------------------------------

Ran 6 tests in 0.031s

FAILED (failures=1, errors=5)


Traceback (most recent call last):
  File "D:\buildarea\3.8.bolen-windows10\build\Tools\clinic\clinic.py", line 2006, in parse_file
    language = extensions[extension](filename)
KeyError: 'c'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "D:\buildarea\3.8.bolen-windows10\build\lib\test\test_clinic.py", line 811, in test_external
    clinic.parse_file(testfile, force=True)
  File "D:\buildarea\3.8.bolen-windows10\build\Tools\clinic\clinic.py", line 2008, in parse_file
    fail("Can't identify file type for file " + repr(filename))
  File "D:\buildarea\3.8.bolen-windows10\build\Tools\clinic\clinic.py", line 129, in fail
    return warn_or_fail(True, *args, filename=filename, line_number=line_number)
  File "D:\buildarea\3.8.bolen-windows10\build\Tools\clinic\clinic.py", line 122, in warn_or_fail
    sys.exit(-1)
SystemExit: -1

======================================================================
ERROR: test_param_default_expression (test.test_clinic.ClinicParserTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "D:\buildarea\3.8.bolen-windows10\build\lib\test\test_clinic.py", line 327, in test_param_default_expression
    function = self.parse_function("module os\nos.access\n    follow_symlinks: int(c_default='MAXSIZE') = sys.maxsize")
  File "D:\buildarea\3.8.bolen-windows10\build\lib\test\test_clinic.py", line 781, in parse_function
    block = self.parse(text)
  File "D:\buildarea\3.8.bolen-windows10\build\lib\test\test_clinic.py", line 777, in parse
    parser.parse(block)
  File "D:\buildarea\3.8.bolen-windows10\build\Tools\clinic\clinic.py", line 3973, in parse
    self.state(line)
  File "D:\buildarea\3.8.bolen-windows10\build\Tools\clinic\clinic.py", line 4235, in state_parameters_start
    return self.next(self.state_parameter, line)
  File "D:\buildarea\3.8.bolen-windows10\build\Tools\clinic\clinic.py", line 4006, in next
    self.state(line)
  File "D:\buildarea\3.8.bolen-windows10\build\Tools\clinic\clinic.py", line 4430, in state_parameter
    fail("When you specify a named constant (" + repr(py_default) + ") as your default value,\nyou MUST specify a valid c_default.")
  File "D:\buildarea\3.8.bolen-windows10\build\Tools\clinic\clinic.py", line 129, in fail
    return warn_or_fail(True, *args, filename=filename, line_number=line_number)
  File "D:\buildarea\3.8.bolen-windows10\build\Tools\clinic\clinic.py", line 122, in warn_or_fail
    sys.exit(-1)
SystemExit: -1

----------------------------------------------------------------------

Ran 55 tests in 0.083s

FAILED (errors=2)


Traceback (most recent call last):
  File "D:\buildarea\3.8.bolen-windows10\build\lib\test\test_asdl_parser.py", line 64, in test_attributes
    stmt = self.types['stmt']
KeyError: 'stmt'

======================================================================
ERROR: test_constructor_fields (test.test_asdl_parser.TestAsdlParser)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "D:\buildarea\3.8.bolen-windows10\build\lib\test\test_asdl_parser.py", line 72, in test_constructor_fields
    ehandler = self.types['excepthandler']
KeyError: 'excepthandler'

======================================================================
ERROR: test_definitions (test.test_asdl_parser.TestAsdlParser)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "D:\buildarea\3.8.bolen-windows10\build\lib\test\test_asdl_parser.py", line 54, in test_definitions
    self.assertIsInstance(self.types['withitem'], self.asdl.Product)
KeyError: 'withitem'

======================================================================
ERROR: test_product (test.test_asdl_parser.TestAsdlParser)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "D:\buildarea\3.8.bolen-windows10\build\lib\test\test_asdl_parser.py", line 58, in test_product
    alias = self.types['alias']
KeyError: 'alias'

======================================================================
ERROR: test_visitor (test.test_asdl_parser.TestAsdlParser)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "D:\buildarea\3.8.bolen-windows10\build\lib\test\test_asdl_parser.py", line 119, in test_visitor
    v.visit(self.types['mod'])
KeyError: 'mod'

======================================================================
FAIL: test_module (test.test_asdl_parser.TestAsdlParser)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "D:\buildarea\3.8.bolen-windows10\build\lib\test\test_asdl_parser.py", line 45, in test_module
    self.assertIn('stmt', self.types)
AssertionError: 'stmt' not found in {Sum([Constructor(Module, [Field(stmt, body, seq=True), Field(type_ignore, type_ignores, seq=True)]), Constructor(Interactive, [Field(stmt, body, seq=True)]), Constructor(Expression, [Field(expr, body)]), Constructor(FunctionType, [Field(expr, argtypes, seq=True), Field(expr, returns)]), Constructor(Suite, [Field(stmt, body, seq=True)])]): 'mod', Sum([Constructor(FunctionDef, [Field(identifier, name), Field(arguments, args), Field(stmt, body, seq=True), Field(expr, decorator_list, seq=True), Field(expr, returns, opt=True), Field(string, type_comment, opt=True)]), Constructor(AsyncFunctionDef, [Field(identifier, name), Field(arguments, args), Field(stmt, body, seq=True), Field(expr, decorator_list, seq=True), Field(expr, returns, opt=True), Field(string, type_comment, opt=True)]), Constructor(ClassDef, [Field(identifier, name), Field(expr, bases, seq=True), Field(keyword, keywords, seq=True), Field(stmt, body, seq=True), Field(expr, decorator_list, seq=True)]), Constructor(Return, [Field(expr, value, opt=True)]), Constructor(Delete, [Field(expr, targets, seq=True)]), Constructor(Assign, [Field(expr, targets, seq=True), Field(expr, value), Field(string, type_comment, opt=True)]), Constructor(AugAssign, [Field(expr, target), Field(operator, op), Field(expr, value)]), Constructor(AnnAssign, [Field(expr, target), Field(expr, annotation), Field(expr, value, opt=True), Field(int, simple)]), Constructor(For, [Field(expr, target), Field(expr, iter), Field(stmt, body, seq=True), Field(stmt, orelse, seq=True), Field(string, type_comment, opt=True)]), Constructor(AsyncFor, [Field(expr, target), Field(expr, iter), Field(stmt, body, seq=True), Field(stmt, orelse, seq=True), Field(string, type_comment, opt=True)]), Constructor(While, [Field(expr, test), Field(stmt, body, seq=True), Field(stmt, orelse, seq=True)]), Constructor(If, [Field(expr, test), Field(stmt, body, seq=True), Field(stmt, orelse, seq=True)]), Constructor(With, [Field(withitem, items, seq=True), Field(stmt, body, seq=True), Field(string, type_comment, opt=True)]), Constructor(AsyncWith, [Field(withitem, items, seq=True), Field(stmt, body, seq=True), Field(string, type_comment, opt=True)]), Constructor(Raise, [Field(expr, exc, opt=True), Field(expr, cause, opt=True)]), Constructor(Try, [Field(stmt, body, seq=True), Field(excepthandler, handlers, seq=True), Field(stmt, orelse, seq=True), Field(stmt, finalbody, seq=True)]), Constructor(Assert, [Field(expr, test), Field(expr, msg, opt=True)]), Constructor(Import, [Field(alias, names, seq=True)]), Constructor(ImportFrom, [Field(identifier, module, opt=True), Field(alias, names, seq=True), Field(int, level, opt=True)]), Constructor(Global, [Field(identifier, names, seq=True)]), Constructor(Nonlocal, [Field(identifier, names, seq=True)]), Constructor(Expr, [Field(expr, value)]), Constructor(Pass, []), Constructor(Break, []), Constructor(Continue, [])], [Field(int, lineno), Field(int, col_offset), Field(int, end_lineno, opt=True), Field(int, end_col_offset, opt=True)]): 'stmt', Sum([Constructor(BoolOp, [Field(boolop, op), Field(expr, values, seq=True)]), Constructor(NamedExpr, [Field(expr, target), Field(expr, value)]), Constructor(BinOp, [Field(expr, left), Field(operator, op), Field(expr, right)]), Constructor(UnaryOp, [Field(unaryop, op), Field(expr, operand)]), Constructor(Lambda, [Field(arguments, args), Field(expr, body)]), Constructor(IfExp, [Field(expr, test), Field(expr, body), Field(expr, orelse)]), Constructor(Dict, [Field(expr, keys, seq=True), Field(expr, values, seq=True)]), Constructor(Set, [Field(expr, elts, seq=True)]), Constructor(ListComp, [Field(expr, elt), Field(comprehension, generators, seq=True)]), Constructor(SetComp, [Field(expr, elt), Field(comprehension, generators, seq=True)]), Constructor(DictComp, [Field(expr, key), Field(expr, value), Field(comprehension, generators, seq=True)]), Constructor(GeneratorExp, [Field(expr, elt), Field(comprehension, generators, seq=True)]), Constructor(Await, [Field(expr, value)]), Constructor(Yield, [Field(expr, value, opt=True)]), Constructor(YieldFrom, [Field(expr, value)]), Constructor(Compare, [Field(expr, left), Field(cmpop, ops, seq=True), Field(expr, comparators, seq=True)]), Constructor(Call, [Field(expr, func), Field(expr, args, seq=True), Field(keyword, keywords, seq=True)]), Constructor(FormattedValue, [Field(expr, value), Field(int, conversion, opt=True), Field(expr, format_spec, opt=True)]), Constructor(JoinedStr, [Field(expr, values, seq=True)]), Constructor(Constant, [Field(constant, value), Field(string, kind, opt=True)]), Constructor(Attribute, [Field(expr, value), Field(identifier, attr), Field(expr_context, ctx)]), Constructor(Subscript, [Field(expr, value), Field(slice, slice), Field(expr_context, ctx)]), Constructor(Starred, [Field(expr, value), Field(expr_context, ctx)]), Constructor(Name, [Field(identifier, id), Field(expr_context, ctx)]), Constructor(List, [Field(expr, elts, seq=True), Field(expr_context, ctx)]), Constructor(Tuple, [Field(expr, elts, seq=True), Field(expr_context, ctx)])], [Field(int, lineno), Field(int, col_offset), Field(int, end_lineno, opt=True), Field(int, end_col_offset, opt=True)]): 'expr', Sum([Constructor(Load, []), Constructor(Store, []), Constructor(Del, []), Constructor(AugLoad, []), Constructor(AugStore, []), Constructor(Param, [])]): 'expr_context', Sum([Constructor(Slice, [Field(expr, lower, opt=True), Field(expr, upper, opt=True), Field(expr, step, opt=True)]), Constructor(ExtSlice, [Field(slice, dims, seq=True)]), Constructor(Index, [Field(expr, value)])]): 'slice', Sum([Constructor(And, []), Constructor(Or, [])]): 'boolop', Sum([Constructor(Add, []), Constructor(Sub, []), Constructor(Mult, []), Constructor(MatMult, []), Constructor(Div, []), Constructor(Mod, []), Constructor(Pow, []), Constructor(LShift, []), Constructor(RShift, []), Constructor(BitOr, []), Constructor(BitXor, []), Constructor(BitAnd, []), Constructor(FloorDiv, [])]): 'operator', Sum([Constructor(Invert, []), Constructor(Not, []), Constructor(UAdd, []), Constructor(USub, [])]): 'unaryop', Sum([Constructor(Eq, []), Constructor(NotEq, []), Constructor(Lt, []), Constructor(LtE, []), Constructor(Gt, []), Constructor(GtE, []), Constructor(Is, []), Constructor(IsNot, []), Constructor(In, []), Constructor(NotIn, [])]): 'cmpop', Product([Field(expr, target), Field(expr, iter), Field(expr, ifs, seq=True), Field(int, is_async)]): 'comprehension', Sum([Constructor(ExceptHandler, [Field(expr, type, opt=True), Field(identifier, name, opt=True), Field(stmt, body, seq=True)])], [Field(int, lineno), Field(int, col_offset), Field(int, end_lineno, opt=True), Field(int, end_col_offset, opt=True)]): 'excepthandler', Product([Field(arg, args, seq=True), Field(arg, posonlyargs, seq=True), Field(arg, vararg, opt=True), Field(arg, kwonlyargs, seq=True), Field(expr, kw_defaults, seq=True), Field(arg, kwarg, opt=True), Field(expr, defaults, seq=True)]): 'arguments', Product([Field(identifier, arg), Field(expr, annotation, opt=True), Field(string, type_comment, opt=True)], [Field(int, lineno), Field(int, col_offset), Field(int, end_lineno, opt=True), Field(int, end_col_offset, opt=True)]): 'arg', Product([Field(identifier, arg, opt=True), Field(expr, value)]): 'keyword', Product([Field(identifier, name), Field(identifier, asname, opt=True)]): 'alias', Product([Field(expr, context_expr), Field(expr, optional_vars, opt=True)]): 'withitem', Sum([Constructor(TypeIgnore, [Field(int, lineno), Field(string, tag)])]): 'type_ignore'}

----------------------------------------------------------------------

Ran 6 tests in 0.023s

FAILED (failures=1, errors=5)
Re-running test_clinic in verbose mode


Traceback (most recent call last):
  File "D:\buildarea\3.8.bolen-windows10\build\Tools\clinic\clinic.py", line 2006, in parse_file
    language = extensions[extension](filename)
KeyError: 'c'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "D:\buildarea\3.8.bolen-windows10\build\lib\test\test_clinic.py", line 811, in test_external
    clinic.parse_file(testfile, force=True)
  File "D:\buildarea\3.8.bolen-windows10\build\Tools\clinic\clinic.py", line 2008, in parse_file
    fail("Can't identify file type for file " + repr(filename))
  File "D:\buildarea\3.8.bolen-windows10\build\Tools\clinic\clinic.py", line 129, in fail
    return warn_or_fail(True, *args, filename=filename, line_number=line_number)
  File "D:\buildarea\3.8.bolen-windows10\build\Tools\clinic\clinic.py", line 122, in warn_or_fail
    sys.exit(-1)
SystemExit: -1

======================================================================
ERROR: test_param_default_expression (test.test_clinic.ClinicParserTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "D:\buildarea\3.8.bolen-windows10\build\lib\test\test_clinic.py", line 327, in test_param_default_expression
    function = self.parse_function("module os\nos.access\n    follow_symlinks: int(c_default='MAXSIZE') = sys.maxsize")
  File "D:\buildarea\3.8.bolen-windows10\build\lib\test\test_clinic.py", line 781, in parse_function
    block = self.parse(text)
  File "D:\buildarea\3.8.bolen-windows10\build\lib\test\test_clinic.py", line 777, in parse
    parser.parse(block)
  File "D:\buildarea\3.8.bolen-windows10\build\Tools\clinic\clinic.py", line 3973, in parse
    self.state(line)
  File "D:\buildarea\3.8.bolen-windows10\build\Tools\clinic\clinic.py", line 4235, in state_parameters_start
    return self.next(self.state_parameter, line)
  File "D:\buildarea\3.8.bolen-windows10\build\Tools\clinic\clinic.py", line 4006, in next
    self.state(line)
  File "D:\buildarea\3.8.bolen-windows10\build\Tools\clinic\clinic.py", line 4430, in state_parameter
    fail("When you specify a named constant (" + repr(py_default) + ") as your default value,\nyou MUST specify a valid c_default.")
  File "D:\buildarea\3.8.bolen-windows10\build\Tools\clinic\clinic.py", line 129, in fail
    return warn_or_fail(True, *args, filename=filename, line_number=line_number)
  File "D:\buildarea\3.8.bolen-windows10\build\Tools\clinic\clinic.py", line 122, in warn_or_fail
    sys.exit(-1)
SystemExit: -1

----------------------------------------------------------------------

Ran 55 tests in 0.094s

FAILED (errors=2)
PatrikKopkan pushed a commit to PatrikKopkan/cpython that referenced this pull request Sep 6, 2019
lisroach added a commit to lisroach/cpython that referenced this pull request Sep 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants
You can’t perform that action at this time.