Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
* | bpo-38964: Print correct filename on a SyntaxError in an fstring (GH-20399) | Lysandros Nikolaou | 2020-05-26 | 1 | -0/+13 | |
| | | | | | | | | When a `SyntaxError` in the expression part of a fstring is found, the filename attribute of the `SyntaxError` is always `<fstring>`. With this commit, it gets changed to always have the name of the file the fstring resides in. Co-authored-by: Pablo Galindo <Pablogsal@gmail.com> | |||||
* | bpo-40593: Improve syntax errors for invalid characters in source code. ↵ | Serhiy Storchaka | 2020-05-12 | 1 | -1/+1 | |
| | | | | (GH-20033) | |||||
* | bpo-40246: Revert reporting of invalid string prefixes (GH-19888) | Lysandros Nikolaou | 2020-05-04 | 1 | -1/+1 | |
| | | | | Due to backwards compatibility concerns regarding keywords immediately followed by a string without whitespace between them (like in `bg="#d00" if clear else"#fca"`) will fail to parse, commit 41d5b94af44e34ac05d4cd57460ed104ccf96628 has to be reverted. | |||||
* | bpo-40443: Remove unused imports in tests (GH-19804) | Victor Stinner | 2020-04-30 | 1 | -2/+0 | |
| | ||||||
* | bpo-40334: Fix shifting of nested f-strings in the new parser (GH-19771) | Lysandros Nikolaou | 2020-04-29 | 1 | -2/+1 | |
| | | | `JoinedStr`s and `FormattedValue also needs to be shifted, in order to correctly compute the location information of nested f-strings. | |||||
* | bpo-40334: Rename PyConfig.use_peg to _use_peg_parser (GH-19670) | Victor Stinner | 2020-04-23 | 1 | -1/+2 | |
| | | | | | | | | | | | * Rename PyConfig.use_peg to _use_peg_parser * Document PyConfig._use_peg_parser and mark it a deprecated * Mark -X oldparser option and PYTHONOLDPARSER env var as deprecated in the documentation. * Add use_old_parser() and skip_if_new_parser() to test.support * Remove sys.flags.use_peg: use_old_parser() uses _testinternalcapi.get_configs() instead. * Enhance test_embed tests * subprocess._args_from_interpreter_flags() copies -X oldparser | |||||
* | bpo-40334: PEP 617 implementation: New PEG parser for CPython (GH-19503) | Pablo Galindo | 2020-04-22 | 1 | -1/+3 | |
| | | | | Co-authored-by: Guido van Rossum <guido@python.org> Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com> | |||||
* | bpo-40267: Fix message when last input character produces a SyntaxError ↵ | Lysandros Nikolaou | 2020-04-15 | 1 | -1/+1 | |
| | | | | | | | | (GH-19521) When there is a SyntaxError after reading the last input character from the tokenizer and if no newline follows it, the error message used to be `unexpected EOF while parsing`, which is wrong. | |||||
* | Add double quote cases to invalid prefix tests (GH-19489) | Pablo Galindo | 2020-04-13 | 1 | -4/+5 | |
| | ||||||
* | bpo-40246: Report a better error message for invalid string prefixes (GH-19476) | Lysandros Nikolaou | 2020-04-12 | 1 | -1/+1 | |
| | ||||||
* | bpo-32912: Revert SyntaxWarning on invalid escape sequences. (GH-15195) | Gregory P. Smith | 2019-08-10 | 1 | -1/+1 | |
| | | | | | | | | | | | | | | | | | | DeprecationWarning will continue to be emitted for invalid escape sequences in string and bytes literals just as it did in 3.7. SyntaxWarning may be emitted in the future. But per mailing list discussion, we don't yet know when because we haven't settled on how to do so in a non-disruptive manner. (Applies 4c5b6bac2408f879231c7cd38d67657dd4804e7c to the master branch). (This is https://github.com/python/cpython/pull/15142 for master/3.9) https://bugs.python.org/issue32912 Automerge-Triggered-By: @gpshead | |||||
* | Fix typos in docs, comments and test assert messages (#14872) | Min ho Kim | 2019-07-21 | 1 | -1/+1 | |
| | ||||||
* | bpo-37050: Remove expr_text from FormattedValue ast node, use Constant node ↵ | Eric V. Smith | 2019-05-27 | 1 | -0/+18 | |
| | | | | | instead (GH-13597) When using the "=" debug functionality of f-strings, use another Constant node (or a merged constant node) instead of adding expr_text to the FormattedValue node. | |||||
* | bpo-36817: Do not decrement reference for expr_text on fstring = parsing ↵ | Pablo Galindo | 2019-05-12 | 1 | -0/+2 | |
| | | | | failure (GH-13256) | |||||
* | bpo-36817: Add f-string debugging using '='. (GH-13123) | Eric V. Smith | 2019-05-08 | 1 | -0/+109 | |
| | | | If a "=" is specified a the end of an f-string expression, the f-string will evaluate to the text of the expression, followed by '=', followed by the repr of the value of the expression. | |||||
* | bpo-16806: Fix `lineno` and `col_offset` for multi-line string tokens (GH-10021) | Anthony Sottile | 2019-01-13 | 1 | -19/+13 | |
| | ||||||
* | bpo-35494: Improve syntax error messages for unbalanced parentheses in ↵ | Serhiy Storchaka | 2019-01-12 | 1 | -13/+23 | |
| | | | | f-string. (GH-11161) | |||||
* | bpo-33306: Improve SyntaxError messages for unbalanced parentheses. (GH-6516) | Serhiy Storchaka | 2018-12-17 | 1 | -4/+8 | |
| | ||||||
* | bpo-32912: Replace a DeprecationWarning with a SyntaxWarning (GH-9652) | Serhiy Storchaka | 2018-10-19 | 1 | -1/+1 | |
| | | | | for invalid escape sequences in string and bytes literals. | |||||
* | bpo-32892: Use ast.Constant instead of specific constant AST types. (GH-9445) | Serhiy Storchaka | 2018-09-27 | 1 | -8/+16 | |
| | ||||||
* | bpo-30465: Fix lineno and col_offset in fstring AST nodes (#1800) | Łukasz Langa | 2017-09-07 | 1 | -0/+248 | |
| | | | For f-string ast nodes, fix the line and columns so that tools such as flake8 can identify them correctly. | |||||
* | bpo-30682: Removed a too-strict assertion that failed for certain f-strings. ↵ | ericvsmith | 2017-06-16 | 1 | -0/+6 | |
| | | | | | | (#2232) This caused a segfault on eval("f'\\\n'") and eval("f'\\\r'") in debug build. | |||||
* | bpo-30529: Fix errors for invalid whitespaces in f-string subexpressions. ↵ | Serhiy Storchaka | 2017-06-08 | 1 | -0/+10 | |
| | | | | | | | | (#1888) 'invalid character in identifier' now is raised instead of 'f-string: empty expression not allowed' if a subexpression contains only whitespaces and they are not accepted by Python parser. | |||||
* | bpo-29104: Fixed parsing backslashes in f-strings. (#490) | Serhiy Storchaka | 2017-05-25 | 1 | -0/+14 | |
| | ||||||
* | Issue #28739: f-string expressions no longer accepted as docstrings and | Serhiy Storchaka | 2016-12-11 | 1 | -10/+10 | |
| | | | | by ast.literal_eval() even if they do not include subexpressions. | |||||
* | Fixed issue #28633: segfault when concatenating bytes literal and f-string. | Eric V. Smith | 2016-11-07 | 1 | -0/+7 | |
| | ||||||
* | Update test_no_escapes_for_braces to clarify behavior with a docstring and ↵ | Jason R. Coombs | 2016-11-06 | 1 | -5/+8 | |
| | | | | expressions that clearly are not evaluated. | |||||
* | Additionally show that a backslash-escaped opening brace is treated as a ↵ | Jason R. Coombs | 2016-11-06 | 1 | -0/+1 | |
| | | | | literal and thus triggers the single closing brace error, clarifying #28590. | |||||
* | Add an additional test with a newline, one that's very similar to ↵ | Jason R. Coombs | 2016-11-06 | 1 | -0/+1 | |
| | | | | test_parens_in_expressions, but because the newline is not a literal newline, but a backslash en, this error is triggered. | |||||
* | Update the f-string test broken in issue #28385. | Serhiy Storchaka | 2016-10-31 | 1 | -1/+1 | |
| | ||||||
* | Add another f-string comment test, to make sure # are being caught in the ↵ | Eric V. Smith | 2016-09-11 | 1 | -0/+2 | |
| | | | | right place. | |||||
* | Make an f-string error message more exact and consistent. | Eric V. Smith | 2016-09-11 | 1 | -1/+2 | |
| | ||||||
* | Issue 27948: Allow backslashes in the literal string portion of f-strings, ↵ | Eric V. Smith | 2016-09-10 | 1 | -46/+86 | |
| | | | | but not in the expressions. Also, require expressions to begin and end with literal curly braces. | |||||
* | Closes issue 27921: Disallow backslashes anywhere in f-strings. This is a ↵ | Eric V. Smith | 2016-09-03 | 1 | -91/+51 | |
| | | | | temporary restriction. In 3.6 beta 2, the plan is to again allow backslashes in the string parts of f-strings, but disallow them in the expression parts. | |||||
* | Issue #27626: Further spelling fixes for 3.6 | Martin Panter | 2016-07-28 | 1 | -1/+1 | |
| | ||||||
* | Fix issue 26287: While handling FORMAT_VALUE opcode, the top of stack was ↵ | Eric V. Smith | 2016-02-05 | 1 | -0/+11 | |
| | | | | being corrupted if an error occurred in PyObject_Format(). | |||||
* | f-strings: More tests for empty expressions along with missing closing braces. | Eric V. Smith | 2015-09-23 | 1 | -0/+7 | |
| | ||||||
* | Added more f-string test for empty expressions. | Eric V. Smith | 2015-09-23 | 1 | -0/+3 | |
| | ||||||
* | Move f-string compilation of the expression earlier, before the conversion ↵ | Eric V. Smith | 2015-09-23 | 1 | -0/+9 | |
| | | | | character and format_spec are checked. This allows for error messages that more closely match what a user would expect. | |||||
* | Issue #24965: Implement PEP 498 "Literal String Interpolation". ↵ | Eric V. Smith | 2015-09-19 | 1 | -0/+715 | |
Documentation is still needed, I'll open an issue for that. |