summaryrefslogtreecommitdiffstats
path: root/PC
Commit message (Collapse)AuthorAgeFilesLines
* bpo-37641 preserve relative file location in embeddable zip (GH-14884)Miss Islington (bot)2019-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> (cherry picked from commit c4cda4369f4b8f33082890d16dfc364a90658ef6) Co-authored-by: Bill Collins <bilbocollins@gmail.com>
* bpo-37672: Switch Windows Store package to use pip.ini for user mode (GH-14939)Miss Islington (bot)2019-07-243-35/+48
| | | | | (cherry picked from commit 123536fdab7b8def15c859aa70232bc55ec73096) Co-authored-by: Steve Dower <steve.dower@python.org>
* bpo-37369: Fix initialization of sys members when launched via an app ↵Steve Dower2019-06-292-131/+176
| | | | | | container (GH-14467) 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
| | | Includes backported fixes from GH-14091
* bpo-37201: fix test_distutils failures for Windows ARM64 (GH-13902)Miss Islington (bot)2019-06-121-3/+3
| | | | | (cherry picked from commit daf62627518ad97ce66a48c49496aa0573cf0731) Co-authored-by: Paul Monson <paulmon@users.noreply.github.com>
* 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
|
* bpo-35582: Argument Clinic: inline parsing code for positional parameters. ↵Serhiy Storchaka2019-01-112-18/+100
| | | | (GH-11313)
* bpo-35596: Use unchecked PYCs for the embeddable distro to avoid zipimport ↵Steve Dower2019-01-081-7/+13
| | | | | restrictions (GH-11465) Also adds extra steps to the CI build for Windows on Azure Pipelines to validate that the various layouts at least execute.
* bpo-35596: Fix vcruntime140.dll being added to embeddable distro multiple ↵Steve Dower2018-12-271-1/+1
| | | | | times. (GH-11329) https://bugs.python.org/issue35596
* bpo-23867: Argument Clinic: inline parsing code for a single positional ↵Serhiy Storchaka2018-12-252-14/+64
| | | | parameter. (GH-9689)
* bpo-11566: Extension build errors on Windows for _hypot (GH-11283)Matt McCormick2018-12-221-6/+0
| | | | | | | | | | This addresses C extension build errors related to an undefined _hypot symbol when building with the Microsoft Visual C++ Compiler for Python 2.7 [1] or MinGWPy [2]. It also addresses errors when building a C++ extension with MinGWPy and C++11 from cmath, 'error "::hypot' has not been declared' [1] https://www.microsoft.com/en-us/download/details.aspx?id=44266 [2] https://mingwpy.github.io/
* bpo-35489: Use "const Py_UNICODE *" for the Py_UNICODE converter in AC. ↵Serhiy Storchaka2018-12-142-75/+83
| | | | (GH-11150)
* bpo-34977: Remove unused preprocessor definition (GH-11092)Steve Dower2018-12-111-12/+0
|
* bpo-34977: Add Windows App Store package (GH-11027)Steve Dower2018-12-1125-0/+2194
| | | Also adds the PC/layout script for generating layouts on Windows.
* bpo-34977: Use venv redirector instead of original python.exe on Windows ↵Steve Dower2018-12-102-16/+215
| | | | (GH-11029)
* bpo-35441: Remove dead and buggy code related to PyList_SetItem(). (GH-11033)Zackery Spytz2018-12-081-3/+7
| | | | | | | | | | In _localemodule.c and selectmodule.c, remove dead code that would cause double decrefs if run. In addition, replace PyList_SetItem() with PyList_SET_ITEM() in cases where a new list is populated and there is no possibility of an error. In addition, check if the list changed size in the loop in array_array_fromlist().
* Revert "bpo-34977: Add Windows App Store package (GH-10245)" (GH-11019)Victor Stinner2018-12-0727-2392/+16
| | | This reverts commit 468a15aaf9206448a744fc5eab3fc21f51966aad.
* bpo-35436: Add missing PyErr_NoMemory() calls and other minor bug fixes. ↵Zackery Spytz2018-12-072-2/+13
| | | | | | (GH-11015) Set MemoryError when appropriate, add missing failure checks, and fix some potential leaks.
* bpo-34977: Add Windows App Store package (GH-10245)Steve Dower2018-12-0727-16/+2389
|
* bpo-33012: Fix invalid function cast warnings with gcc 8 in Argument Clinic. ↵Serhiy Storchaka2018-11-274-31/+31
| | | | | | | | (GH-6748) Fix invalid function cast warnings with gcc 8 for method conventions different from METH_NOARGS, METH_O and METH_VARARGS in Argument Clinic generated code.
* bpo-35059: PyObject_INIT() casts to PyObject* (GH-10674)Victor Stinner2018-11-231-1/+1
| | | | | | PyObject_INIT() and PyObject_INIT_VAR() now cast their first argument to PyObject*, as done in Python 3.7. Revert partially commit b4435e20a92af474f117b78b98ddc6f515363af5.
* bpo-34532: Fixed exit code for py.exe list versions arg (GH-9039)Brendan Gerrity2018-11-201-4/+5
|
* bpo-34725: Adds _Py_SetProgramFullPath so embedders may override ↵Steve Dower2018-11-181-0/+4
| | | | sys.executable (GH-9860)