9db56fb | Julien Palard | 10 February 2019, 21:27:12 UTC | Doc sidebar: 3.6 has moved to security-fix mode. (GH-11810) | 10 February 2019, 21:27:12 UTC |
164686f | Pablo Galindo | 10 February 2019, 20:37:07 UTC | Fix compiler warning about non initialised variable (GH-11806) | 10 February 2019, 20:37:07 UTC |
4207907 | Pablo Galindo | 10 February 2019, 19:56:58 UTC | Fix division by 0 when checking for overflow in math.prod (GH-11808) | 10 February 2019, 19:56:58 UTC |
181835d | Ivan Levkivskyi | 10 February 2019, 15:39:49 UTC | Fix compiler warnings about end_col_offset and end_lineno (GH-11735) | 10 February 2019, 15:39:49 UTC |
5033e31 | Pablo Galindo | 10 February 2019, 00:21:37 UTC | Fix broken :ref: in asyncio docs (GH-11805) | 10 February 2019, 00:21:37 UTC |
7b2a37b | Pablo Galindo | 09 February 2019, 17:35:05 UTC | Make sure the BaseManager in test_multiprocessing is cleaned up correctly (GH-11653) | 09 February 2019, 17:35:05 UTC |
613f729 | Pablo Galindo | 09 February 2019, 17:08:49 UTC | Do not retain references to processes and managers in TestSyncManagerTypes (GH-11801) Keeping references to processes and managers between tests makes them count as dangling processes. | 09 February 2019, 17:08:49 UTC |
8a03ff2 | Terry Jan Reedy | 09 February 2019, 03:51:51 UTC | bpo-35833: Revise IDLE doc for control codes sent to Shell. (GH-11799) Add a code example block. | 09 February 2019, 03:51:51 UTC |
2dda72a | Raymond Hettinger | 09 February 2019, 02:55:02 UTC | lru_cache: Add more comments. Fix comment typos. Clarify a comment. (GH-11795) | 09 February 2019, 02:55:02 UTC |
7ab3d15 | Tim Peters | 08 February 2019, 21:09:26 UTC | Rework tuple hash tests. (GH-10161) Add tooling that will useful in future updates, paying particular attention to difficult cases where only the upper bits on the input vary. | 08 February 2019, 21:09:26 UTC |
5741c45 | Neil Schemenauer | 08 February 2019, 18:48:46 UTC | bpo-35903: Use autoconfig to probe for shm_open() and shm_unlink(). (#11765) Use autoconfig to probe for shm_open() and shm_unlink(). Set SHM_NEEDS_LIBRT if we must link with librt to get the shm_* functions. Change setup.py to use the autoconfig defines. These changes should make it more likely that _multiprocessing/posixshmem.c gets built correctly on different platforms. | 08 February 2019, 18:48:46 UTC |
64360ad | Raymond Hettinger | 08 February 2019, 18:37:39 UTC | Complete and neaten-up namedtuple's replacement of builtin function lookups with derefs (GH-11794) | 08 February 2019, 18:37:39 UTC |
d9503c3 | Paul Ganssle | 08 February 2019, 16:02:00 UTC | Add What's New entry for date subclass behavior (#11790) This was a backwards incompatible change and should be clearly noted. Related bugs: bpo-32417: https://bugs.python.org/issue32417 bpo-35364: https://bugs.python.org/issue35364 | 08 February 2019, 16:02:00 UTC |
96d37db | Fish | 07 February 2019, 19:51:59 UTC | bpo-35615: Fix crashes when copying a Weak{Key,Value}Dictionary. (GH-11384) Protect dict iterations by wrapping them with _IterationGuard in the following methods: - WeakValueDictionary.copy() - WeakValueDictionary.__deepcopy__() - WeakKeyDictionary.copy() - WeakKeyDictionary.__deepcopy__() | 07 February 2019, 19:51:59 UTC |
df8d2cd | Pierre Glaser | 07 February 2019, 19:36:48 UTC | bpo-35911: add cell constructor (GH-11771) Add a cell constructor, expose the cell type in the types module. | 07 February 2019, 19:36:48 UTC |
f289084 | Jason R. Coombs | 07 February 2019, 13:22:45 UTC | bpo-24209: In http.server script, rely on getaddrinfo to bind to preferred address based on the bind parameter. (#11767) In http.server script, rely on getaddrinfo to bind to preferred address based on the bind parameter. As a result, now IPv6 is used as the default (including IPv4 on dual-stack systems). Enhanced tests. | 07 February 2019, 13:22:45 UTC |
2848d9d | Giampaolo Rodola | 07 February 2019, 11:03:11 UTC | bpo-35917: Test multiprocessing manager classes and shareable types (GH-11772) multiprocessing: provide unittests for manager classes and shareable types | 07 February 2019, 11:03:11 UTC |
bc09851 | Pablo Galindo | 07 February 2019, 07:04:02 UTC | bpo-35606: Implement math.prod (GH-11359) | 07 February 2019, 07:04:02 UTC |
e9bc417 | Mariatta | 06 February 2019, 20:45:03 UTC | Fix url to core-mentorship mailing list (GH-11775) | 06 February 2019, 20:45:03 UTC |
cd90f6a | Harmandeep Singh | 05 February 2019, 10:16:13 UTC | bpo-20001: update pathlib landing image (GH-11304) | 05 February 2019, 10:16:13 UTC |
c95404f | Inada Naoki | 05 February 2019, 08:05:43 UTC | email: use dict instead of OrderedDict (GH-11709) | 05 February 2019, 08:05:43 UTC |
f345170 | Inada Naoki | 05 February 2019, 08:04:40 UTC | asyncio: use dict instead of OrderedDict (GH-11710) | 05 February 2019, 08:04:40 UTC |
9da3583 | Raymond Hettinger | 05 February 2019, 07:32:55 UTC | Fix typo (micro->nano) (GH-11759) | 05 February 2019, 07:32:55 UTC |
85e102a | Steve Dower | 05 February 2019, 01:15:13 UTC | bpo-35299: Fixed sysconfig and distutils during PGO profiling (GH-11744) | 05 February 2019, 01:15:13 UTC |
69091cb | Nina Zakharenko | 05 February 2019, 00:56:26 UTC | bpo-35321: Set the spec origin to frozen in frozen modules (#11732) * bpo-35321: Set the spec origin to frozen in frozen modules This fix correctly sets the spec origin to "frozen" for the _frozen_importlib module. Note that the origin was already correctly set in _frozen_importlib_external. * 📜🤖 Added by blurb_it. | 05 February 2019, 00:56:26 UTC |
89427cd | Paul Ganssle | 04 February 2019, 19:42:04 UTC | bpo-32417: Make timedelta arithmetic respect subclasses (#10902) * Make timedelta return subclass types Previously timedelta would always return the `date` and `datetime` types, regardless of what it is added to. This makes it return an object of the type it was added to. * Add tests for timedelta arithmetic on subclasses * Make pure python timedelta return subclass types * Add test for fromtimestamp with tz argument * Add tests for subclass behavior in now * Add news entry. Fixes: bpo-32417 bpo-35364 * More descriptive variable names in tests Addresses Victor's comments | 04 February 2019, 19:42:04 UTC |
ca7d293 | Łukasz Langa | 04 February 2019, 08:39:24 UTC | Post 3.8.0a1 | 04 February 2019, 08:39:24 UTC |
e7afe1a | Łukasz Langa | 04 February 2019, 08:30:59 UTC | Merge tag 'v3.8.0a1' Python 3.8.0a1 | 04 February 2019, 08:30:59 UTC |
a8474d0 | Steve Dower | 04 February 2019, 07:19:38 UTC | bpo-35872 and bpo-35873: Clears __PYVENV_LAUNCHER__ variable (GH-11745) After reading __PYVENV_LAUNCHER__ we now set sys._base_executable value for later use. Make the same changes for macOS to avoid extra platform checks. | 04 February 2019, 07:19:38 UTC |
2f6fae6 | Steve Dower | 04 February 2019, 07:08:18 UTC | bpo-35692: pathlib no longer raises when checking file and directory existence on drives that are not ready (GH-11746) | 04 February 2019, 07:08:18 UTC |
e75eeb0 | Łukasz Langa | 03 February 2019, 13:17:38 UTC | v3.8.0a1 | 03 February 2019, 13:17:38 UTC |
aab0e57 | Łukasz Langa | 03 February 2019, 13:04:12 UTC | [pydoc] Regenerate topics for v3.8.0a1 | 03 February 2019, 13:04:12 UTC |
8efa3b6 | Łukasz Langa | 03 February 2019, 13:02:52 UTC | [blurb] v3.8.0a1 | 03 February 2019, 13:02:52 UTC |
f75d59e | Raymond Hettinger | 03 February 2019, 06:54:56 UTC | bpo-35884: Add variable access benchmarking script (GH-11725) | 03 February 2019, 06:54:56 UTC |
2c2ba05 | Ned Deily | 03 February 2019, 05:41:20 UTC | Update macOS installer Welcome and ReadMe for 3.8 (GH-11748) | 03 February 2019, 05:41:20 UTC |
8ebc645 | Minmin Gong | 03 February 2019, 04:26:55 UTC | bpo-35890 : Fix some API calling consistency (GH-11742) Unicode version of Windows APIs are used in places, but not for GetVersionEx in Python/sysmodule.c The wcstok_s is called on Windows in Modules/main.c and PC/launcher.c, but not in Python/pathconfig.c | 03 February 2019, 04:26:55 UTC |
4c70d9f | Steve Dower | 02 February 2019, 22:36:23 UTC | bpo-34691: Compile _contextvars module into main Python library (GH-11741) | 02 February 2019, 22:36:23 UTC |
b82bfac | Mark Becwar | 02 February 2019, 21:08:23 UTC | bpo-29734: nt._getfinalpathname handle leak (GH-740) Make sure that failure paths call CloseHandle outside of the function that failed | 02 February 2019, 21:08:23 UTC |
cb09047 | Shiva Saxena | 02 February 2019, 19:21:04 UTC | bpo-32560: inherit the py launcher's STARTUPINFO (GH-9000) https://bugs.python.org/issue32560 | 02 February 2019, 19:21:04 UTC |
d08ea70 | Stefan Krah | 02 February 2019, 17:57:41 UTC | bpo-35845: Add order={'C', 'F', 'A'} parameter to memoryview.tobytes(). (#11730) | 02 February 2019, 17:57:41 UTC |
4860f01 | Tony Roberts | 02 February 2019, 17:16:42 UTC | bpo-33895: Relase GIL while calling functions that acquire Windows loader 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. | 02 February 2019, 17:16:42 UTC |
2de576e | Tzu-ping Chung | 02 February 2019, 17:13:23 UTC | bpo-1104: msilib.SummaryInfo.GetProperty() truncates the string by one character (GH-4517) Add one char to MsiSummaryInfoGetProperty() output Based on the patch in bpo-1104 by Anthony Tuininga (atuining) and Mark McMahon (markm). | 02 February 2019, 17:13:23 UTC |
05e9221 | native-api | 02 February 2019, 16:22:55 UTC | bpo-33316: PyThread_release_lock always fails (GH-6541) Use correct interpretation of return value from APIs. | 02 February 2019, 16:22:55 UTC |
00e9c55 | Cheryl Sabella | 02 February 2019, 14:37:39 UTC | bpo-26256: Document algorithm speed for the Decimal module. (#4808) | 02 February 2019, 14:37:39 UTC |
e5ef45b | Davin Potts | 02 February 2019, 04:52:23 UTC | bpo-35813: Added shared_memory submodule of multiprocessing. (#11664) Added shared_memory submodule to multiprocessing in time for first alpha with cross-platform tests soon to follow. | 02 February 2019, 04:52:23 UTC |
d2b4c19 | Guido van Rossum | 01 February 2019, 23:28:13 UTC | bpo-35879: Fix type comment leaks (GH-11728) * Fix leak for # type: ignore * Fix the type comment leak | 01 February 2019, 23:28:13 UTC |
ac19081 | Emily Morehouse | 01 February 2019, 22:27:38 UTC | bpo-35877: Add test for while loop named expression without parentheses (GH-11726) | 01 February 2019, 22:27:38 UTC |
d4fceaa | Xtreak | 01 February 2019, 21:40:16 UTC | bpo-35877: Make parenthesis optional for named expression in while statement (GH-11724) * Add parenthesis optional in named expressions for while statement * Add NEWS entry | 01 February 2019, 21:40:16 UTC |
85d83ec | Amador Pahim | 01 February 2019, 20:38:57 UTC | bpo-35864: fix namedtuple._asdict() docstring (GH-11720) | 01 February 2019, 20:38:57 UTC |
075de6c | Joannah Nanjekye | 01 February 2019, 19:58:43 UTC | bpo-35861: Fix SyntaxWarning in test_named_expressions.py (GH-11722) | 01 February 2019, 19:58:43 UTC |
3a32e3b | Guido van Rossum | 01 February 2019, 19:37:34 UTC | bpo-35766 follow-up: Kill half-support for FunctionType in PyAST_obj2mod (#11714) See https://github.com/python/cpython/pull/11645/files/229874c612df868e7ae3e997e159915f49d16542#r252631862 https://bugs.python.org/issue35766 | 01 February 2019, 19:37:34 UTC |
325e4ba | Victor Stinner | 01 February 2019, 14:47:24 UTC | bpo-35537: Fix function name in os.posix_spawnp() errors (GH-11719) | 01 February 2019, 14:47:24 UTC |
1e39b83 | Victor Stinner | 01 February 2019, 10:40:26 UTC | bpo-35537: Skip test_start_new_session() of posix_spawn (GH-11718) The test fails. Skip the test until a fix can be found. | 01 February 2019, 10:40:26 UTC |
80c5dfe | Joannah Nanjekye | 01 February 2019, 10:05:22 UTC | bpo-35537: Add setsid parameter to os.posix_spawn() and os.posix_spawnp() (GH-11608) | 01 February 2019, 10:05:22 UTC |
05f1b93 | Raymond Hettinger | 01 February 2019, 06:13:43 UTC | Speed-up argument parsing for common cases in deque.__init__()(GH-11717) | 01 February 2019, 06:13:43 UTC |
ffdf1c3 | Raymond Hettinger | 31 January 2019, 23:03:38 UTC | Consistently move the misses update to just before the user function call (GH-11715) | 31 January 2019, 23:03:38 UTC |
dcfcd14 | Guido van Rossum | 31 January 2019, 11:40:27 UTC | bpo-35766: Merge typed_ast back into CPython (GH-11645) | 31 January 2019, 11:40:27 UTC |
d97daeb | Phil Jones | 31 January 2019, 10:08:57 UTC | doc: http: Fix enum name for status code 416 (GH-11689) | 31 January 2019, 10:08:57 UTC |
0bb4bdf | Raymond Hettinger | 31 January 2019, 08:59:50 UTC | bpo-35864: Replace OrderedDict with regular dict in namedtuple() (#11708) * Change from OrderedDict to a regular dict * Add blurb | 31 January 2019, 08:59:50 UTC |
0897e0c | Inada Naoki | 31 January 2019, 08:53:48 UTC | bpo-33504: fix wrong "versionchanged" (GH-11712) | 31 January 2019, 08:53:48 UTC |
9f3f093 | Michael Selik | 31 January 2019, 08:47:53 UTC | bpo-34003: Use dict instead of OrderedDict in csv.DictReader (GH-8014) | 31 January 2019, 08:47:53 UTC |
a1f9a33 | Steve Dower | 30 January 2019, 21:49:14 UTC | bpo-35854: Fix EnvBuilder and --symlinks in venv on Windows (GH-11700) | 30 January 2019, 21:49:14 UTC |
40ebe94 | Raymond Hettinger | 30 January 2019, 21:30:20 UTC | Document differences between random.choices() and random.choice(). (GH-11703) | 30 January 2019, 21:30:20 UTC |
cf991e6 | João Matos | 30 January 2019, 17:23:39 UTC | bpo-35835: Add reference to Python 3.7 new breakpoint() function in pdb documentation. (GH-11691) | 30 January 2019, 17:23:39 UTC |
598e15d | jdemeyer | 30 January 2019, 15:49:39 UTC | bpo-25592: Improve documentation of distutils data_files (GH-9767) | 30 January 2019, 15:49:39 UTC |
cfd735e | Raymond Hettinger | 30 January 2019, 04:39:53 UTC | Move float conversion into a macro. Apply to fsum (GH-11698) | 30 January 2019, 04:39:53 UTC |
bafa848 | Giampaolo Rodola | 29 January 2019, 21:14:24 UTC | subprocess: close pipes/fds by using ExitStack (GH-11686) Close pipes/fds in subprocess by using ExitStack. "In case of premature failure on X.Close() or os.close(X) the remaining pipes/fds will remain "open". Perhaps it makes sense to use contextlib.ExitStack." - Rationale: https://github.com/python/cpython/pull/11575#discussion_r250288394 | 29 January 2019, 21:14:24 UTC |
742d768 | Andreas Schwab | 29 January 2019, 16:16:10 UTC | bpo-35847: RISC-V needs CTYPES_PASS_BY_REF_HACK (GH-11694) This fixes the ctypes.test.test_structures.StructureTestCase test. https://bugs.python.org/issue35847 | 29 January 2019, 16:16:10 UTC |
808180c | Raymond Hettinger | 28 January 2019, 21:59:56 UTC | Fast path for int inputs to math.dist() and math.hypot() (GH-11692) | 28 January 2019, 21:59:56 UTC |
ea44640 | David H | 28 January 2019, 09:31:19 UTC | bpo-35701: Update doc for UUID weak referencing (GH-11621) | 28 January 2019, 09:31:19 UTC |
dfc8bb9 | nu_no | 27 January 2019, 22:07:47 UTC | Fix typo: class declaration (GH-11678) | 27 January 2019, 22:07:47 UTC |
3171df3 | Nick Coghlan | 27 January 2019, 16:21:11 UTC | Clarify U-mode deprecation in open() (GH-11646) The previous wording could be read as saying that universal newlines mode itself was deprecated, when it's only the 'U' character in the mode field that should be avoided. The update also moves the description of the 'U' mode character out of the mode table, as the longer explanation was overly intrusive as a table entry and overshadowed the actually useful mode characters. | 27 January 2019, 16:21:11 UTC |
81d04bc | Gregory P. Smith | 26 January 2019, 23:19:11 UTC | Fix docstr/comment typos in _use_posix_spawn(). (GH-11684) | 26 January 2019, 23:19:11 UTC |
d8080c0 | Raymond Hettinger | 26 January 2019, 08:02:00 UTC | bpo-35780: Fix errors in lru_cache() C code (GH-11623) | 26 January 2019, 08:02:00 UTC |
adad9e6 | Steve Dower | 25 January 2019, 22:59:58 UTC | bpo-35811: Avoid propagating venv settings when launching via py.exe (GH-11677) | 25 January 2019, 22:59:58 UTC |
4e02f8f | Steve Dower | 25 January 2019, 22:59:12 UTC | bpo-35797: Fix default executable used by the multiprocessing module (GH-11676) | 25 January 2019, 22:59:12 UTC |
3bab40d | Windson yang | 25 January 2019, 12:01:41 UTC | bpo-34134: Advise to use imap or imap_unordered when handling long iterables. (gh-8324) | 25 January 2019, 12:01:41 UTC |
62c35a8 | Ivan Levkivskyi | 25 January 2019, 01:39:19 UTC | bpo-35814: Allow same r.h.s. in annotated assignments as in normal ones (GH-11667) | 25 January 2019, 01:39:19 UTC |
1396d8f | Victor Stinner | 25 January 2019, 00:49:53 UTC | bpo-35224: Add support for NamedExpr to unparse.py (GH-11670) | 25 January 2019, 00:49:53 UTC |
8f59ee0 | Emily Morehouse | 24 January 2019, 23:49:56 UTC | bpo-35224: PEP 572 Implementation (#10497) * 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 | 24 January 2019, 23:49:56 UTC |
1fd06f1 | Rémi Lapeyre | 24 January 2019, 19:43:13 UTC | bpo-35717: Fix KeyError exception raised when using enums and compile (GH-11523) https://bugs.python.org/issue17467 | 24 January 2019, 19:43:13 UTC |
5c8f537 | Jakub Kulík | 24 January 2019, 17:29:48 UTC | bpo-35520: Fix build with dtrace support on certain systems. (#11194) | 24 January 2019, 17:29:48 UTC |
fd628cf | Jason Fried | 23 January 2019, 20:57:25 UTC | bpo-35767: Fix unittest.loader to allow partials as test_functions (#11600) | 23 January 2019, 20:57:25 UTC |
f6243ac | Victor Stinner | 23 January 2019, 18:00:39 UTC | bpo-35537: subprocess can use posix_spawn with pipes (GH-11575) * subprocess.Popen can now also use os.posix_spawn() with pipes, but only if pipe file descriptors are greater than 2. * Fix Popen._posix_spawn(): set '_child_created' attribute to True. * Add Popen._close_pipe_fds() helper function to factorize the code. | 23 January 2019, 18:00:39 UTC |
ab67281 | Victor Stinner | 23 January 2019, 14:04:40 UTC | bpo-35713: Reorganize sys module initialization (GH-11658) * Rename _PySys_BeginInit() to _PySys_InitCore(). * Rename _PySys_EndInit() to _PySys_InitMain(). * Add _PySys_Create(). It calls _PySys_InitCore() which becomes private. * Add _PySys_SetPreliminaryStderr(). * Rename _Py_ReadyTypes() to _PyTypes_Init(). * Misc code cleanup. | 23 January 2019, 14:04:40 UTC |
cda73a5 | yuji38kwmt | 23 January 2019, 07:27:13 UTC | bpo-35781: Changed references to deprecated 'warn' method in logging documentation in favour of 'warning' (GH-11654) | 23 January 2019, 07:27:13 UTC |
f0c7436 | Géry Ogam | 23 January 2019, 07:12:39 UTC | bpo-35722: Updated the documentation for the 'disable_existing_loggers' parameter (GH-11525) | 23 January 2019, 07:12:39 UTC |
da6424e | Manjusaka | 23 January 2019, 07:08:38 UTC | bpo-35726: Prevented QueueHandler formatting from affecting other handlers (GH-11537) QueueHandler.prepare() now makes a copy of the record before modifying and enqueueing it, to avoid affecting other handlers in the chain. | 23 January 2019, 07:08:38 UTC |
6d43f6f | Victor Stinner | 22 January 2019, 20:18:05 UTC | bpo-35713: Split _Py_InitializeCore into subfunctions (GH-11650) * Split _Py_InitializeCore_impl() into subfunctions: add multiple pycore_init_xxx() functions * Preliminary sys.stderr is now set earlier to get an usable sys.stderr ealier. * Move code into _Py_Initialize_ReconfigureCore() to be able to call it from _Py_InitializeCore(). * Split _PyExc_Init(): create a new _PyBuiltins_AddExceptions() function. * Call _PyExc_Init() earlier in _Py_InitializeCore_impl() and new_interpreter() to get working exceptions earlier. * _Py_ReadyTypes() now returns _PyInitError rather than calling Py_FatalError(). * Misc code cleanup | 22 January 2019, 20:18:05 UTC |
28f6cb3 | Steve Dower | 22 January 2019, 18:49:52 UTC | bpo-35683: Improve Azure Pipelines steps (GH-11493) | 22 January 2019, 18:49:52 UTC |
bf4ac2d | Victor Stinner | 22 January 2019, 16:39:03 UTC | bpo-35713: Rework Python initialization (GH-11647) * The PyByteArray_Init() and PyByteArray_Fini() functions have been removed. They did nothing since Python 2.7.4 and Python 3.2.0, were excluded from the limited API (stable ABI), and were not documented. * Move "_PyXXX_Init()" and "_PyXXX_Fini()" declarations from Include/cpython/pylifecycle.h to Include/internal/pycore_pylifecycle.h. Replace "PyAPI_FUNC(TYPE)" with "extern TYPE". * _PyExc_Init() now returns an error on failure rather than calling Py_FatalError(). Move macros inside _PyExc_Init() and undefine them when done. Rewrite macros to make them look more like statement: add ";" when using them, add "do { ... } while (0)". * _PyUnicode_Init() now returns a _PyInitError error rather than call Py_FatalError(). * Move stdin check from _PySys_BeginInit() to init_sys_streams(). * _Py_ReadyTypes() now returns a _PyInitError error rather than calling Py_FatalError(). | 22 January 2019, 16:39:03 UTC |
35ca182 | Lucas Cimon | 22 January 2019, 16:15:01 UTC | bpo-35720: Fixing a memory leak in pymain_parse_cmdline_impl() (GH-11528) When the loop in the pymain_read_conf function in this same file calls pymain_init_cmdline_argv() a 2nd time, the pymain->command buffer of wchar_t is overriden and the previously allocated memory is never freed. | 22 January 2019, 16:15:01 UTC |
9932a22 | Ivan Levkivskyi | 22 January 2019, 11:18:22 UTC | bpo-33416: Add end positions to Python AST (GH-11605) The majority of this PR is tediously passing `end_lineno` and `end_col_offset` everywhere. Here are non-trivial points: * It is not possible to reconstruct end positions in AST "on the fly", some information is lost after an AST node is constructed, so we need two more attributes for every AST node `end_lineno` and `end_col_offset`. * I add end position information to both CST and AST. Although it may be technically possible to avoid adding end positions to CST, the code becomes more cumbersome and less efficient. * Since the end position is not known for non-leaf CST nodes while the next token is added, this requires a bit of extra care (see `_PyNode_FinalizeEndPos`). Unless I made some mistake, the algorithm should be linear. * For statements, I "trim" the end position of suites to not include the terminal newlines and dedent (this seems to be what people would expect), for example in ```python class C: pass pass ``` the end line and end column for the class definition is (2, 8). * For `end_col_offset` I use the common Python convention for indexing, for example for `pass` the `end_col_offset` is 4 (not 3), so that `[0:4]` gives one the source code that corresponds to the node. * I added a helper function `ast.get_source_segment()`, to get source text segment corresponding to a given AST node. It is also useful for testing. An (inevitable) downside of this PR is that AST now takes almost 25% more memory. I think however it is probably justified by the benefits. | 22 January 2019, 11:18:22 UTC |
7a23680 | Minmin Gong | 21 January 2019, 20:49:40 UTC | bpo-35758: Fix building on ARM + MSVC (gh-11531) * Disable x87 control word for non-x86 targets On msvc, x87 control word is only available on x86 target. Need to disable it for other targets to prevent compiling problems. * Include immintrin.h on x86 and x64 only Immintrin.h is only available on x86 and x64. Need to disable it for other targets to prevent compiling problems. | 21 January 2019, 20:49:40 UTC |
2433a2a | Kumar Akshay | 21 January 2019, 19:19:59 UTC | bpo-35782: Fix error message in randrange (GH-11620) https://bugs.python.org/issue35782 | 21 January 2019, 19:19:59 UTC |
e9b185f | Pablo Galindo | 21 January 2019, 14:35:43 UTC | bpo-35794: Catch PermissionError in test_no_such_executable (GH-11635) PermissionError can be raised if there are directories in the $PATH that are not accessible when using posix_spawnp. | 21 January 2019, 14:35:43 UTC |
b238545 | Victor Stinner | 21 January 2019, 09:24:12 UTC | bpo-35772: Fix test_tarfile on ppc64 (GH-11606) Fix sparse file tests of test_tarfile on ppc64le with the tmpfs filesystem. Fix the function testing if the filesystem supports sparse files: create a file which contains data and "holes", instead of creating a file which contains no data. tmpfs effective block size is a page size (tmpfs lives in the page cache). RHEL uses 64 KiB pages on aarch64, ppc64 and ppc64le, only s390x and x86_64 use 4 KiB pages, whereas the test punch holes of 4 KiB. test.pythoninfo: Add resource.getpagesize(). | 21 January 2019, 09:24:12 UTC |
222d303 | Pablo Galindo | 21 January 2019, 08:57:46 UTC | bpo-20239: Allow repeated deletion of unittest.mock.Mock attributes (#11057) * Allow repeated deletion of unittest.mock.Mock attributes * fixup! Allow repeated deletion of unittest.mock.Mock attributes * fixup! fixup! Allow repeated deletion of unittest.mock.Mock attributes | 21 January 2019, 08:57:46 UTC |
e8239b8 | Pablo Galindo | 20 January 2019, 18:57:56 UTC | Add information about DeprecationWarning for invalid escaped characters in the re module (GH-5255) | 20 January 2019, 18:57:56 UTC |
b2dc4a3 | Marc Schlaich | 20 January 2019, 18:47:42 UTC | bpo-35699: fix distuils cannot detect Build Tools 2017 anymore (GH-11495) | 20 January 2019, 18:47:42 UTC |