summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* bpo-38387: Formally document PyDoc_STRVAR and PyDoc_STR macros (GH-16607)Brad Solomon2020-04-273-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-271-1/+0
|
* bpo-40387: Improve queue join() example. (GH-19724)Raymond Hettinger2020-04-271-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-261-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-253-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-251-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-232-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-231-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
* bpo-40334: Suppress all output in test_peg_generator (GH-19675)Lysandros Nikolaou2020-04-232-5/+1
|
* bpo-40334: Fix build errors and warnings in test_peg_generator (GH-19672)Pablo Galindo2020-04-234-2/+17
|
* bpo-40334: Don't downcast from Py_ssize_t to int (GH-19671)Pablo Galindo2020-04-232-22/+22
|
* Compile extensions in test_peg_generator with C99 (GH-19668)Pablo Galindo2020-04-232-14/+13
|
* bpo-40334: Rename PyConfig.use_peg to _use_peg_parser (GH-19670)Victor Stinner2020-04-2326-54/+83
| | | | | | | | | | | * Rename PyConfig.use_peg to _use_peg_parser * Document PyConfig._use_peg_parser and mark it a deprecated * Mark -X oldparser option and PYTHONOLDPARSER env var as deprecated in the documentation. * Add use_old_parser() and skip_if_new_parser() to test.support * Remove sys.flags.use_peg: use_old_parser() uses _testinternalcapi.get_configs() instead. * Enhance test_embed tests * subprocess._args_from_interpreter_flags() copies -X oldparser
* bpo-40334: Fix builds outside the source directory and regenerate autoconf ↵Pablo Galindo2020-04-234-7/+76
| | | | files (GH-19667)
* Add @pablogsal as code owner for pegen-related files (GH-19665)Pablo Galindo2020-04-221-0/+2
|
* bpo-40334: Fix errors in parse_string.c with old compilers (GH-19666)Pablo Galindo2020-04-221-10/+14
|
* PEP 617: Only run the CI with the new parser (GH-19664)Pablo Galindo2020-04-222-46/+0
|
* bpo-40334: PEP 617 implementation: New PEG parser for CPython (GH-19503)Pablo Galindo2020-04-2291-147/+27058
| | | | Co-authored-by: Guido van Rossum <guido@python.org> Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
* bpo-39939: Add str.removeprefix and str.removesuffix (GH-18939)sweeneyde2020-04-2213-6/+597
| | | | | Added str.removeprefix and str.removesuffix methods and corresponding bytes, bytearray, and collections.UserString methods to remove affixes from a string if present. See PEP 616 for a full description.
* bpo-40260: Remove unnecessary newline in compile() call (GH-19641)Anthony Sottile2020-04-221-1/+1
| | | Because some people subclass this class and call undocumented methods, and we don't want to break them.
* bpo-39562: Prevent collision of future and compiler flags (GH-19230)Batuhan Taşkaya2020-04-226-22/+49
| | | | | | The constant values of future flags in the __future__ module is updated in order to prevent collision with compiler flags. Previously PyCF_ALLOW_TOP_LEVEL_AWAIT was clashing with CO_FUTURE_DIVISION.
* bpo-40214: Fix ctypes WinDLL test with insecure flags (GH-19652)Steve Dower2020-04-221-5/+3
|
* bpo-40138: Fix Windows os.waitpid() for large exit code (GH-19637)Victor Stinner2020-04-224-40/+87
| | | | | | | | Fix the Windows implementation of os.waitpid() for exit code larger than "INT_MAX >> 8". The exit status is now interpreted as an unsigned number. os.waitstatus_to_exitcode() now accepts wait status larger than INT_MAX.
* bpo-38329: python.org macOS installers now update Current symlink (GH-19650)Ned Deily2020-04-222-6/+4
| | | | | | | Previously, python.org macOS installers did not alter the Current version symlink in /Library/Frameworks/Python.framework/Versions when installing a version of Python 3.x, only when installing 2.x. Now that Python 2 is retired, it's time to change that. This should make it a bit easier to embed Python 3 into other macOS applications.
* bpo-38360: macOS: support alternate form of -isysroot flag (GH-16480)Joshua Root2020-04-225-16/+79
| | | | | | | It is possible to use either '-isysroot /some/path' (with a space) or '-isysroot/some/path' (no space in between). Support both forms in places where special handling of -isysroot is done, rather than just the first form. Co-authored-by: Ned Deily <nad@python.org>
* bpo-38439: Add 256px IDLE icon (GH-17473)Miro Hrončok2020-04-226-2/+19
| | | | Icon author: Andrew Clover, bpo-1490384
* bpo-40164: Update macOS installer builds to use OpenSSL 1.1.1g. (GH-19642)Ned Deily2020-04-222-3/+4
|
* bpo-40327: Improve atomicity, speed, and memory efficiency of the items() ↵Raymond Hettinger2020-04-211-1/+1
| | | | loop (GH-19628)
* Small improvements to the recipes and examples. (GH-19635)Raymond Hettinger2020-04-211-30/+26
| | | | | * Add underscores to long numbers to improve readability * Use bigger dataset in the bootstrapping example * Convert single-server queue example to more useful multi-server queue