summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_string_literals.py
Commit message (Collapse)AuthorAgeFilesLines
* bpo-40939: Remove the old parser (GH-20768)Pablo Galindo2020-06-111-5/+2
| | | 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-40334: Fix error location upon parsing an invalid string literal (GH-19962)Lysandros Nikolaou2020-05-071-4/+3
| | | | | | | When parsing a string with an invalid escape, the old parser used to point to the beginning of the invalid string. This commit changes the new parser to match that behaviour, since it's currently pointing to the end of the string (or to be more precise, to the beginning of the next token).
* bpo-40443: Remove unused imports in tests (GH-19805)Victor Stinner2020-04-291-1/+1
|
* bpo-40334: Rename PyConfig.use_peg to _use_peg_parser (GH-19670)Victor Stinner2020-04-231-6/+5
| | | | | | | | | | | * 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 Galindo2020-04-221-4/+8
| | | | Co-authored-by: Guido van Rossum <guido@python.org> Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
* bpo-32912: Revert SyntaxWarning on invalid escape sequences. (GH-15195)Gregory P. Smith2019-08-101-4/+33
| | | | | | | | | | | | | | | | | | 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
* Remove unused imports in tests (GH-14518)Victor Stinner2019-07-011-1/+0
|
* bpo-35798: Add test.support.check_syntax_warning(). (#11895)Serhiy Storchaka2019-02-191-30/+4
| | | | | | | It checks that a SyntaxWarning is raised when compile specified statement, that it is raised only once, that it is converted to a SyntaxError when raised as exception, and that both warning and exception objects have corresponding attributes.
* bpo-16806: Fix `lineno` and `col_offset` for multi-line string tokens (GH-10021)Anthony Sottile2019-01-131-4/+4
|
* bpo-32912: Replace a DeprecationWarning with a SyntaxWarning (GH-9652)Serhiy Storchaka2018-10-191-6/+6
| | | | for invalid escape sequences in string and bytes literals.
* Fix warn_invalid_escape_sequence()Victor Stinner2016-11-151-0/+20
| | | | | | | | Issue #28691: Fix warn_invalid_escape_sequence(): handle correctly DeprecationWarning raised as an exception. First clear the current exception to replace the DeprecationWarning exception with a SyntaxError exception. Unit test written by Serhiy Storchaka.
* Issue 28128: Print out better error/warning messages for invalid string ↵Eric V. Smith2016-10-311-0/+27
| | | | escapes. Backport to 3.6.
* Rename test_strlit -> test_string_literalsZachary Ware2016-09-091-0/+202