summaryrefslogtreecommitdiffstats
path: root/Modules/clinic
Commit message (Collapse)AuthorAgeFilesLines
* bpo-43105: Importlib now resolves relative paths when creating module spec ↵Steve Dower2021-04-091-1/+46
| | | | objects from file locations (GH-25121)
* [3.8] [3.9] bpo-42681: Fix range checks for color and pair numbers in curses ↵Serhiy Storchaka2021-01-041-13/+13
| | | | | | | (GH-23874). (GH-24077) (GH-24079) (cherry picked from commit 1470edd6131c29b8a09ce012cdfee3afa269d553) (cherry picked from commit b0ee2b492dbf550fbd2a63b82de0a4dc9d67f32e)
* [3.8] bpo-36589: Fix the error handling in curses.update_lines_cols(). ↵Serhiy Storchaka2021-01-011-13/+3
| | | | | | | | | (GH-12766) (GH-24023) Return None instead of 1. (cherry picked from commit 2bc343417a4de83fa6998ff91303877734ecd366) Co-authored-by: Zackery Spytz <zspytz@gmail.com>
* [3.8] bpo-31938: Fix default-value signatures of several functions in the ↵Anthony Sottile2020-06-231-5/+9
| | | | | | | select module (GH-21066) (GH-21098) (cherry picked from commit d051801052211b533c46a593b1c1bccf649a171c) Automerge-Triggered-By: @vstinner
* [3.8] bpo-38580: Document that select() accepts iterables, not just ↵Tal Einat2020-05-261-2/+2
| | | | | | | sequences (GH-16832) (cherry picked from commit 372ee27d4958302dac7ad6a8711f6fd04771b2e6) Co-authored-by: Jakub Stasiak <jakub@stasiak.at>
* [3.8] bpo-40179: Fix translation of #elif in Argument Clinic (GH-19364) ↵Serhiy Storchaka2020-04-181-3/+3
| | | | | | | (GH-19583) Co-authored-by: Ammar Askar <ammar@ammaraskar.com> (cherry picked from commit 12446e6a605f066d837d3a595d0a73e4f3b43b65)
* bpo-39426: Fix outdated default and highest protocols in docs (GH-18154)Miss Islington (bot)2020-01-241-7/+8
| | | | | | | | Some portions of the pickle documentation hadn't been updated for the pickle protocol changes in Python 3.8 (new protocol 5, default protocol 4). This PR fixes those docs. https://bugs.python.org/issue39426 (cherry picked from commit e9652e8d58392f5022759ba06b444ce970eb12db) Co-authored-by: Mark Dickinson <mdickinson@enthought.com>
* [3.8] bpo-37206: Unrepresentable default values no longer represented as ↵Serhiy Storchaka2019-09-1411-55/+55
| | | | | | | | | | None. (GH-13933) (GH-16141) 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. (cherry picked from commit 279f44678c8b84a183f9eeb85e0b086228154497) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* bpo-38132: Simplify _hashopenssl code (GH-16023) (#16040)Miss Islington (bot)2019-09-121-1/+223
| | | | | | Signed-off-by: Christian Heimes <christian@python.org> (cherry picked from commit 5a4f82f457049b5b07b6fba4ca42bc1ecf597976) Co-authored-by: Christian Heimes <christian@python.org>
* bpo-38134: Remove PKBDF2_HMAC_fast from _hashopenssl (GH-16028)Miss Islington (bot)2019-09-121-9/+1
| | | | | | Signed-off-by: Christian Heimes <christian@python.org> (cherry picked from commit 64117e059b79236c7345bc9afc1cc707162411de) Co-authored-by: Christian Heimes <christian@python.org>
* [3.8] bpo-37034: Display argument name on errors with keyword arguments with ↵Serhiy Storchaka2019-08-2929-281/+281
| | | | | | | Argument Clinic. (GH-13593). (GH-15599) (cherry picked from commit 4901fe274bc82b95dc89bcb3de8802a3dfedab32) Co-authored-by: Rémi Lapeyre <remi.lapeyre@henki.fr>
* [3.8] bpo-37942: Improve argument clinic float converter (GH-15470) (GH-15480)Raymond Hettinger2019-08-255-92/+266
| | | (cherry picked from commit aef9ad82f7f667cd001a7112d3bc636e918626f7)
* bpo-37798: Add C fastpath for statistics.NormalDist.inv_cdf() (GH-15266) ↵Miss Islington (bot)2019-08-231-0/+50
| | | | | | | (GH-15441) (cherry picked from commit 0a18ee4be7ba215f414bef04598e0849504f9f1e) Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>
* bpo-37834: Normalise handling of reparse points on Windows (GH-15370)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)Miss Islington (bot)2019-08-101-325/+0
| | | | | (cherry picked from commit 51aac15f6d525595e200e3580409c4b8656e8a96) Co-authored-by: Greg Price <gnprice@gmail.com>
* bpo-37691: Let math.dist() accept sequences and iterables for coordinates ↵Miss Islington (bot)2019-07-271-11/+3
| | | | | | | (GH-14975) (GH-14984) (cherry picked from commit 6b5f1b496f0b20144592b640b9c975df43a29eb0) Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
* bpo-37178: Allow a one argument form of math.perm() (GH-13905) (GH-13919)Miss Islington (bot)2019-06-081-4/+11
| | | | | (cherry picked from commit e119b3d136bd94d880bce4b382096f6de3f38062) Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
* bpo-37165: Convert _count_elements to the argument clinic (GH-13848)Miss Islington (bot)2019-06-051-1/+32
| | | | | (cherry picked from commit e985804207473796a1326585b3e1b9e18c764345) Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
* 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.
* bpo-35582: Argument Clinic: Optimize the "all boring objects" case. (GH-11520)Serhiy Storchaka2019-01-1111-230/+308
| | | | | Use _PyArg_CheckPositional() and inlined code instead of PyArg_UnpackTuple() and _PyArg_UnpackStack() if all parameters are positional and use the "object" converter.
* bpo-35582: Argument Clinic: inline parsing code for positional parameters. ↵Serhiy Storchaka2019-01-1133-446/+4262
| | | | (GH-11313)
* bpo-35568: add 'raise_signal' function (GH-11335)Vladimir Matveev2019-01-081-1/+34
| | | | | | As in title, expose C `raise` function as `raise_function` in `signal` module. Also drop existing `raise_signal` in `_testcapi` module and replace all usages with new function. https://bugs.python.org/issue35568
* Dead code removal from _hashopenssl. (GH-11379)Gregory P. Smith2018-12-311-41/+1
| | | | HASH_OBJ_CONSTRUCTOR has always been defined as 0 since I created hashlib in Python 2.5. Delete all code associated with it.
* bpo-32492: 1.6x speed up in namedtuple attribute access using C fast-path ↵Pablo Galindo2018-12-301-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#10495) * bpo-32492: 2.5x speed up in namedtuple attribute access using C fast path * Add News entry * fixup! bpo-32492: 2.5x speed up in namedtuple attribute access using C fast path * Check for tuple in the __get__ of the new descriptor and don't cache the descriptor itself * Don't inherit from property. Implement GC methods to handle __doc__ * Add a test for the docstring substitution in descriptors * Update NEWS entry to reflect time against 3.7 branch * Simplify implementation with argument clinic, better error messages, only __new__ * Use positional-only parameters for the __new__ * Use PyTuple_GET_SIZE and PyTuple_GET_ITEM to tighter the implementation of tuplegetterdescr_get * Implement __set__ to make tuplegetter a data descriptor * Use Py_INCREF now that we inline PyTuple_GetItem * Apply the valid_index() function, saving one test * Move Py_None test out of the critical path.
* bpo-20182: AC convert remaining functions/methods in _hashopenssl.c (GH-9213)Tal Einat2018-12-271-1/+194
|
* bpo-23867: Argument Clinic: inline parsing code for a single positional ↵Serhiy Storchaka2018-12-2525-178/+913
| | | | parameter. (GH-9689)