summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Change 'exception happened' to 'exception occurred' in two places (#19767)Noah Doersing2020-05-012-2/+2
|
* bpo-40334: Add support for feature_version in new PEG parser (GH-19827)Lysandros Nikolaou2020-05-016-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 Stinner2020-05-013-4/+2
|
* bpo-40275: Fix name error in support.socket_helper (GH-19825)Victor Stinner2020-05-011-4/+6
| | | | | Replace TestFailed with support.TestFailed. Bug spotted by pyflakes.
* Remove dead code in test__xxsubinterpreters (GH-19826)Victor Stinner2020-05-011-20/+0
|
* bpo-1635741: Fix compiler warning in _stat.c (GH-19822)Victor Stinner2020-04-301-1/+1
| | | Cast Py_ARRAY_LENGTH() size_t to int explicitly.
* Revert "bpo-29587: Enable implicit exception chaining with gen.throw() ↵Victor Stinner2020-04-303-24/+0
| | | | | (GH-19811)" (#19821) This reverts commit 2514a632fb7d37be24c2059d0e286d35600f9795.
* bpo-29587: Enable implicit exception chaining with gen.throw() (GH-19811)Chris Jerdonek2020-04-303-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.
* bpo-40334: Support type comments (GH-19780)Guido van Rossum2020-04-306-1448/+2567
| | | | | | | | | | This implements full support for # type: <type> comments, # type: ignore <stuff> comments, and the func_type parsing mode for ast.parse() and compile(). Closes https://github.com/we-like-parsers/cpython/issues/95. (For now, you need to use the master branch of mypy, since another issue unique to 3.9 had to be fixed there, and there's no mypy release yet.) The only thing missing is `feature_version=N`, which is being tracked in https://github.com/we-like-parsers/cpython/issues/124.
* compileall: Fix typos in docstring (GH-19810)Jelle Zijlstra2020-04-301-2/+2
|
* bpo-40443: Remove unused imports in distutils (GH-19802)Victor Stinner2020-04-3011-17/+6
|
* bpo-40443: Remove unused imports in the stdlib (GH-19803)Victor Stinner2020-04-3010-12/+0
|
* bpo-40394 - difflib.SequenceMatched.find_longest_match default args (GH-19742)lrjball2020-04-305-4/+61
| | | | | * bpo-40394 - difflib.SequenceMatched.find_longest_match default args Added default args to find_longest_match, as well as related tests.
* bpo-40443: Remove unused imports in idlelib (GH-19801)Victor Stinner2020-04-306-6/+3
|
* bpo-40389: Improve repr of typing.Optional (#19714)Vlad Serebrennikov2020-04-304-2/+10
|
* bpo-40443: Remove unused imports in tests (GH-19804)Victor Stinner2020-04-3018-20/+2
|
* bpo-40443: Remove unused imports in tests (GH-19805)Victor Stinner2020-04-2917-20/+4
|
* bpo-40334: Fix test_peg_parser to actually use the old parser (GH-19778)Lysandros Nikolaou2020-04-292-8/+15
| | | Now that the default parser is the new PEG parser, ast.parse uses it, which means that we don't actually test something in test_peg_parser. This commit introduces a new keyword argument (`oldparser`) for `_peg_parser.parse_string` for specifying that a string needs to be parsed with the old parser. This keyword argument is used in the tests to actually compare the ASTs the new parser generates with those generated by the old parser.
* bpo-40291: Add support for CAN_J1939 sockets (GH-19538)karl ding2020-04-298-5/+197
| | | | Add support for CAN_J1939 sockets that wrap SAE J1939 protocol functionality provided by Linux 5.4+ kernels.
* Fix plural typo in documentation (GH-19799)Alex Povel2020-04-291-1/+1
| | | Co-authored-by: Alex Povel <python@alexpovel.de>
* bpo-1635741: Port _stat module to multiphase initialization (GH-19798)Dong-hee Na2020-04-292-100/+128
|
* bpo-40328: Add tool for generating cjk mapping headers (GH-19602)Dong-hee Na2020-04-2915-3/+51015
|
* bpo-40286: Remove C implementation of Random.randbytes() (GH-19797)Victor Stinner2020-04-294-87/+10
| | | | | Remove _random.Random.randbytes(): the C implementation of randbytes(). Implement the method in Python to ease subclassing: randbytes() now directly reuses getrandbits().
* bpo-9216: Expose OpenSSL FIPS_mode() as _hashlib.get_fips_mode() (GH-19703)Victor Stinner2020-04-294-1/+110
| | | | | | test.pythoninfo logs OpenSSL FIPS_mode() and Linux /proc/sys/crypto/fips_enabled in a new "fips" section. Co-Authored-By: Petr Viktorin <encukou@gmail.com>
* What's New in Python 3.9: Reorganize C API Changes (GH-19794)Victor Stinner2020-04-291-159/+173
| | | | | | | | | | Move Build Changes and C API Changes to the end of the document. Most Python users don't build Python themselves and don't use the C API. Other changes: * Add Build Changes section * Add sub-sections to the C API Changes * Sort modules in Improved Modules section: move nntplib after multiprocessing
* bpo-40228: More robust frame.setlineno. (GH-19437)Mark Shannon2020-04-293-330/+269
| | | More robust frame.setlineno. Makes no assumptions about source->bytecode translation.
* bpo-40436: Fix code parsing gdb version (GH-19792)Victor Stinner2020-04-293-2/+12
| | | test_gdb and test.pythoninfo now check gdb command exit code.
* bpo-40428: Cleanup free list part of C API Changes doc (GH-19793)Victor Stinner2020-04-291-11/+9
|
* Add missing sys import to socket_helper.py (GH-19791)Pablo Galindo2020-04-291-0/+1
|
* bpo-40334: refactor and cleanup for the PEG generators (GH-19775)Pablo Galindo2020-04-297-230/+292
|
* bpo-40432 Fix MSBuild project for Pegen grammars (#GH-9785)Anthony Shaw2020-04-291-1/+2
| | | | | | * Update the source path of the pegen target within the Windows regen project. Change the path to Windows path formats. * Use the more reliable SetEnv task for Cpp Projects in MSBuild.
* bpo-40275: Move transient_internet from test.support to socket_helper (GH-19711)Serhiy Storchaka2020-04-2915-144/+153
|
* bpo-40428: Remove references to Py*_ClearFreeList in the docs (GH-19783)Zackery Spytz2020-04-297-42/+0
| | | | They were removed from the C API in commit ae00a5a88534fd45939f86c12e038da9fa6f9ed6.
* bpo-40334: Disallow invalid single statements in the new parser (GH-19774)Lysandros Nikolaou2020-04-292-1/+51
| | | | | After parsing is done in single statement mode, the tokenizer buffer has to be checked for additional lines and a `SyntaxError` must be raised, in case there are any. Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
* bpo-39995: Fix concurrent.futures _ThreadWakeup (GH-19760)Victor Stinner2020-04-292-14/+29
| | | | Fix a race condition in concurrent.futures._ThreadWakeup: access to _ThreadWakeup is now protected with the shutdown lock.
* bpo-40421: Add PyFrame_GetBack() function (GH-19765)Victor Stinner2020-04-299-19/+65
| | | | | | New PyFrame_GetBack() function: get the frame next outer frame. Replace frame->f_back with PyFrame_GetBack(frame) in most code but frameobject.c, ceval.c and genobject.c.
* bpo-40275: Move requires_hashdigest() to test.support.hashlib_helper (GH-19716)Hai Shi2020-04-299-68/+71
| | | Add a new test.support.hashlib_helper submodule.
* bpo-40334: Explicitly cast to int in pegen.c to fix a compiler warning ↵Pablo Galindo2020-04-291-4/+4
| | | | (GH-19779)
* bpo-40429: PyThreadState_GetFrame() returns a strong ref (GH-19781)Victor Stinner2020-04-297-20/+26
| | | | The PyThreadState_GetFrame() function now returns a strong reference to the frame.
* bpo-40334: Fix shifting of nested f-strings in the new parser (GH-19771)Lysandros Nikolaou2020-04-292-2/+10
| | | `JoinedStr`s and `FormattedValue also needs to be shifted, in order to correctly compute the location information of nested f-strings.
* bpo-40428: Remove PyTuple_ClearFreeList() function (GH-19769)Victor Stinner2020-04-2921-86/+71
| | | | | | | | | | | | | | | | | | | Remove the following function from the C API: * PyAsyncGen_ClearFreeLists() * PyContext_ClearFreeList() * PyDict_ClearFreeList() * PyFloat_ClearFreeList() * PyFrame_ClearFreeList() * PyList_ClearFreeList() * PySet_ClearFreeList() * PyTuple_ClearFreeList() Make these functions private, move them to the internal C API and change their return type to void. Call explicitly PyGC_Collect() to free all free lists. Note: PySet_ClearFreeList() did nothing.
* bpo-40429: Refactor super_init() (GH-19776)Victor Stinner2020-04-291-64/+85
| | | | Add super_init_without_args() sub-function. Hold a strong reference to the frame code object while calling super_init_without_args().
* bpo-38880: List interpreters associated with a channel end (GH-17323)Lewis Gaul2020-04-294-6/+282
| | | | | This PR adds the functionality requested by https://github.com/ericsnowcurrently/multi-core-python/issues/52. Automerge-Triggered-By: @ericsnowcurrently
* bpo-40431: Fix syntax typo in turtledemo (GH-19777)Miro Hrončok2020-04-292-1/+2
| | | | | | *** File "/usr/lib64/python3.9/turtledemo/__main__.py", line 275 bg="#d00" if clear == NORMAL else"#fca") ^ SyntaxError: invalid string prefix
* bpo-40429: PyFrame_GetCode() now returns a strong reference (GH-19773)Victor Stinner2020-04-289-26/+35
|
* bpo-32604: Add support for a "default" arg in channel_recv(). (GH-19770)Eric Snow2020-04-282-11/+46
| | | | | This allows the caller to avoid creation of an exception when the channel is empty (just like `dict.get()` works). `ChannelEmptyError` is still raised if no default is provided. Automerge-Triggered-By: @ericsnowcurrently
* bpo-40429: PyFrame_GetCode() result cannot be NULL (GH-19772)Victor Stinner2020-04-287-48/+45
| | | Add frame_nslots() to factorize duplicate code.
* bpo-39966: Revert "bpo-25597: Ensure wraps' return value is used for magic ↵Karthikeyan Singaravelan2020-04-283-12/+12
| | | | | | | methods in MagicMock" (GH-19734) * Revert "bpo-25597: Ensure wraps' return value is used for magic methods in MagicMock (#16029)" This reverts commit 72b1004657e60c900e4cd031b2635b587f4b280e.
* bpo-40025: Require _generate_next_value_ to be defined before members (GH-19098)Ethan Onstott2020-04-285-0/+21
| | | require `_generate_next_value_` to be defined before members
* bpo-40421: Add PyFrame_GetCode() function (GH-19757)Victor Stinner2020-04-2812-25/+58
| | | | | | | | | PyFrame_GetCode(frame): return a borrowed reference to the frame code. Replace frame->f_code with PyFrame_GetCode(frame) in most code, except in frameobject.c, genobject.c and ceval.c. Also add PyFrame_GetLineNumber() to the limited C API.