summaryrefslogtreecommitdiffstats
path: root/PC
Commit message (Collapse)AuthorAgeFilesLines
* bpo-32587: Fixes unsafe downcast in PC/winreg.c (GH-15766)Steve Dower2019-09-091-1/+1
|
* bpo-37705: Improve the implementation of winerror_to_errno() (GH-15623)Zackery Spytz2019-09-092-109/+137
| | | | | winerror_to_errno() is no longer automatically generated. Do not rely on the old _dosmapperr() function. Add ERROR_NO_UNICODE_TRANSLATION (1113) -> EILSEQ.
* bpo-32587: Make winreg.REG_MULTI_SZ support zero-length strings (#13239)Zackery Spytz2019-09-091-16/+25
| | | | | | * bpo-32587: Make winreg.REG_MULTI_SZ support PendingFileRenameOperations * Address review comments.
* bpo-37445: Include FORMAT_MESSAGE_IGNORE_INSERTS in FormatMessageW() calls ↵Zackery Spytz2019-09-091-1/+2
| | | | | (GH-14462) If FormatMessageW() is passed the FORMAT_MESSAGE_FROM_SYSTEM flag without FORMAT_MESSAGE_IGNORE_INSERTS, it will fail if there are insert sequences in the message definition.
* bpo-37034: Display argument name on errors with keyword arguments with ↵Rémi Lapeyre2019-08-292-9/+9
| | | | Argument Clinic. (GH-13593)
* bpo-37757: Disallow PEP 572 cases that expose implementation details (GH-15131)Nick Coghlan2019-08-251-1/+0
| | | | | | | | | | | | | | | - 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-37830: Fix compilation of break and continue in finally. (GH-15320)Serhiy Storchaka2019-08-241-1/+1
| | | | | | Fix compilation of "break" and "continue" in the "finally" block when the corresponding "try" block contains "return" with a non-constant value.
* bpo-37798: Add C fastpath for statistics.NormalDist.inv_cdf() (GH-15266)Dong-hee Na2019-08-231-0/+2
|
* bpo-27961: Remove leftovers from the times when long long wasn't required ↵Sergey Fedoseev2019-08-221-1/+1
| | | | (GH-15388)
* Remove versioned executables from non-APPX packages (GH-15237)Steve Dower2019-08-121-3/+0
|
* bpo-37734: Remove unnecessary brace escapes in PC/layout script (GH-15165)Steve Dower2019-08-071-1/+1
|
* bpo-37778: Fixes the icons used for file associations to the Microsoft Store ↵Steve Dower2019-08-072-14/+19
| | | | package (GH-15150)
* bpo-37734: Fix use of registry values to launch Python from Microsoft Store ↵Steve Dower2019-08-072-9/+15
| | | | app (GH-15146)
* bpo-37730: Fix usage of NotImplemented instead of NotImplementedError in ↵David H2019-07-312-10/+10
| | | | docs. (GH-15062)
* Fix typos in comments, docs and test names (#15018)Min ho Kim2019-07-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | * 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-37641 preserve relative file location in embeddable zip (GH-14884)Bill Collins2019-07-251-6/+5
| | | | | | | | | | | | | | Previously, pyc files in the embeddable distribution reported their location as <build path>/<file stem>.py. This causes a little confusion when interpreting stack traces as the file is in a (almost certainly) incorrect location, and lacks the full relative path to Lib (e.g. email/mime/image.py will only show image.py). This change preserves the Lib relative location of the source file as a path so that stack traces are (hopefully) less misleading and more informative. Co-Authored-By: Kyle Stanley <aeros167@gmail.com>
* bpo-37672: Switch Windows Store package to use pip.ini for user mode (GH-14939)Steve Dower2019-07-243-35/+48
|
* bpo-37369: Fixes crash when reporting fatal error (GH-14468)Steve Dower2019-06-291-2/+3
|
* bpo-37369: Fix initialization of sys members when launched via an app ↵Steve Dower2019-06-292-131/+175
| | | | | | | container (GH-14428) sys._base_executable is now always defined on all platforms, and can be overridden through configuration. Also adds test.support.PythonSymlink to encapsulate platform-specific logic for symlinking sys.executable
* Implement Windows release builds in Azure Pipelines (GH-14065)Steve Dower2019-06-148-102/+197
|
* bpo-37201: fix test_distutils failures for Windows ARM64 (GH-13902)Paul Monson2019-06-121-3/+3
|
* Bump to 3.9.0a0Łukasz Langa2019-06-042-801/+801
|
* bpo-12202: Properly check MsiSummaryInfoGetProperty() calls in msilib (GH-13711)Zackery Spytz2019-06-011-0/+3
|
* bpo-36974: tp_print -> tp_vectorcall_offset and tp_reserved -> tp_as_async ↵Jeroen Demeyer2019-05-312-10/+10
| | | | | | | | | (GH-13464) Automatically replace tp_print -> tp_vectorcall_offset tp_compare -> tp_as_async tp_reserved -> tp_as_async
* bpo-36763: Implement the PEP 587 (GH-13592)Victor Stinner2019-05-271-73/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add a whole new documentation page: "Python Initialization Configuration" * PyWideStringList_Append() return type is now PyStatus, instead of int * PyInterpreterState_New() now calls PyConfig_Clear() if PyConfig_InitPythonConfig() fails. * Rename files: * Python/coreconfig.c => Python/initconfig.c * Include/cpython/coreconfig.h => Include/cpython/initconfig.h * Include/internal/: pycore_coreconfig.h => pycore_initconfig.h * Rename structures * _PyCoreConfig => PyConfig * _PyPreConfig => PyPreConfig * _PyInitError => PyStatus * _PyWstrList => PyWideStringList * Rename PyConfig fields: * use_module_search_paths => module_search_paths_set * module_search_path_env => pythonpath_env * Rename PyStatus field: _func => func * PyInterpreterState: rename core_config field to config * Rename macros and functions: * _PyCoreConfig_SetArgv() => PyConfig_SetBytesArgv() * _PyCoreConfig_SetWideArgv() => PyConfig_SetArgv() * _PyCoreConfig_DecodeLocale() => PyConfig_SetBytesString() * _PyInitError_Failed() => PyStatus_Exception() * _Py_INIT_ERROR_TYPE_xxx enums => _PyStatus_TYPE_xxx * _Py_UnixMain() => Py_BytesMain() * _Py_ExitInitError() => Py_ExitStatusException() * _Py_PreInitializeFromArgs() => Py_PreInitializeFromBytesArgs() * _Py_PreInitializeFromWideArgs() => Py_PreInitializeFromArgs() * _Py_PreInitialize() => Py_PreInitialize() * _Py_RunMain() => Py_RunMain() * _Py_InitializeFromConfig() => Py_InitializeFromConfig() * _Py_INIT_XXX() => _PyStatus_XXX() * _Py_INIT_FAILED() => _PyStatus_EXCEPTION() * Rename 'err' PyStatus variables to 'status' * Convert RUN_CODE() macro to config_run_code() static inline function * Remove functions: * _Py_InitializeFromArgs() * _Py_InitializeFromWideArgs() * _PyInterpreterState_GetCoreConfig()
* bpo-36763: Remove _PyCoreConfig.dll_path (GH-13402)Victor Stinner2019-05-181-10/+8
|
* bpo-36763: Add _PyInitError functions (GH-13395)Victor Stinner2019-05-171-0/+1
| | | | | | | | | | | | | | | * Add _PyInitError functions: * _PyInitError_Ok() * _PyInitError_Error() * _PyInitError_NoMemory() * _PyInitError_Exit() * _PyInitError_IsError() * _PyInitError_IsExit() * _PyInitError_Failed() * frozenmain.c and _testembed.c now use functions rather than macros. * Move _Py_INIT_xxx() macros to the internal API. * Move _PyWstrList_INIT macro to the internal API.
* bpo-36942 Windows build changes for Windows ARM64 (GH-13366)Paul Monson2019-05-171-0/+3
|
* bpo-36540: PEP 570 -- Implementation (GH-12701)Pablo Galindo2019-04-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* bpo-35920: Windows 10 ARM32 platform support (GH-11774)Paul Monson2019-04-251-0/+16
|
* bpo-36672: Fix a compiler warning in winreg.SetValue() (GH-12882)Zackery Spytz2019-04-221-1/+1
|
* bpo-9194: Fix the bounds checking in winreg.c's fixupMultiSZ() (GH-12687)Zackery Spytz2019-04-221-1/+1
|
* bpo-36649: Remove trailing spaces for registry keys when installed via the ↵Steve Dower2019-04-171-7/+6
| | | | Store (GH-12865)
* bpo-36509: Add iot layout for Windows IoT containers (GH-12663)Paul Monson2019-04-122-2/+18
| | | This enables using the `--preset-iot` option with the PC/layout script, but does not enable IoT builds as part of any normal release.
* bpo-36010: Add venv to the nuget distribution (GH-12367)Paul Moore2019-03-301-1/+9
|
* bpo-35947: Update Windows to the current version of libffi (GH-11797)Paul Monson2019-03-291-1/+1
| | | We now use a pre-built libffi binary from our binaries repository, and no longer vendor the full implementation.
* bpo-8677: use PY_DWORD_MAX instead of INT_MAX (GH-12469)Inada Naoki2019-03-201-5/+3
|
* bpo-8677: use PY_SSIZE_T_CLEAN in PC/winreg.c (GH-12466)Inada Naoki2019-03-201-0/+6
|
* bpo-36127: Argument Clinic: inline parsing code for keyword parameters. ↵Serhiy Storchaka2019-03-143-21/+79
| | | | (GH-12058)
* bpo-36254: Fix invalid uses of %d in format strings in C. (GH-12264)Serhiy Storchaka2019-03-131-3/+3
|
* bpo-36140: Fix an incorrect check in msidb_getsummaryinformation() (GH-12074)Zackery Spytz2019-03-071-1/+1
|
* bpo-24643: Fix "#define timezone _timezone" clashes on Windows (GH-12019)Zackery Spytz2019-02-251-7/+0
|
* bpo-35976: Enable Windows projects to build with platform ARM32 (GH-11825)Paul Monson2019-02-141-1/+1
| | | This change adds the necessary items to the build projects to avoid erroring out right at the start. It does not add _support_ for targeting Windows on ARM32, but is a necessary prerequisite for adding it.
* bpo-34691: Compile _contextvars module into main Python library (GH-11741)Steve Dower2019-02-021-0/+4
|
* bpo-32560: inherit the py launcher's STARTUPINFO (GH-9000)Shiva Saxena2019-02-021-1/+1
| | | https://bugs.python.org/issue32560
* bpo-33895: Relase GIL while calling functions that acquire Windows loader ↵Tony Roberts2019-02-021-0/+8
| | | | | lock (GH-7789) LoadLibrary, GetProcAddress, FreeLibrary and GetModuleHandle acquire the system loader lock. Calling these while holding the GIL will cause a deadlock on the rare occasion that another thread is detaching and needs to destroy its thread state at the same time.
* bpo-1104: msilib.SummaryInfo.GetProperty() truncates the string by one ↵Tzu-ping Chung2019-02-021-10/+19
| | | | | | character (GH-4517) Add one char to MsiSummaryInfoGetProperty() output Based on the patch in bpo-1104 by Anthony Tuininga (atuining) and Mark McMahon (markm).
* bpo-35811: Avoid propagating venv settings when launching via py.exe (GH-11677)Steve Dower2019-01-251-0/+11
|
* bpo-35224: PEP 572 Implementation (#10497)Emily Morehouse2019-01-241-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add tokenization of := - Add token to Include/token.h. Add token to documentation in Doc/library/token.rst. - Run `./python Lib/token.py` to regenerate Lib/token.py. - Update Parser/tokenizer.c: add case to handle `:=`. * Add initial usage of := in grammar. * Update Python.asdl to match the grammar updates. Regenerated Include/Python-ast.h and Python/Python-ast.c * Update AST and compiler files in Python/ast.c and Python/compile.c. Basic functionality, this isn't scoped properly * Regenerate Lib/symbol.py using `./python Lib/symbol.py` * Tests - Fix failing tests in test_parser.py due to changes in token numbers for internal representation * Tests - Add simple test for := token * Tests - Add simple tests for named expressions using expr and suite * Tests - Update number of levels for nested expressions to prevent stack overflow * Update symbol table to handle NamedExpr * Update Grammar to allow assignment expressions in if statements. Regenerate Python/graminit.c accordingly using `make regen-grammar` * Tests - Add additional tests for named expressions in RoundtripLegalSyntaxTestCase, based on examples and information directly from PEP 572 Note: failing tests are currently commented out (4 out of 24 tests currently fail) * Tests - Add temporary syntax test failure tests in test_parser.py Note: There is an outstanding TODO for this -- syntax tests need to be moved to a different file (presumably test_syntax.py), but this is covering what needs to be tested at the moment, and it's more convenient to run a single test for the time being * Add support for allowing assignment expressions as function argument annotations. Uncomment tests for these cases because they all pass now! * Tests - Move existing syntax tests out of test_parser.py and into test_named_expressions.py. Refactor syntax tests to use unittest * Add TargetScopeError exception to extend SyntaxError Note: This simply creates the TargetScopeError exception, it is not yet used anywhere * Tests - Update tests per PEP 572 Continue refactoring test suite: The named expression test suite now checks for any invalid cases that throw exceptions (no longer limited to SyntaxErrors), assignment tests to ensure that variables are properly assigned, and scope tests to ensure that variable availability and values are correct Note: - There are still tests that are marked to skip, as they are not yet implemented - There are approximately 300 lines of the PEP that have not yet been addressed, though these may be deferred * Documentation - Small updates to XXX/todo comments - Remove XXX from child description in ast.c - Add comment with number of previously supported nested expressions for 3.7.X in test_parser.py * Fix assert in seq_for_testlist() * Cleanup - Denote "Not implemented -- No keyword args" on failing test case. Fix PEP8 error for blank lines at beginning of test classes in test_parser.py * Tests - Wrap all file opens in `with...as` to ensure files are closed * WIP: handle f(a := 1) * Tests and Cleanup - No longer skips keyword arg test. Keyword arg test now uses a simpler test case and does not rely on an external file. Remove print statements from ast.c * Tests - Refactor last remaining test case that relied on on external file to use a simpler test case without the dependency * Tests - Add better description of remaning skipped tests. Add test checking scope when using assignment expression in a function argument * Tests - Add test for nested comprehension, testing value and scope. Fix variable name in skipped comprehension scope test * Handle restriction of LHS for named expressions - can only assign to LHS of type NAME. Specifically, restrict assignment to tuples This adds an alternative set_context specifically for named expressions, set_namedexpr_context. Thus, context is now set differently for standard assignment versus assignment for named expressions in order to handle restrictions. * Tests - Update negative test case for assigning to lambda to match new error message. Add negative test case for assigning to tuple * Tests - Reorder test cases to group invalid syntax cases and named assignment target errors * Tests - Update test case for named expression in function argument - check that result and variable are set correctly * Todo - Add todo for TargetScopeError based on Guido's comment (https://github.com/python/cpython/commit/2b3acd37bdfc2d35e5094228c6684050d2aa8b0a#r30472562) * Tests - Add named expression tests for assignment operator in function arguments Note: One of two tests are skipped, as function arguments are currently treating an assignment expression inside of parenthesis as one child, which does not properly catch the named expression, nor does it count arguments properly * Add NamedStore to expr_context. Regenerate related code with `make regen-ast` * Add usage of NamedStore to ast_for_named_expr in ast.c. Update occurances of checking for Store to also handle NamedStore where appropriate * Add ste_comprehension to _symtable_entry to track if the namespace is a comprehension. Initialize ste_comprehension to 0. Set set_comprehension to 1 in symtable_handle_comprehension * s/symtable_add_def/symtable_add_def_helper. Add symtable_add_def to handle grabbing st->st_cur and passing it to symtable_add_def_helper. This now allows us to call the original code from symtable_add_def by instead calling symtable_add_def_helper with a different ste. * Refactor symtable_record_directive to take lineno and col_offset as arguments instead of stmt_ty. This allows symtable_record_directive to be used for stmt_ty and expr_ty * Handle elevating scope for named expressions in comprehensions. * Handle error for usage of named expression inside a class block * Tests - No longer skip scope tests. Add additional scope tests * Cleanup - Update error message for named expression within a comprehension within a class. Update comments. Add assert for symtable_extend_namedexpr_scope to validate that we always find at least a ModuleScope if we don't find a Class or FunctionScope * Cleanup - Add missing case for NamedStore in expr_context_name. Remove unused var in set_namedexpr_content * Refactor - Consolidate set_context and set_namedexpr_context to reduce duplicated code. Special cases for named expressions are handled by checking if ctx is NamedStore * Cleanup - Add additional use cases for ast_for_namedexpr in usage comment. Fix multiple blank lines in test_named_expressions * Tests - Remove unnecessary test case. Renumber test case function names * Remove TargetScopeError for now. Will add back if needed * Cleanup - Small comment nit for consistency * Handle positional argument check with named expression * Add TargetScopeError exception definition. Add documentation for TargetScopeError in c-api docs. Throw TargetScopeError instead of SyntaxError when using a named expression in a comprehension within a class scope * Increase stack size for parser by 200. This is a minimal change (approx. 5kb) and should not have an impact on any systems. Update parser test to allow 99 nested levels again * Add TargetScopeError to exception_hierarchy.txt for test_baseexception.py_ * Tests - Major update for named expression tests, both in test_named_expressions and test_parser - Add test for TargetScopeError - Add tests for named expressions in comprehension scope and edge cases - Add tests for named expressions in function arguments (declarations and call sites) - Reorganize tests to group them more logically * Cleanup - Remove unnecessary comment * Cleanup - Comment nitpicks * Explicitly disallow assignment expressions to a name inside parentheses, e.g.: ((x) := 0) - Add check for LHS types to detect a parenthesis then a name (see note) - Add test for this scenario - Update tests for changed error message for named assignment to a tuple (also, see note) Note: This caused issues with the previous error handling for named assignment to a LHS that contained an expression, such as a tuple. Thus, the check for the LHS of a named expression must be changed to be more specific if we wish to maintain the previous error messages * Cleanup - Wrap lines more strictly in test file * Revert "Explicitly disallow assignment expressions to a name inside parentheses, e.g.: ((x) := 0)" This reverts commit f1531400ca7d7a2d148830c8ac703f041740896d. * Add NEWS.d entry * Tests - Fix error in test_pickle.test_exceptions by adding TargetScopeError to list of exceptions * Tests - Update error message tests to reflect improved messaging convention (s/can't/cannot) * Remove cases that cannot be reached in compile.c. Small linting update. * Update Grammar/Tokens to add COLONEQUAL. Regenerate all files * Update TargetScopeError PRE_INIT and POST_INIT, as this was purposefully left out when fixing rebase conflicts * Add NamedStore back and regenerate files * Pass along line number and end col info for named expression * Simplify News entry * Fix compiler warning and explicity mark fallthrough
* bpo-35683: Improve Azure Pipelines steps (GH-11493)Steve Dower2019-01-221-0/+2
|