summaryrefslogtreecommitdiffstats
path: root/Python
Commit message (Collapse)AuthorAgeFilesLines
* bpo-15088 : Remove PyGen_NeedsFinalizing() (GH-15702)Joannah Nanjekye2019-09-061-5/+0
| | | | | Remove PyGen_NeedsFinalizing(): it was not documented, tested or used anywhere within CPython after the implementation of PEP 442.
* bpo-37878: Remove PyThreadState_DeleteCurrent() function (GH-15315)Joannah Nanjekye2019-09-051-9/+3
| | | | | | | * Rename PyThreadState_DeleteCurrent() to _PyThreadState_DeleteCurrent() * Move it to the internal C API Co-Authored-By: Carol Willing <carolcode@willingconsulting.com>
* bpo-15999: Clean up of handling boolean arguments. (GH-15610)Serhiy Storchaka2019-09-012-15/+9
| | | | | | * Use the 'p' format unit instead of manually called PyObject_IsTrue(). * Pass boolean value instead 0/1 integers to functions that needs boolean. * Convert some arguments to boolean only once.
* bpo-37994: Fix silencing all errors if an attribute lookup fails. (GH-15630)Serhiy Storchaka2019-09-012-14/+8
| | | Only AttributeError should be silenced.
* Fix typos mostly in comments, docs and test names (GH-15209)Min ho Kim2019-08-302-3/+3
|
* bpo-37976: Prevent shadowing of TypeError in zip() (GH-15592)Sergey Fedoseev2019-08-301-4/+0
|
* bpo-37034: Display argument name on errors with keyword arguments with ↵Rémi Lapeyre2019-08-296-33/+27
| | | | Argument Clinic. (GH-13593)
* bpo-37947: Avoid double-decrement in symtable recursion counting (GH-15593)Nick Coghlan2019-08-291-4/+14
| | | | | | | | | With `symtable_visit_expr` now correctly adjusting the recursion depth for named expressions, `symtable_handle_namedexpr` should be leaving it alone. Also adds a new check to `PySymtable_BuildObject` that raises `SystemError` if a successful first symbol analysis pass fails to keep the stack depth accounting clean.
* bpo-23878: Remove an unneeded fseek() call in _Py_FindEnvConfigValue() ↵Zackery Spytz2019-08-281-1/+0
| | | | (GH-15424)
* Fix unused variable and signed/unsigned warnings (GH-15537)Raymond Hettinger2019-08-272-3/+3
|
* Make PyXXX_Fini() functions private (GH-15531)Victor Stinner2019-08-261-12/+12
| | | | | For example, rename PyTuple_Fini() to _PyTuple_Fini(). These functions are only declared in the internal C API.
* bpo-37954: Fix reference leak in the symtable (GH-15514)Pablo Galindo2019-08-261-1/+3
|
* bpo-37947: Adjust correctly the recursion level in symtable for named ↵Pablo Galindo2019-08-261-1/+3
| | | | expressions (GH-15499)
* bpo-37757: Disallow PEP 572 cases that expose implementation details (GH-15131)Nick Coghlan2019-08-251-24/+97
| | | | | | | | | | | | | | | - drop TargetScopeError in favour of raising SyntaxError directly as per the updated PEP 572 - comprehension iteration variables are explicitly local, but named expression targets in comprehensions are nonlocal or global. Raise SyntaxError as specified in PEP 572 - named expression targets in the outermost iterable of a comprehension have an ambiguous target scope. Avoid resolving that question now by raising SyntaxError. PEP 572 originally required this only for cases where the bound name conflicts with the iteration variable in the comprehension, but CPython can't easily restrict the exception to that case (as it doesn't know the target variable names when visiting the outermost iterator expression)
* bpo-34880: Add the LOAD_ASSERTION_ERROR opcode. (GH-15073)Zackery Spytz2019-08-256-2623/+2622
| | | | Fix assert statement misbehavior if AssertionError is shadowed.
* bpo-37942: Improve argument clinic float converter (GH-15470)Raymond Hettinger2019-08-252-6/+12
|
* bpo-37830: Fix compilation of break and continue in finally. (GH-15320)Serhiy Storchaka2019-08-244-180/+224
| | | | | | Fix compilation of "break" and "continue" in the "finally" block when the corresponding "try" block contains "return" with a non-constant value.
* bpo-29535: Remove promize about hash randomization of datetime objects. ↵Serhiy Storchaka2019-08-241-2/+2
| | | | (GH-15269)
* bpo-37549: os.dup() fails for standard streams on Windows 7 (GH-15389)Zackery Spytz2019-08-231-1/+8
|
* bpo-36763: PyConfig_Read() handles PySys_AddXOption() (GH-15431)Victor Stinner2019-08-232-30/+45
| | | | | | | | | | PyConfig_Read() is now responsible to handle early calls to PySys_AddXOption() and PySys_AddWarnOption(). Options added by PySys_AddXOption() are now handled the same way than PyConfig.xoptions and command line -X options. For example, PySys_AddXOption(L"faulthandler") enables faulthandler as expected.
* bpo-36763: Implement PyWideStringList_Insert() of PEP 587 (GH-15423)Victor Stinner2019-08-231-4/+25
|
* bpo-37926: Fix PySys_SetArgvEx(0, NULL, 0) crash (GH-15415)Victor Stinner2019-08-231-1/+1
| | | | | | | | | | empty_argv is no longer static in Python 3.8, but it is declared in a temporary scope, whereas argv keeps a reference to it. empty_argv memory (allocated on the stack) is reused by make_sys_argv() code which is inlined when using gcc -O3. Define empty_argv in PySys_SetArgvEx() body, to ensure that it remains valid for the whole lifetime of the PySys_SetArgvEx() call.
* bpo-37834: Normalise handling of reparse points on Windows (GH-15231)Steve Dower2019-08-211-1/+6
| | | | | | | | | | bpo-37834: Normalise handling of reparse points on Windows * ntpath.realpath() and nt.stat() will traverse all supported reparse points (previously was mixed) * nt.lstat() will let the OS traverse reparse points that are not name surrogates (previously would not traverse any reparse point) * nt.[l]stat() will only set S_IFLNK for symlinks (previous behaviour) * nt.readlink() will read destinations for symlinks and junction points only bpo-1311: os.path.exists('nul') now returns True on Windows * nt.stat('nul').st_mode is now S_IFCHR (previously was an error)
* bpo-37751: Fix codecs.lookup() normalization (GH-15092)Jordon Xu2019-08-211-16/+16
| | | | | Fix codecs.lookup() to normalize the encoding name the same way than encodings.normalize_encoding(), except that codecs.lookup() also converts the name to lower case.
* Delete stale comment in Python/getopt.c. (GH-14719)Hansraj Das2019-08-201-4/+0
|
* bpo-36266: Add module name in ImportError when DLL not found on Windows ↵shireenrao2019-08-171-4/+4
| | | | (GH-15180)
* bpo-37540: vectorcall: keyword names must be strings (GH-14682)Jeroen Demeyer2019-08-162-32/+12
| | | | | | | | The fact that keyword names are strings is now part of the vectorcall and `METH_FASTCALL` protocols. The biggest concrete change is that `_PyStack_UnpackDict` now checks that and raises `TypeError` if not. CC @markshannon @vstinner https://bugs.python.org/issue37540
* bpo-32912: Revert SyntaxWarning on invalid escape sequences. (GH-15195)Gregory P. Smith2019-08-101-3/+3
| | | | | | | | | | | | | | | | | | 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
* bpo-37685: Fixed __eq__, __lt__ etc implementations in some classes. (GH-14952)Serhiy Storchaka2019-08-081-1102/+1104
| | | | They now return NotImplemented for unsupported type of the other operand.
* bpo-18049: Define THREAD_STACK_SIZE for AIX to pass default recursion limit ↵Michael Felt2019-08-031-0/+4
| | | | | | test (GH-15081) * Define THREAD_STACK_SIZE for AIX to pass default recursion limit test
* bpo-37444: Update differing exception between builtins and importlib (GH-14869)Ngalim Siregar2019-08-032-97/+97
| | | | | | | | | | Imports now raise `TypeError` instead of `ValueError` for relative import failures. This makes things consistent between `builtins.__import__` and `importlib.__import__` as well as using a more natural import for the failure. https://bugs.python.org/issue37444 Automerge-Triggered-By: @brettcannon
* bpo-18049: Sync thread stack size to main thread size on macOS (GH-14748)Ronald Oussoren2019-08-011-1/+2
| | | | | | This changeset increases the default size of the stack for threads on macOS to the size of the stack of the main thread and reenables the relevant recursion test.
* Fix typos in comments, docs and test names (#15018)Min ho Kim2019-07-309-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | * Fix typos in comments, docs and test names * Update test_pyparse.py account for change in string length * Apply suggestion: splitable -> splittable Co-Authored-By: Terry Jan Reedy <tjreedy@udel.edu> * Apply suggestion: splitable -> splittable Co-Authored-By: Terry Jan Reedy <tjreedy@udel.edu> * Apply suggestion: Dealloccte -> Deallocate Co-Authored-By: Terry Jan Reedy <tjreedy@udel.edu> * Update posixmodule checksum. * Reverse idlelib changes.
* bpo-37697: Sync with importlib_metadata 0.19 (#14993)Jason R. Coombs2019-07-281-779/+796
| | | | | | | | * bpo-37697: Sync with importlib_metadata 0.19 * Run make regen-importlib * 📜🤖 Added by blurb_it.
* Fix typos in docs, comments and test assert messages (#14872)Min ho Kim2019-07-211-1/+1
|
* Adjust builtins.zip() docstring to better communicate its signature (GH-14833)Sergey Fedoseev2019-07-181-1/+1
|
* bpo-37500: Make sure dead code does not generate bytecode but also detect ↵Pablo Galindo2019-07-151-5/+64
| | | | | | | | | | | | syntax errors (GH-14612) https://bugs.python.org/issue37500 Add a new field to the compiler structure that allows to be configured so no bytecode is emitted. In this way is possible to detect errors by walking the nodes while preserving optimizations. https://bugs.python.org/issue37500
* bpo-37593: Swap the positions of posonlyargs and args in the constructor of ↵Pablo Galindo2019-07-143-145/+145
| | | | | ast.parameters nodes (GH-14778) https://bugs.python.org/issue37593
* bpo-28269: Replace strcasecmp with system function _stricmp. (GH-13095)Minmin Gong2019-07-131-19/+1
|
* bpo-29548: no longer use PyEval_Call* functions (GH-14683)Jeroen Demeyer2019-07-111-2/+2
|
* bpo-37547: add _PyObject_CallMethodOneArg (GH-14685)Jeroen Demeyer2019-07-115-14/+10
|
* bpo-18374: fix wrong col_offset of some ast.BinOp instances (GH-14607)Carl Friedrich Bolz-Tereick2019-07-081-1/+1
| | | | | Nested BinOp instances (e.g. a+b+c) had a wrong col_offset for the second BinOp (e.g. 2 instead of 0 in the example). Fix it by using the correct st node to copy the line and col_offset from in ast.c.
* bpo-37337: Add _PyObject_CallMethodNoArgs() (GH-14267)Jeroen Demeyer2019-07-086-18/+18
|
* bpo-36974: separate vectorcall functions for each calling convention (GH-13781)Jeroen Demeyer2019-07-051-4/+4
|
* bpo-37483: fix reference leak in _PyCodec_Lookup (GH-14600)Jeroen Demeyer2019-07-051-13/+14
|
* bpo-37483: add _PyObject_CallOneArg() function (#14558)Jeroen Demeyer2019-07-046-26/+15
|
* bpo-37484: use _PyObject_Vectorcall for __exit__ (GH-14557)Jeroen Demeyer2019-07-031-5/+3
|
* bpo-36763: Add PyConfig_SetWideStringList() (GH-14444)Victor Stinner2019-07-011-1/+18
|
* bpo-37467: Fix PyErr_Display() for bytes filename (GH-14504)Victor Stinner2019-07-011-1/+1
| | | | | | | | | | | | | | Fix sys.excepthook() and PyErr_Display() if a filename is a bytes string. For example, for a SyntaxError exception where the filename attribute is a bytes string. Cleanup also test_sys: * Sort imports. * Rename numruns global var to INTERN_NUMRUNS. * Add DisplayHookTest and ExceptHookTest test case classes. * Don't save/restore sys.stdout and sys.displayhook using setUp()/tearDown(): do it in each test method. * Test error case (call hook with no argument) after the success case.
* bpo-37221: Add PyCode_NewWithPosOnlyArgs to be used internally and set ↵Pablo Galindo2019-07-012-8/+6
| | | | | | PyCode_New as a compatibility wrapper (GH-13959) Add PyCode_NewEx to be used internally and set PyCode_New as a compatibility wrapper