Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | [3.10] bpo-44885: Correct the ast locations of f-strings with format specs ↵ | Pablo Galindo Salgado | 2021-08-12 | 1 | -11/+29 |
| | | | | | | | and repeated expressions (GH-27729) (GH-27743) (cherry picked from commit 8e832fb2a2cb54d7262148b6ec15563dffb48d63) Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com> | ||||
* | bpo-43797: Improve syntax error for invalid comparisons (#25317) | Pablo Galindo | 2021-04-12 | 1 | -3/+3 |
| | | | | | | | | | | | | | * bpo-43797: Improve syntax error for invalid comparisons * Update Lib/test/test_fstring.py Co-authored-by: Guido van Rossum <gvanrossum@gmail.com> * Apply review comments * can't -> cannot Co-authored-by: Guido van Rossum <gvanrossum@gmail.com> | ||||
* | bpo-43651: PEP 597: Fix EncodingWarning in some tests (GH-25171) | Inada Naoki | 2021-04-04 | 1 | -1/+1 |
| | | | | | | | | | | | * Fix test_float * Fix _osx_support * Fix test_fstring * Fix test_gc * Fix test_gzip * Fix test_hashlib * Fix unrelated whitespace issue Co-authored-by: Ned Deily <nad@python.org> | ||||
* | bpo-41064: Improve syntax error for invalid usage of '**' in f-strings ↵ | Pablo Galindo | 2021-03-24 | 1 | -0/+9 |
| | | | | (GH-25006) | ||||
* | bpo-42986: Fix parser crash when reporting syntax errors in f-string with ↵ | Pablo Galindo | 2021-01-31 | 1 | -0/+3 |
| | | | | newlines (GH-24279) | ||||
* | bpo-40176: Improve error messages for unclosed string literals (GH-19346) | Batuhan Taskaya | 2021-01-20 | 1 | -1/+1 |
| | | | Automerge-Triggered-By: GH:isidentical | ||||
* | bpo-42806: Fix ast locations of f-strings inside parentheses (GH-24067) | Pablo Galindo | 2021-01-03 | 1 | -0/+53 |
| | |||||
* | Fixed mistake in test for f-string error description (GH-22036) (GH-22059) | han-solo | 2020-09-02 | 1 | -1/+1 |
| | |||||
* | bpo-41681: Fix for `f-string/str.format` error description when using 2 `,` ↵ | han-solo | 2020-09-01 | 1 | -0/+20 |
| | | | | | | | in format specifier (GH-22036) * Fixed `f-string/str.format` error description when using two `,` in format specifier. Co-authored-by: millefalcon <hanish0019@hmail.com> | ||||
* | bpo-40275: Use new test.support helper submodules in tests (GH-21315) | Hai Shi | 2020-07-06 | 1 | -1/+1 |
| | |||||
* | bpo-41084: Adjust message when an f-string expression causes a SyntaxError ↵ | Lysandros Nikolaou | 2020-06-26 | 1 | -3/+7 |
| | | | | | (GH-21084) Prefix the error message with `fstring: `, when parsing an f-string expression throws a `SyntaxError`. | ||||
* | bpo-41069: Make TESTFN and the CWD for tests containing non-ascii ↵ | Serhiy Storchaka | 2020-06-25 | 1 | -2/+3 |
| | | | | characters. (GH-21035) | ||||
* | bpo-40939: Remove the old parser (GH-20768) | Pablo Galindo | 2020-06-11 | 1 | -2/+1 |
| | | | This commit removes the old parser, the deprecated parser module, the old parser compatibility flags and environment variables and all associated support code and documentation. | ||||
* | bpo-40904: Fix segfault in the new parser with f-string containing yield ↵ | Pablo Galindo | 2020-06-08 | 1 | -0/+2 |
| | | | | statements with no value (GH-20701) | ||||
* | 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(). |