summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_positional_only_arg.py
Commit message (Collapse)AuthorAgeFilesLines
* gh-91210: Improve error message when non-default param follows default ↵Lysandros Nikolaou2022-09-171-11/+15
| | | | | | (GH-95933) - Improve error message when parameter without a default follows one with a default - Show same error message when positional-only params precede the default/non-default sequence
* bpo-38605: Revert making 'from __future__ import annotations' the default ↵Pablo Galindo2021-04-211-3/+14
| | | | | | (GH-25490) This reverts commits 044a1048ca93d466965afc027b91a5a9eb9ce23c and 1be456ae9d53bb1cba2b24fc86175c282d1c2169, adapting the code to changes that happened after it.
* bpo-38605: Make 'from __future__ import annotations' the default (GH-20434)Batuhan Taskaya2020-10-061-14/+3
| | | | | 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).
* Raise specialised syntax error for invalid lambda parameters (GH-20776)Pablo Galindo2020-06-101-18/+12
|
* bpo-40443: Remove unused imports in tests (GH-19805)Victor Stinner2020-04-291-1/+0
|
* bpo-40334: Rename PyConfig.use_peg to _use_peg_parser (GH-19670)Victor Stinner2020-04-231-4/+4
| | | | | | | | | | | * 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-11/+18
| | | | Co-authored-by: Guido van Rossum <guido@python.org> Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
* bpo-39156: Break up COMPARE_OP into four logically distinct opcodes. (GH-17754)Mark Shannon2020-01-141-3/+3
| | | | | | | | Break up COMPARE_OP into four logically distinct opcodes: * COMPARE_OP for rich comparisons * IS_OP for 'is' and 'is not' tests * CONTAINS_OP for 'in' and 'is not' tests * JUMP_IF_NOT_EXC_MATCH for checking exceptions in 'try-except' statements.
* Organise and clean test_positional_only_arg and add more tests (GH-17842)Pablo Galindo2020-01-051-14/+23
|
* Fix constant folding optimization for positional only arguments (GH-17837)Anthony Sottile2020-01-051-0/+12
|
* Fix SystemError when nested function has annotation on positional-only ↵Anthony Sottile2020-01-051-0/+7
| | | | argument (GH-17826)
* bpo-37122: Make co->co_argcount represent the total number of positonal ↵Pablo Galindo2019-06-011-2/+2
| | | | arguments in the code object (GH-13726)
* bpo-37108: Support super with methods that use positional-only arguments ↵Pablo Galindo2019-05-311-0/+14
| | | | (GH-13695)
* bpo-36540: PEP 570 -- Implementation (GH-12701)Pablo Galindo2019-04-291-0/+403
This commit contains the implementation of PEP570: Python positional-only parameters. * Update Grammar/Grammar with new typedarglist and varargslist * Regenerate grammar files * Update and regenerate AST related files * Update code object * Update marshal.c * Update compiler and symtable * Regenerate importlib files * Update callable objects * Implement positional-only args logic in ceval.c * Regenerate frozen data * Update standard library to account for positional-only args * Add test file for positional-only args * Update other test files to account for positional-only args * Add News entry * Update inspect module and related tests