Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Uncomment one grammar test (#118361) | Nikita Sobolev | 2024-04-29 | 1 | -1/+1 |
| | |||||
* | gh-88943: Improve syntax error for non-ASCII character that follows a ↵ | Serhiy Storchaka | 2023-09-07 | 1 | -0/+4 |
| | | | | | numerical literal (GH-109081) It now points on the invalid non-ASCII character, not on the valid numerical literal. | ||||
* | gh-108983: Add more PEP 526 tests to `test_grammar` (#108984) | Nikita Sobolev | 2023-09-06 | 1 | -0/+11 |
| | |||||
* | gh-108303: Move `ann_module*.py` files to `typinganndata/` folder (#108354) | Nikita Sobolev | 2023-08-23 | 1 | -3/+3 |
| | |||||
* | gh-103492: Clarify SyntaxWarning with literal comparison (#103493) | Shantanu | 2023-04-24 | 1 | -11/+20 |
| | |||||
* | gh-102515: Remove unused imports in the `Lib/` directory (#102516) | Alex Waygood | 2023-03-08 | 1 | -2/+0 |
| | |||||
* | gh-99535: Add test for inheritance of annotations and update documentation ↵ | MonadChains | 2022-12-24 | 1 | -0/+22 |
| | | | | (#99990) | ||||
* | Fix links to old SF bugs (#95648) | Serhiy Storchaka | 2022-08-04 | 1 | -1/+1 |
| | |||||
* | gh-87999: Change warning type for numeric literal followed by keyword (GH-91980) | Serhiy Storchaka | 2022-04-27 | 1 | -8/+17 |
| | | | | | The warning emitted by the Python parser for a numeric literal immediately followed by keyword has been changed from deprecation warning to syntax warning. | ||||
* | bpo-46820: Refactor tests for ambiguous end of numerical literal (GH-31494) | Serhiy Storchaka | 2022-02-25 | 1 | -89/+25 |
| | |||||
* | bpo-46725: Document starred expressions in for statements (GH-31481) | Pablo Galindo Salgado | 2022-02-22 | 1 | -0/+6 |
| | | | Automerge-Triggered-By: GH:pablogsal | ||||
* | bpo-46820: Fix a SyntaxError in a numeric literal followed by "not in" ↵ | Serhiy Storchaka | 2022-02-22 | 1 | -0/+9 |
| | | | | | | | (GH-31479) Fix parsing a numeric literal immediately (without spaces) followed by "not in" keywords, like in "1not in x". Now the parser only emits a warning, not a syntax error. | ||||
* | bpo-45292: [PEP-654] add except* (GH-29581) | Irit Katriel | 2021-12-14 | 1 | -0/+24 |
| | |||||
* | bpo-44490: Improve typing module compatibility with types.Union (GH-27048) | Yurii Karabas | 2021-07-17 | 1 | -1/+1 |
| | |||||
* | bpo-43833: Emit warnings for numeric literals followed by keyword (GH-25466) | Serhiy Storchaka | 2021-06-08 | 1 | -2/+90 |
| | | | | | | | | Emit a deprecation warning if the numeric literal is immediately followed by one of keywords: and, else, for, if, in, is, or. Raise a syntax error with more informative message if it is immediately followed by other keyword or identifier. Automerge-Triggered-By: GH:pablogsal | ||||
* | bpo-43995: Fix reference leak in test_grammar (GH-25764) | Erlend Egeberg Aasland | 2021-04-30 | 1 | -4/+5 |
| | |||||
* | bpo-43901: Lazy-create an empty annotations dict in all unannotated user ↵ | larryhastings | 2021-04-30 | 1 | -2/+1 |
| | | | | | classes and modules (#25623) Change class and module objects to lazy-create empty annotations dicts on demand. The annotations dicts are stored in the object's `__dict__` for backwards compatibility. | ||||
* | bpo-38605: Revert making 'from __future__ import annotations' the default ↵ | Pablo Galindo | 2021-04-21 | 1 | -25/+31 |
| | | | | | | (GH-25490) This reverts commits 044a1048ca93d466965afc027b91a5a9eb9ce23c and 1be456ae9d53bb1cba2b24fc86175c282d1c2169, adapting the code to changes that happened after it. | ||||
* | bpo-43497: Emit SyntaxWarnings for assertions with tuple constants. (GH-24867) | tsukasa-au | 2021-03-16 | 1 | -2/+28 |
| | | | | | | | | | | | | | | | | | | | * bpo-43497: Emit SyntaxWarnings for assertions with tuple constants. Add a test that shows that a tuple constant (a tuple, where all of its members are also compile-time constants) produces a SyntaxWarning. Then fix this failure. * Make SyntaxWarnings also work when "optimized". * Split tests for SyntaxWarning to SyntaxError conversion SyntaxWarnings emitted by the compiler when configured to be errors are actually raised as SyntaxError exceptions. Move these tests into their own method and add a test to ensure they are raised. Previously we only tested that they were not raised for a "valid" assertion statement. | ||||
* | bpo-42864: Improve error messages regarding unclosed parentheses (GH-24161) | Pablo Galindo | 2021-01-19 | 1 | -1/+1 |
| | |||||
* | bpo-38605: Make 'from __future__ import annotations' the default (GH-20434) | Batuhan Taskaya | 2020-10-06 | 1 | -31/+25 |
| | | | | | The hard part was making all the tests pass; there are some subtle issues here, because apparently the future import wasn't tested very thoroughly in previous Python versions. For example, `inspect.signature()` returned type objects normally (except for forward references), but strings with the future import. We changed it to try and return type objects by calling `typing.get_type_hints()`, but fall back on returning strings if that function fails (which it may do if there are future references in the annotations that require passing in a specific namespace to resolve). | ||||
* | bpo-41334: Convert constructors of str, bytes and bytearray to Argument ↵ | Serhiy Storchaka | 2020-07-20 | 1 | -6/+8 |
| | | | | Clinic (GH-21535) | ||||
* | bpo-40275: Use new test.support helper submodules in tests (GH-21169) | Hai Shi | 2020-06-30 | 1 | -2/+4 |
| | |||||
* | bpo-40939: Remove the old parser (GH-20768) | Pablo Galindo | 2020-06-11 | 1 | -63/+47 |
| | | | 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-40618: Disallow invalid targets in augassign and except clauses (GH-20083) | Lysandros Nikolaou | 2020-05-14 | 1 | -1/+4 |
| | | | | | | | | | This commit fixes the new parser to disallow invalid targets in the following scenarios: - Augmented assignments must only accept a single target (Name, Attribute or Subscript), but no tuples or lists. - `except` clauses should only accept a single `Name` as a target. Co-authored-by: Pablo Galindo <Pablogsal@gmail.com> | ||||
* | bpo-40334: produce specialized errors for invalid del targets (GH-19911) | Shantanu | 2020-05-11 | 1 | -0/+17 |
| | |||||
* | bpo-40334: Allow trailing comma in parenthesised context managers (GH-19964) | Pablo Galindo | 2020-05-06 | 1 | -1/+65 |
| | |||||
* | bpo-39702: Relax grammar restrictions on decorators (PEP 614) (GH-18570) | Brandt Bucher | 2020-03-03 | 1 | -2/+30 |
| | |||||
* | bpo-37830: Fix compilation of break and continue in finally. (GH-15320) | Serhiy Storchaka | 2019-08-24 | 1 | -0/+54 |
| | | | | | | Fix compilation of "break" and "continue" in the "finally" block when the corresponding "try" block contains "return" with a non-constant value. | ||||
* | bpo-35814: Allow unpacking in r.h.s of annotated assignment expressions ↵ | Pablo Galindo | 2019-06-03 | 1 | -0/+4 |
| | | | | (GH-13760) | ||||
* | bpo-37115: Support annotations in positional-only arguments (GH-13698) | Pablo Galindo | 2019-05-31 | 1 | -0/+13 |
| | |||||
* | bpo-35798: Add test.support.check_syntax_warning(). (#11895) | Serhiy Storchaka | 2019-02-19 | 1 | -22/+10 |
| | | | | | | | 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-15248: Emit a compiler warning when missed a comma before tuple or list. ↵ | Serhiy Storchaka | 2019-02-16 | 1 | -0/+87 |
| | | | | (GH-11757) | ||||
* | bpo-35814: Allow same r.h.s. in annotated assignments as in normal ones ↵ | Ivan Levkivskyi | 2019-01-25 | 1 | -0/+9 |
| | | | | | | (GH-11667) | ||||
* | bpo-34850: Emit a warning for "is" and "is not" with a literal. (GH-9642) | Serhiy Storchaka | 2019-01-18 | 1 | -6/+30 |
| | |||||
* | bpo-35029: Replace the SyntaxWarning exception with a SyntaxError. (GH-9999) | Serhiy Storchaka | 2018-10-21 | 1 | -0/+9 |
| | | | | If SyntaxWarning was raised as an exception, it will be replaced with a SyntaxError for better error reporting. | ||||
* | Use assertEqual() instead of assertEquals(). (GH-9721) | Serhiy Storchaka | 2018-10-05 | 1 | -1/+1 |
| | | | Fixes warnings in tests added in bpo-32117 and bpo-34603. | ||||
* | bpo-32117: Allow tuple unpacking in return and yield statements (gh-4509) | David Cuthbert | 2018-09-22 | 1 | -1/+10 |
| | | | | | Iterable unpacking is now allowed without parentheses in yield and return statements, e.g. ``yield 1, 2, 3, *rest``. Thanks to David Cuthbert for the change and jChapman for added tests. | ||||
* | bpo-33305: Improve SyntaxError for invalid numerical literals. (GH-6517) | Serhiy Storchaka | 2018-07-09 | 1 | -0/+24 |
| | |||||
* | bpo-32489: Allow 'continue' in 'finally' clause. (GH-5822) | Serhiy Storchaka | 2018-03-18 | 1 | -0/+53 |
| | |||||
* | bpo-10544: Disallow "yield" in comprehensions and generator expressions. ↵ | Serhiy Storchaka | 2018-02-04 | 1 | -9/+3 |
| | | | | (GH-4564) | ||||
* | bpo-32482: Fix suspicious code in tests for syntax and grammar. (#5086) | Serhiy Storchaka | 2018-01-04 | 1 | -6/+5 |
| | |||||
* | bpo-32478: Add tests for 'break' and 'return' inside 'finally' clause. (#5078) | Serhiy Storchaka | 2018-01-02 | 1 | -0/+74 |
| | |||||
* | bpo-10544: Deprecate "yield" in comprehensions and generator expressions. ↵ | Serhiy Storchaka | 2017-12-01 | 1 | -0/+35 |
| | | | | | | | | | | | | | | (GH-4579) The current behaviour of yield expressions inside comprehensions and generator expressions is essentially an accident of implementation - it arises implicitly from the way the compiler handles yield expressions inside nested functions and generators. Since the current behaviour wasn't deliberately designed, and is inherently confusing, we're deprecating it, with no current plans to reintroduce it. Instead, our advice will be to use a named nested generator definition for cases where this behaviour is desired. | ||||
* | issue #28622: Remove redundant variable annotation test from test_grammar. ↵ | Guido van Rossum | 2016-11-07 | 1 | -3/+0 |
| | | | | Ivan L. | ||||
* | Issue #26182: Raise DeprecationWarning for improper use of async/await keywords | Yury Selivanov | 2016-09-15 | 1 | -12/+0 |
| | |||||
* | Issue #28076: Variable annotations should be mangled for private names. | Guido van Rossum | 2016-09-11 | 1 | -2/+2 |
| | | | | By Ivan Levkivskyi. | ||||
* | Issue #26331: Implement the parsing part of PEP 515. | Brett Cannon | 2016-09-09 | 1 | -0/+89 |
| | | | | Thanks to Georg Brandl for the patch. | ||||
* | Issue #27985: Implement PEP 526 -- Syntax for Variable Annotations. | Yury Selivanov | 2016-09-09 | 1 | -0/+178 |
| | | | | Patch by Ivan Levkivskyi. | ||||
* | Issue #27095: Simplified MAKE_FUNCTION and removed MAKE_CLOSURE opcodes. | Serhiy Storchaka | 2016-06-12 | 1 | -1/+1 |
| | | | | Patch by Demur Rumed. |