Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | bpo-40489: Add test case for dict contain use after free (GH-19906) | Dong-hee Na | 2020-05-04 | 1 | -0/+13 |
| | |||||
* | bpo-40135: Fix multiprocessing test_shared_memory_across_processes() (GH-19892) | Hai Shi | 2020-05-04 | 1 | -1/+3 |
| | | | | Don't define shared memory block's name in test_shared_memory_across_processes(): use SharedMemory(create=True) instead. | ||||
* | bpo-40455: Remove gcc10 warning about x_digits (#19852) | Dong-hee Na | 2020-05-04 | 1 | -4/+3 |
| | | | | | | | * bpo-40455: Remove gcc10 warning about x_digits * bpo-40455: nit * bpo-40455: fix logic error | ||||
* | bpo-39573: Use Py_IS_TYPE to check for types (GH-19882) | Hai Shi | 2020-05-04 | 2 | -3/+3 |
| | |||||
* | bpo-40246: Revert reporting of invalid string prefixes (GH-19888) | Lysandros Nikolaou | 2020-05-04 | 6 | -12/+2 |
| | | | | 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-40334: Spacialized error message for invalid args after bare '*' (GH-19865) | Lysandros Nikolaou | 2020-05-04 | 5 | -210/+472 |
| | | | When parsing things like `def f(*): pass` the old parser used to output `SyntaxError: named arguments must follow bare *`, which the new parser wasn't able to do. | ||||
* | bpo-40491: Fix typo in syntax error for numeric literals (GH-19893) | Shantanu | 2020-05-04 | 1 | -1/+1 |
| | |||||
* | bpo-40408: Fix support of nested type variables in GenericAlias. (GH-19836) | Serhiy Storchaka | 2020-05-04 | 3 | -26/+140 |
| | |||||
* | bpo-40493: fix function type comment parsing (GH-19894) | Shantanu | 2020-05-04 | 3 | -0/+78 |
| | | | | | The grammar for func_type_input rejected things like `(*t1) ->t2`. This fixes that. Automerge-Triggered-By: @gvanrossum | ||||
* | Clean up unused imports for the peg generator module (GH-19891) | Anthony Shaw | 2020-05-04 | 9 | -17/+4 |
| | |||||
* | bpo-40334: Set error_indicator in _PyPegen_raise_error (GH-19887) | Lysandros Nikolaou | 2020-05-04 | 1 | -0/+1 |
| | | | Due to PyErr_Occurred not being called at the beginning of each rule, we need to set the error indicator, so that rules do not get expanded after an exception has been thrown | ||||
* | Remove outdated and confusing advice about setting maxsize (GH-19889) | Raymond Hettinger | 2020-05-03 | 1 | -2/+1 |
| | |||||
* | Remove out-of-date comment (GH-19886) | Raymond Hettinger | 2020-05-03 | 1 | -2/+1 |
| | |||||
* | bpo-38870: Don't start generated output with newlines in ast.unparse (GH-19636) | Batuhan Taskaya | 2020-05-03 | 2 | -11/+15 |
| | |||||
* | Simplify set entry insertion logic. (GH-19881) | Raymond Hettinger | 2020-05-03 | 1 | -16/+2 |
| | |||||
* | bpo-29587: allow chaining NULL exceptions in _gen_throw() (GH-19877) | Chris Jerdonek | 2020-05-03 | 2 | -4/+25 |
| | | | | | | | | | | | | | This is a follow-up to GH-19823 that removes the check that the exception value isn't NULL, prior to calling _PyErr_ChainExceptions(). This enables implicit exception chaining for gen.throw() in more circumstances. The commit also adds a test that a particular code snippet involving gen.throw() doesn't crash. The test shows why the new `gi_exc_state.exc_type != Py_None` check that was added is necessary. Without the new check, the code snippet (as well as a number of other tests) crashes on certain platforms (e.g. Fedora but not Mac). | ||||
* | Minor code cleanups for statistics (GH-19873) | Raymond Hettinger | 2020-05-03 | 1 | -76/+7 |
| | | | | | * Minor cleanups: Removed unused code. Move C import near its Python version. * Clean-up whitespace | ||||
* | Fix missing space in docs(GH-19866) | Mathieu Dupuy | 2020-05-02 | 1 | -1/+1 |
| | |||||
* | bpo-40465: Deprecate the optional argument to random.shuffle(). (#19867) | Raymond Hettinger | 2020-05-02 | 4 | -1/+10 |
| | |||||
* | bpo-40419: timeit CLI docs now mention 1,2,5,10,... trials instead of powers ↵ | Sander | 2020-05-02 | 2 | -2/+4 |
| | | | | of 10 (GH-19752) | ||||
* | Call $(MKDIR_P) before regenerating the PEG meta-parser (GH-19861) | Pablo Galindo | 2020-05-02 | 1 | -0/+1 |
| | |||||
* | bpo-39435: Make the first argument of pickle.loads() positional-only. (GH-19846) | Serhiy Storchaka | 2020-05-02 | 5 | -7/+9 |
| | | | | It was positional-only de facto: documentation and two implementations used three different name. | ||||
* | bpo-40334: regenerate metaparser as part of regen-all (GH-19854) | Pablo Galindo | 2020-05-02 | 2 | -3/+12 |
| | |||||
* | Fix some scripts in the peg generator folder (GH-19853) | Pablo Galindo | 2020-05-02 | 10 | -31/+16064 |
| | |||||
* | bpo-29587: Update gen.throw() to chain exceptions (#19823) | Chris Jerdonek | 2020-05-02 | 3 | -0/+27 |
| | | | | | | | Before this commit, if an exception was active inside a generator when calling gen.throw(), that exception was lost (i.e. there was no implicit exception chaining). This commit fixes that by setting exc.__context__ when calling gen.throw(exc). | ||||
* | bpo-40417: Fix deprecation warning in PyImport_ReloadModule (GH-19750) | Robert Rouhani | 2020-05-01 | 2 | -7/+8 |
| | | | | | I can add another commit with the new test case I wrote to verify that the warning was being printed before my change, stopped printing after my change, and that the function does not return null after my change. Automerge-Triggered-By: @brettcannon | ||||
* | bpo-40334: use the TOKENS file when checking dangling rules (GH-19849) | Pablo Galindo | 2020-05-01 | 5 | -15/+31 |
| | |||||
* | Fix the Tools/peg_generator/scripts/benchmark.py script (GH-19848) | Pablo Galindo | 2020-05-01 | 2 | -3/+4 |
| | |||||
* | bpo-39435: Fix docs for pickle.loads (GH-18160) | Shantanu | 2020-05-01 | 3 | -2/+4 |
| | |||||
* | bpo-40412: Nullify inittab_copy during finalization (GH-19746) | Gregory Szorc | 2020-05-01 | 2 | -0/+2 |
| | | | | | | | | | Otherwise we leave a dangling pointer to free'd memory. If we then initialize a new interpreter in the same process and call PyImport_ExtendInittab, we will (likely) crash when calling PyMem_RawRealloc(inittab_copy, ...) since the pointer address is bogus. Automerge-Triggered-By: @brettcannon | ||||
* | bpo-39691: Clarify io.open_code behavior (GH-19824) | Shantanu | 2020-05-01 | 1 | -4/+5 |
| | |||||
* | Simplify choice()'s interaction with the private _randbelow() method (GH-19831) | Raymond Hettinger | 2020-05-01 | 2 | -12/+8 |
| | |||||
* | bpo-40334: Make the PyPegen* and PyParser* APIs more consistent (GH-19839) | Lysandros Nikolaou | 2020-05-01 | 3 | -106/+36 |
| | | | | | | | | | This commit makes both APIs more consistent by doing the following: - Remove the `PyPegen_CodeObjectFrom*` functions, which weren't used and will probably not be needed. Functions like `Py_CompileStringObject` can be used instead. - Include a `const char *filename` parameter in `PyPegen_ASTFromString`. - Rename `PyPegen_ASTFromFile` to `PyPegen_ASTFromFilename`, because its signature is not the same with `PyParser_ASTFromFile`. | ||||
* | Ensure that tok->type_comments is set on every path (GH-19828) | Guido van Rossum | 2020-05-01 | 1 | -3/+2 |
| | |||||
* | bpo-40334: Refactor lambda_parameters similar to parameters (GH-19830) | Guido van Rossum | 2020-05-01 | 2 | -1065/+1167 |
| | |||||
* | bpo-40334: Correct return value of func_type_comment (GH-19833) | Pablo Galindo | 2020-05-01 | 2 | -4/+4 |
| | |||||
* | bpo-40334: unskip test_function_type in test_unparse with the new parser ↵ | Pablo Galindo | 2020-05-01 | 1 | -1/+0 |
| | | | | (GH-19837) | ||||
* | bpo-40334: Improve column offsets for thrown syntax errors by Pegen (GH-19782) | Batuhan Taskaya | 2020-05-01 | 6 | -111/+79 |
| | |||||
* | bpo-40462: fix variable and function names (GH-19832) | Furkan Önder | 2020-05-01 | 3 | -4/+2 |
| | | | Automerge-Triggered-By: @vstinner | ||||
* | bpo-32494: Use gdbm_count for dbm_length if possible (GH-19814) | Dong-hee Na | 2020-05-01 | 2 | -5/+27 |
| | |||||
* | bpo-40334: Simplify type handling in the PEG c_generator (GH-19818) | Pablo Galindo | 2020-05-01 | 3 | -401/+391 |
| | |||||
* | bpo-40453: Add PyConfig._isolated_subinterpreter (GH-19820) | Victor Stinner | 2020-05-01 | 14 | -12/+68 |
| | | | | | | | | | An isolated subinterpreter cannot spawn threads, spawn a child process or call os.fork(). * Add private _Py_NewInterpreter(isolated_subinterpreter) function. * Add isolated=True keyword-only parameter to _xxsubinterpreters.create(). * Allow again os.fork() in "non-isolated" subinterpreters. | ||||
* | Change 'exception happened' to 'exception occurred' in two places (#19767) | Noah Doersing | 2020-05-01 | 2 | -2/+2 |
| | |||||
* | bpo-40334: Add support for feature_version in new PEG parser (GH-19827) | Lysandros Nikolaou | 2020-05-01 | 6 | -834/+1379 |
| | | | | | | | | | | | | | | | | | | | `ast.parse` and `compile` support a `feature_version` parameter that tells the parser to parse the input string, as if it were written in an older Python version. The `feature_version` is propagated to the tokenizer, which uses it to handle the three different stages of support for `async` and `await`. Additionally, it disallows the following at parser level: - The '@' operator in < 3.5 - Async functions in < 3.5 - Async comprehensions in < 3.6 - Underscores in numeric literals in < 3.6 - Await expression in < 3.5 - Variable annotations in < 3.6 - Async for-loops in < 3.5 - Async with-statements in < 3.5 - F-strings in < 3.6 Closes we-like-parsers/cpython#124. | ||||
* | bpo-40443: Remove unused imports in stdlib (GH-19815) | Victor Stinner | 2020-05-01 | 3 | -4/+2 |
| | |||||
* | bpo-40275: Fix name error in support.socket_helper (GH-19825) | Victor Stinner | 2020-05-01 | 1 | -4/+6 |
| | | | | | Replace TestFailed with support.TestFailed. Bug spotted by pyflakes. | ||||
* | Remove dead code in test__xxsubinterpreters (GH-19826) | Victor Stinner | 2020-05-01 | 1 | -20/+0 |
| | |||||
* | bpo-1635741: Fix compiler warning in _stat.c (GH-19822) | Victor Stinner | 2020-04-30 | 1 | -1/+1 |
| | | | Cast Py_ARRAY_LENGTH() size_t to int explicitly. | ||||
* | Revert "bpo-29587: Enable implicit exception chaining with gen.throw() ↵ | Victor Stinner | 2020-04-30 | 3 | -24/+0 |
| | | | | | (GH-19811)" (#19821) This reverts commit 2514a632fb7d37be24c2059d0e286d35600f9795. | ||||
* | bpo-29587: Enable implicit exception chaining with gen.throw() (GH-19811) | Chris Jerdonek | 2020-04-30 | 3 | -0/+24 |
| | | | | | Before this commit, if an exception was active inside a generator when calling gen.throw(), then that exception was lost (i.e. there was no implicit exception chaining). This commit fixes that. |