summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* 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.
* bpo-40421: Add Include/cpython/code.h header file (GH-19756)Victor Stinner2020-04-287-165/+175
| | | | | | | | | | | bpo-35134, bpo-40421: Add Include/cpython/code.h header file. code.h now defines PyCodeObject type in the limited C API. It is now included by Python.h. Give a name to the PyCodeObject structure: it is now called "struct PyCodeObject". So it becomes possible to define PyCodeObject as "struct PyCodeObject" in the limited C API without defining the structure.
* bpo-40421: Add pyframe.h header file (GH-19755)Victor Stinner2020-04-2819-42/+63
| | | | | | | | | | Add a new separated pyframe.h header file of the PyFrame public C API: it is included by Python.h. Add PyFrame_GetLineNumber() to the limited C API. Replace "struct _frame" with "PyFrameObject" in header files. PyFrameObject is now defined as struct _frame by pyframe.h which is included early enough in Python.h.
* Post 3.9.0a6Łukasz Langa2020-04-281-1/+1
|
* Merge tag 'v3.9.0a6'Łukasz Langa2020-04-28122-291/+1313
|\
| * Python 3.9.0a6v3.9.0a6Łukasz Langa2020-04-27122-291/+1313
| |
* | bpo-40334: Refactor peg_generator to receive a Tokens file when building c ↵Pablo Galindo2020-04-288-90/+219
| | | | | | | | code (GH-19745)
* | bpo-40334: Don't skip test_parser:test_trigget_memory_error (GH-19744)Lysandros Nikolaou2020-04-281-1/+0
| | | | | | This test has been changed to always use the old parser, so no need for it to be skipped.
* | bpo-40334: Catch E_EOF error, when the tokenizer returns ERRORTOKEN (GH-19743)Lysandros Nikolaou2020-04-282-5/+6
| | | | | | An E_EOF error was only being caught after the parser exited before this commit. There are some cases though, where the tokenizer returns ERRORTOKEN *and* has set an E_EOF error (like when EOF directly follows a line continuation character) which weren't correctly handled before.
* | bpo-39995: Split test_concurrent_futures.test_crash() into sub-tests (GH-19739)Victor Stinner2020-04-271-63/+85
| | | | | | | | | | | | | | | | | | Now only test_error_during_result_unpickle_in_result_handler() captures and ignores sys.stderr in the test process. Tools like test.bisect_cmd don't support subTest() but only work with the granularity of one method. Remove unused ExecutorDeadlockTest._sleep_id() method.
* | bpo-30966: concurrent.futures.Process.shutdown() closes queue (GH-19738)Victor Stinner2020-04-272-0/+4
| | | | | | | | Process.shutdown(wait=True) of concurrent.futures now closes explicitly the result queue.
* | bpo-40334: Support PyPARSE_DONT_IMPLY_DEDENT in the new parser (GH-19736)Pablo Galindo2020-04-272-2/+1
| |
* | bpo-40334: Support CO_FUTURE_BARRY_AS_BDFL in the new parser (GH-19721)Pablo Galindo2020-04-2712-327/+437
| | | | | | This commit also allows to pass flags to the new parser in all interfaces and fixes a bug in the parser generator that was causing to inline rules with actions, making them disappear.
* | bpo-30966: Add multiprocessing.SimpleQueue.close() (GH-19735)Victor Stinner2020-04-275-0/+38
| | | | | | | | | | | | Add a new close() method to multiprocessing.SimpleQueue to explicitly close the queue. Automerge-Triggered-By: @pitrou
* | bpo-40375: Implement imaplib.IMAP4.unselect (GH-19712)Dong-hee Na2020-04-275-0/+59
| |
* | bpo-40217: Clean code in PyType_FromSpec_Alloc and add NEWS entry (GH-19733)Pablo Galindo2020-04-272-9/+22
|/
* bpo-40217: Ensure Py_VISIT(Py_TYPE(self)) is always called for ↵Pablo Galindo2020-04-271-1/+83
| | | | PyType_FromSpec types (GH-19414)
* Add files in tests/test_peg_generator to the install target lists (GH-19723)Pablo Galindo2020-04-272-0/+8
| | | Update the "Makefile.pre.in" template and the "PCbuild/lib.pyproj" with the files in "Lib/test/test/test_peg_generator" so they get correctly installed along the rest of the standard library.
* bpo-40398: Fix typing.get_args() for special generic aliases. (GH-19720)Serhiy Storchaka2020-04-273-3/+12
|
* bpo-40348: Fix typos in the programming FAQ (GH-19729)Zackery Spytz2020-04-261-2/+2
|
* bpo-38387: Formally document PyDoc_STRVAR and PyDoc_STR macros (GH-16607)Brad Solomon2020-04-263-1/+35
| | | | | | | Adds a short description of `PyDoc_STRVAR` and `PyDoc_STR` to "Useful macros" section of C-API docs. Currently, there is [one lone mention](https://docs.python.org/3/c-api/module.html?highlight=pydoc_strvar#c.PyModuleDef) in the C-API reference, despite the fact that `PyDoc_STRVAR` is ubiquitous to `Modules/`. Additionally, this properly uses `c:macro` within `Doc/c-api/module.rst` to link.
* bpo-40401: Remove duplicate pyhash.h include from pythoncore.vcxproj (GH-19725)Ammar Askar2020-04-261-1/+0
|
* bpo-40387: Improve queue join() example. (GH-19724)Raymond Hettinger2020-04-261-16/+12
|
* bpo-40396: Support GenericAlias in the typing functions. (GH-19718)Serhiy Storchaka2020-04-263-6/+62
|
* Fix typo in Lib/typing.py (GH-19717)Nickolena Fisher2020-04-261-1/+1
|
* Fix typo in object.__format__ docs (GH-19504)Heshy Roskes2020-04-251-1/+1
|
* bpo-40275: Avoid importing logging in test.support (GH-19601)Serhiy Storchaka2020-04-257-109/+105
| | | | | Import logging lazily in assertLogs() in unittest. Move TestHandler from test.support to logging_helper.
* bpo-40275: Avoid importing socket in test.support (GH-19603)Serhiy Storchaka2020-04-2537-429/+472
| | | | | | * Move socket related functions from test.support to socket_helper. * Import socket, nntplib and urllib.error lazily in transient_internet(). * Remove importing multiprocess.
* bpo-40275: Avoid importing asyncio in test.support (GH-19600)Serhiy Storchaka2020-04-253-2/+19
| | | | | * Import asyncio lazily in unittest (only when IsolatedAsyncioTestCase is used). * Import asyncio.events lazily in test.support.
* bpo-40279: Add some error-handling to the module initialisation docs example ↵Cajetan Rodrigues2020-04-251-3/+11
| | | | (GH-19705)
* closes bpo-40385: Remove Tools/scripts/checkpyc.py (GH-19709)Ammar Askar2020-04-243-70/+2
| | | | | This is one of the few files that has intimate knowledge of the pyc file format. Since it lacks tests it tends to become outdated fairly quickly. At present it has been broken since the introduction of PEP 552.
* bpo-40334: Add What's New sections for PEP 617 and PEP 585 (GH-19704)Guido van Rossum2020-04-241-0/+43
|
* bpo-40340: Separate examples more clearly in the programming FAQ (GH-19688)Cajetan Rodrigues2020-04-241-4/+5
|
* bpo-40360: Deprecate lib2to3 module in light of PEP 617 (GH-19663)Carl Meyer2020-04-244-5/+20
| | | | | Deprecate lib2to3 module in light of PEP 617. We anticipate removal in the 3.12 timeframe.
* bpo-40334: Rewrite test_c_parser to avoid memory leaks (GH-19694)Lysandros Nikolaou2020-04-243-83/+146
| | | | | | | | | | Previously every test was building an extension module and loading it into sys.modules. The tearDown function was thus not able to clean up correctly, resulting in memory leaks. With this commit, every test function now builds the extension module and runs the actual test code in a new process (using assert_python_ok), so that sys.modules stays intact and no memory gets leaked.
* bpo-38061: subprocess uses closefrom() on FreeBSD (GH-19697)Victor Stinner2020-04-243-1/+22
| | | | | | | | | | | | | Optimize the subprocess module on FreeBSD using closefrom(). A single close(fd) syscall is cheap, but when sysconf(_SC_OPEN_MAX) is high, the loop calling close(fd) on each file descriptor can take several milliseconds. The workaround on FreeBSD to improve performance was to load and mount the fdescfs kernel module, but this is not enabled by default. Initial patch by Ed Maste (emaste), Conrad Meyer (cem), Kyle Evans (kevans) and Kubilay Kocak (koobs): https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=242274
* bpo-38061: os.closerange() uses closefrom() on FreeBSD (GH-19696)Victor Stinner2020-04-242-7/+26
| | | | | | | | | On FreeBSD, os.closerange(fd_low, fd_high) now calls closefrom(fd_low) if fd_high is greater than or equal to sysconf(_SC_OPEN_MAX). Initial patch by Ed Maste (emaste), Conrad Meyer (cem), Kyle Evans (kevans) and Kubilay Kocak (koobs): https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=242274
* Expand the implementation comments (GH-19699)Raymond Hettinger2020-04-241-0/+7
|
* bpo-40048: Fix _PyCode_InitOpcache() error path (GH-19691)Victor Stinner2020-04-241-1/+1
| | | | | | If _PyCode_InitOpcache() fails in _PyEval_EvalFrameDefault(), use "goto exit_eval_frame;" rather than "return NULL;" to exit the function in a consistent state. For example, tstate->frame is now reset properly.
* Use Py_ssize_t instead of ssize_t (GH-19685)Pablo Galindo2020-04-241-1/+1
|
* bpo-40334: Allow to run make regen-pegen without distutils (GH-19684)Pablo Galindo2020-04-242-11/+12
|
* Fix broken mkdir -p call in regen-pegen (#19695)Guido van Rossum2020-04-231-1/+1
| | | We should use `$(MKDIR_P) <directory>`, not `$(MKDIR_P) -p <directory>`.
* bpo-40334: Use old compiler when compile mode is func_type (GH-19692)Guido van Rossum2020-04-231-1/+1
| | | | | This is invoked by mypy, using ast.parse(source, "<func_type>", "func_type"). Since the new grammar doesn't yet support the func_type_input start symbol we must use the old compiler in this case to prevent a crash. https://bugs.python.org/issue40334
* bpo-40336: Refactor typing._SpecialForm (GH-19620)Serhiy Storchaka2020-04-231-77/+61
|
* bpo-39983: Add test.support.print_warning() (GH-19683)Victor Stinner2020-04-236-31/+59
| | | | | | | Log "Warning -- ..." test warnings into sys.__stderr__ rather than sys.stderr, to ensure to display them even if sys.stderr is captured. test.libregrtest.utils.print_warning() now calls test.support.print_warning().
* Update ga_new to use _PyArg_CheckPositional and _PyArg_NoKwnames (GH-19679)Dong-hee Na2020-04-241-4/+2
|
* bpo-40334: Improve various PEG-Parser related stuff (GH-19669)Lysandros Nikolaou2020-04-237-34/+58
| | | The changes in this commit are all related to @vstinner's original review comments of the initial PEP 617 implementation PR.
* bpo-40370: Use the same compile and link args as the interpreter used in ↵Pablo Galindo2020-04-232-3/+16
| | | | test_peg_generator (GH-19674)
* gdbinit: Use proper define syntax (GH-19557)Florian Bruhin2020-04-231-1/+1
| | | | | | | Using `def` rather than `define` results in: Ambiguous command "def pu": define, define-prefix. Automerge-Triggered-By: @csabella