summaryrefslogtreecommitdiffstats
path: root/Modules/clinic
Commit message (Collapse)AuthorAgeFilesLines
* bpo-38916: array.array: remove fromstring() and tostring() (GH-17487)Victor Stinner2019-12-091-69/+1
| | | | array.array: Remove tostring() and fromstring() methods. They were aliases to tobytes() and frombytes(), deprecated since Python 3.2.
* closes bpo-38712: Add signal.pidfd_send_signal. (GH-17070)Benjamin Peterson2019-11-201-1/+75
| | | | | | | | This exposes a Linux-specific syscall for sending a signal to a process identified by a file descriptor rather than a pid. For simplicity, we don't support the siginfo_t parameter to the syscall. This parameter allows implementing a pidfd version of rt_sigqueueinfo(2), which Python also doesn't support.
* bpo-38835: Don't use PyFPE_START_PROTECT and PyFPE_END_PROTECT (GH-17231)Victor Stinner2019-11-201-31/+16
| | | | | The PyFPE_START_PROTECT() and PyFPE_END_PROTECT() macros are empty: they have been doing nothing for the last year (since commit 735ae8d139a673b30b321dc10acfd3d14f0d633b), so stop using them.
* bpo-36589: Fix the error handling in curses.update_lines_cols(). (GH-12766)Zackery Spytz2019-11-171-13/+3
| | | | Return None instead of 1.
* bpo-38692: Add os.pidfd_open. (GH-17063)Benjamin Peterson2019-11-061-1/+43
|
* bpo-35381 Remove all static state from posixmodule (GH-15892)Eddie Elizondo2019-11-051-2/+2
| | | | | | | | | | | | | | After #9665, this moves the remaining types in posixmodule to be heap-allocated to make it compatible with PEP384 as well as modifying all the type accessors to fully make the type opaque. The original PR that got messed up a rebase: https://github.com/python/cpython/pull/10854. All the issues in that commit have now been addressed since https://github.com/python/cpython/pull/11661 got committed. This change also removes any state from the data segment and onto the module state itself. https://bugs.python.org/issue35381 Automerge-Triggered-By: @encukou
* bpo-38312: Add curses.{get,set}_escdelay and curses.{get,set}_tabsize. ↵Anthony Sottile2019-10-311-1/+123
| | | | (GH-16938)
* bpo-38378: Rename parameters "out" and "in" of os.sendfile(). (GH-16742)Serhiy Storchaka2019-10-131-10/+10
| | | | | | | They conflicted with keyword "in". Also rename positional-only parameters of private os._fcopyfile() for consistency.
* bpo-38265: Update os.pread to accept the length type as Py_ssize_t. (GH-16359)Dong-hee Na2019-09-251-6/+14
|
* bpo-38116: Convert select module to PEP-384 (#15971)Dino Viehland2019-09-141-3/+3
| | | | | | | | | | * Convert select module to PEP-384 Summary: Do the necessary versions to be Pyro-compatible, including migrating `PyType_Ready` to `PyType_FromSpec` and moving static data into a new `_selectstate` struct. * 📜🤖 Added by blurb_it. * Fixup Mac OS/X build
* bpo-37206: Unrepresentable default values no longer represented as None. ↵Serhiy Storchaka2019-09-1411-55/+55
| | | | | | | (GH-13933) In ArgumentClinic, value "NULL" should now be used only for unrepresentable default values (like in the optional third parameter of getattr). "None" should be used if None is accepted as argument and passing None has the same effect as not passing the argument at all.
* bpo-9216: Add usedforsecurity to hashlib constructors (GH-16044)Christian Heimes2019-09-135-83/+272
| | | | | The usedforsecurity keyword only argument added to the hash constructors is useful for FIPS builds and similar restrictive environment with non-technical requirements that legacy algorithms be forbidden by their implementations without being explicitly annotated as not being used for any security related purposes. Linux distros with FIPS support benefit from this being standard rather than making up their own way(s) to do it. Contributed and Signed-off-by: Christian Heimes christian@python.org
* bpo-38132: Simplify _hashopenssl code (GH-16023)Christian Heimes2019-09-121-1/+223
| | | Signed-off-by: Christian Heimes <christian@python.org>
* bpo-38134: Remove PKBDF2_HMAC_fast from _hashopenssl (GH-16028)Christian Heimes2019-09-121-9/+1
| | | Signed-off-by: Christian Heimes <christian@python.org>
* bpo-36543: Remove old-deprecated ElementTree features. (GH-12707)Serhiy Storchaka2019-09-011-54/+1
| | | | | Remove methods Element.getchildren(), Element.getiterator() and ElementTree.getiterator() and the xml.etree.cElementTree module.
* bpo-37034: Display argument name on errors with keyword arguments with ↵Rémi Lapeyre2019-08-2929-281/+281
| | | | Argument Clinic. (GH-13593)
* bpo-37942: Improve argument clinic float converter (GH-15470)Raymond Hettinger2019-08-255-92/+266
|
* bpo-37798: Add C fastpath for statistics.NormalDist.inv_cdf() (GH-15266)Dong-hee Na2019-08-231-0/+50
|
* bpo-37834: Normalise handling of reparse points on Windows (GH-15231)Steve Dower2019-08-211-18/+1
| | | | | | | | | | bpo-37834: Normalise handling of reparse points on Windows * ntpath.realpath() and nt.stat() will traverse all supported reparse points (previously was mixed) * nt.lstat() will let the OS traverse reparse points that are not name surrogates (previously would not traverse any reparse point) * nt.[l]stat() will only set S_IFLNK for symlinks (previous behaviour) * nt.readlink() will read destinations for symlinks and junction points only bpo-1311: os.path.exists('nul') now returns True on Windows * nt.stat('nul').st_mode is now S_IFCHR (previously was an error)
* Delete leftover clinic-generated file for C zipimport. (GH-15174)Greg Price2019-08-101-325/+0
|
* Fix typos in comments, docs and test names (#15018)Min ho Kim2019-07-301-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | * Fix typos in comments, docs and test names * Update test_pyparse.py account for change in string length * Apply suggestion: splitable -> splittable Co-Authored-By: Terry Jan Reedy <tjreedy@udel.edu> * Apply suggestion: splitable -> splittable Co-Authored-By: Terry Jan Reedy <tjreedy@udel.edu> * Apply suggestion: Dealloccte -> Deallocate Co-Authored-By: Terry Jan Reedy <tjreedy@udel.edu> * Update posixmodule checksum. * Reverse idlelib changes.
* bpo-37691: Let math.dist() accept sequences and iterables for coordinates ↵Raymond Hettinger2019-07-271-11/+3
| | | | (GH-14975)
* bpo-37266: Daemon threads are now denied in subinterpreters (GH-14049)Victor Stinner2019-06-141-0/+22
| | | | | | | | | | | | In a subinterpreter, spawning a daemon thread now raises an exception. Daemon threads were never supported in subinterpreters. Previously, the subinterpreter finalization crashed with a Pyton fatal error if a daemon thread was still running. * Add _thread._is_main_interpreter() * threading.Thread.start() now raises RuntimeError if the thread is a daemon thread and the method is called from a subinterpreter. * The _thread module now uses Argument Clinic for the new function. * Use textwrap.dedent() in test_threading.SubinterpThreadingTests
* bpo-37178: Allow a one argument form of math.perm() (GH-13905)Raymond Hettinger2019-06-081-4/+11
|
* bpo-37165: Convert _count_elements to the argument clinic (GH-13848)Raymond Hettinger2019-06-051-1/+32
|
* bpo-35431: Drop the k <= n requirement (GH-13798)Raymond Hettinger2019-06-041-9/+13
|
* bpo-37128: Add math.perm(). (GH-13731)Serhiy Storchaka2019-06-021-1/+36
|
* bpo-35431: Refactor math.comb() implementation. (GH-13725)Serhiy Storchaka2019-06-011-18/+6
| | | | | | | * Fixed some bugs. * Added support for index-likes objects. * Improved error messages. * Cleaned up and optimized the code. * Added more tests.
* bpo-35431: Implemented math.comb (GH-11414)Yash Aggarwal2019-06-011-1/+50
|
* bpo-26826: Expose copy_file_range in the os module (GH-7255)Pablo Galindo2019-05-311-1/+107
|
* bpo-36999: Add asyncio.Task.get_coro() (GH-13680)Alex Grönholm2019-05-301-1/+18
| | | https://bugs.python.org/issue36999
* bpo-26836: Add os.memfd_create() (#13567)Zackery Spytz2019-05-291-1/+60
| | | | | | | | | | | | | | | | | | | | * bpo-26836: Add os.memfd_create() * Use the glibc wrapper for memfd_create() Co-Authored-By: Christian Heimes <christian@python.org> * Fix deletions caused by autoreconf. * Use MFD_CLOEXEC as the default value for *flags*. * Add memset_s to configure.ac. * Revert memset_s changes. * Apply the requested changes. * Tweak the docs.
* bpo-22385: Support output separators in hex methods. (#13578)Gregory P. Smith2019-05-291-17/+98
| | | | | | | | | | | | | | | | | | * bpo-22385: Support output separators in hex methods. Also in binascii.hexlify aka b2a_hex. The underlying implementation behind all hex generation in CPython uses the same pystrhex.c implementation. This adds support to bytes, bytearray, and memoryview objects. The binascii module functions exist rather than being slated for deprecation because they return bytes rather than requiring an intermediate step through a str object. This change was inspired by MicroPython which supports sep in its binascii implementation (and does not yet support the .hex methods). https://bugs.python.org/issue22385
* bpo-37001: Makes symtable.symtable have parity with compile for input (#13483)Dino Viehland2019-05-281-18/+6
| | | | | | | * Makes symtable.symtable have parity for accepted datatypes for source code as compile() * Add NEWS blurb
* bpo-36785: PEP 574 implementation (GH-7076)Antoine Pitrou2019-05-261-80/+148
|
* bpo-37021: Port _randommodule to the argument clinic (GH-13532)Pablo Galindo2019-05-241-0/+117
|
* bpo-31904: Add posix module support for VxWorks (GH-12118)pxinwr2019-05-211-5/+5
|
* bpo-36887: add math.isqrt (GH-13244)Mark Dickinson2019-05-181-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add math.isqrt function computing the integer square root. * Code cleanup: remove redundant comments, rename some variables. * Tighten up code a bit more; use Py_XDECREF to simplify error handling. * Update Modules/mathmodule.c Co-Authored-By: Serhiy Storchaka <storchaka@gmail.com> * Update Modules/mathmodule.c Use real argument clinic type instead of an alias Co-Authored-By: Serhiy Storchaka <storchaka@gmail.com> * Add proof sketch * Updates from review. * Correct and expand documentation. * Fix bad reference handling on error; make some variables block-local; other tidying. * Style and consistency fixes. * Add missing error check; don't try to DECREF a NULL a * Simplify some error returns. * Another two test cases: - clarify that floats are rejected even if they happen to be squares of small integers - TypeError beats ValueError for a negative float * Documentation and markup improvements; thanks Serhiy for the suggestions! * Cleaner Misc/NEWS entry wording. * Clean up (with one fix) to the algorithm explanation and proof.
* bpo-36673: Implement comment/PI parsing support for the TreeBuilder in ↵Stefan Behnel2019-05-011-6/+122
| | | | | | | | ElementTree. (#12883) * bpo-36673: Implement comment/PI parsing support for the TreeBuilder in ElementTree. * bpo-36673: Rewrite the comment/PI factory handling for the TreeBuilder in "_elementtree" to make it use the same factories as the ElementTree module, and to make it explicit when the comments/PIs are inserted into the tree and when they are not (which is the default).
* bpo-36085: Enable better DLL resolution on Windows (GH-12302)Steve Dower2019-03-291-1/+97
|
* bpo-36297: remove "unicode_internal" codec (GH-12342)Inada Naoki2019-03-181-103/+1
|
* bpo-36127: Argument Clinic: inline parsing code for keyword parameters. ↵Serhiy Storchaka2019-03-1428-535/+3816
| | | | (GH-12058)
* bpo-36101: remove non-ascii characters in docstring (GH-12018)animalize2019-02-241-3/+3
| | | | | * remove non-ascii characters in docstring * clinic.py emits a warning when docstring has non-ascii character
* bpo-35813: Tests and docs for shared_memory (#11816)Davin Potts2019-02-241-1/+153
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Added tests for shared_memory submodule. * Added tests for ShareableList. * Fix bug in allocationn size during creation of empty ShareableList illuminated by existing test run on Linux. * Initial set of docs for shared_memory module. * Added docs for ShareableList, added doctree entry for shared_memory submodule, name refactoring for greater clarity. * Added examples to SharedMemoryManager docs, for ease of documentation switched away from exclusively registered functions to some explicit methods on SharedMemoryManager. * Wording tweaks to docs. * Fix test failures on Windows. * Added tests around SharedMemoryManager. * Documentation tweaks. * Fix inappropriate test on Windows. * Further documentation tweaks. * Fix bare exception. * Removed __copyright__. * Fixed typo in doc, removed comment. * Updated SharedMemoryManager preliminary tests to reflect change of not supporting all registered functions on SyncManager. * Added Sphinx doctest run controls. * CloseHandle should be in a finally block in case MapViewOfFile fails. * Missed opportunity to use with statement. * Switch to self.addCleanup to spare long try/finally blocks and save one indentation, change to use decorator to skip test instead. * Simplify the posixshmem extension module. Provide shm_open() and shm_unlink() functions. Move other functionality into the shared_memory.py module. * Added to doc around size parameter of SharedMemory. * Changed PosixSharedMemory.size to use os.fstat. * Change SharedMemory.buf to a read-only property as well as NamedSharedMemory.size. * Marked as provisional per PEP411 in docstring. * Changed SharedMemoryTracker to be private. * Removed registered Proxy Objects from SharedMemoryManager. * Removed shareable_wrap(). * Removed shareable_wrap() and dangling references to it. * For consistency added __reduce__ to key classes. * Fix for potential race condition on Windows for O_CREX. * Remove unused imports. * Update access to kernel32 on Windows per feedback from eryksun. * Moved kernel32 calls to _winapi. * Removed ShareableList.copy as redundant. * Changes to _winapi use from eryksun feedback. * Adopt simpler SharedMemory API, collapsing PosixSharedMemory and WindowsNamedSharedMemory into one. * Fix missing docstring on class, add test for ignoring size when attaching. * Moved SharedMemoryManager to managers module, tweak to fragile test. * Tweak to exception in OpenFileMapping suggested by eryksun. * Mark a few dangling bits as private as suggested by Giampaolo.
* bpo-36016: Add generation option to gc.getobjects() (GH-11909)Pablo Galindo2019-02-231-7/+25
|
* Remove stray quote in os.replace docstring. (GH-11556)Anthony Sottile2019-02-131-2/+2
|
* bpo-35606: Implement math.prod (GH-11359)Pablo Galindo2019-02-071-1/+38
|
* bpo-35537: Add setsid parameter to os.posix_spawn() and os.posix_spawnp() ↵Joannah Nanjekye2019-02-011-18/+26
| | | | (GH-11608)
* bpo-35674: Add os.posix_spawnp() (GH-11554)Joannah Nanjekye2019-01-161-1/+74
| | | Add a new os.posix_spawnp() function.
* bpo-34838: Use subclass_of for math.dist. (GH-9659)Ammar Askar2019-01-121-1/+9
| | | | | Argument clinic now generates fast inline code for positional parsing, so the manually implemented type check in math.dist can be removed.