summaryrefslogtreecommitdiffstats
path: root/Modules/clinic/posixmodule.c.h
Commit message (Collapse)AuthorAgeFilesLines
* bpo-35490: Remove the DecodeFSDefault return converter in AC. (#11152)Serhiy Storchaka2018-12-171-8/+3
|
* bpo-35489: Use "const Py_UNICODE *" for the Py_UNICODE converter in AC. ↵Serhiy Storchaka2018-12-141-5/+6
| | | | (GH-11150)
* bpo-33012: Fix invalid function cast warnings with gcc 8 in Argument Clinic. ↵Serhiy Storchaka2018-11-271-110/+110
| | | | | | | | (GH-6748) Fix invalid function cast warnings with gcc 8 for method conventions different from METH_NOARGS, METH_O and METH_VARARGS in Argument Clinic generated code.
* bpo-29341: Clarify that path-like objects are accepted in some os methods ↵BNMetrics2018-11-021-11/+11
| | | | | (GH-10101) Some methods in the os module can accept path-like objects. This is documented in the general documentation but not in the function docstrings. To keep both in sync, the docstrings need to be updated to reflect that path-like objects are also accepted.
* closes bpo-34862: Guard definition of convert_sched_param with ↵William Orr2018-10-021-3/+3
| | | | | | POSIX_SPAWN_SETSCHEDULER. (GH-9658) Fixes broken build on OpenBSD-current.
* bpo-33721: Make some os.path functions and pathlib.Path methods be tolerant ↵Serhiy Storchaka2018-09-181-22/+1
| | | | | | | | | | to invalid paths. (#7695) Such functions as os.path.exists(), os.path.lexists(), os.path.isdir(), os.path.isfile(), os.path.islink(), and os.path.ismount() now return False instead of raising ValueError or its subclasses UnicodeEncodeError and UnicodeDecodeError for paths that contain characters or bytes unrepresentative at the OS level.
* Convert os.readlink() to Argument Clinic. (GH-8778)Serhiy Storchaka2018-09-171-1/+131
| | | Also convert os.get_blocking() and os.set_blocking().
* bpo-20104: Change the file_actions parameter of os.posix_spawn(). (GH-6725)Serhiy Storchaka2018-09-081-5/+5
| | | | | * Make its default value an empty tuple instead of None. * Make it a keyword-only parameter.
* bpo-20104: Add flag capabilities to posix_spawn (GH-6693)Pablo Galindo2018-09-071-9/+30
| | | Implement the "attributes objects" parameter of `os.posix_spawn` to complete the implementation and fully cover the underlying API.
* bpo-33671 / shutil.copyfile: use memoryview() with dynamic size on Windows ↵Giampaolo Rodola2018-06-191-2/+2
| | | | | | | | | | (#7681) bpo-33671 * use memoryview() with size == file size on Windows, see https://github.com/python/cpython/pull/7160#discussion_r195405230 * release intermediate (sliced) memoryview immediately * replace "OSX" occurrences with "macOS" * add some unittests for copyfileobj()
* bpo-33671: efficient zero-copy for shutil.copy* functions (Linux, OSX and ↵Giampaolo Rodola2018-06-121-1/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Win) (#7160) * have shutil.copyfileobj use sendfile() if possible * refactoring: use ctx manager * add test with non-regular file obj * emulate case where file size can't be determined * reference _copyfileobj_sendfile directly * add test for offset() at certain position * add test for empty file * add test for non regular file dst * small refactoring * leave copyfileobj() alone in order to not introduce any incompatibility * minor refactoring * remove old test * update docstring * update docstring; rename exception class * detect platforms which only support file to socket zero copy * don't run test on platforms where file-to-file zero copy is not supported * use tempfiles * reset verbosity * add test for smaller chunks * add big file size test * add comment * update doc * update whatsnew doc * update doc * catch Exception * remove unused import * add test case for error on second sendfile() call * turn docstring into comment * add one more test * update comment * add Misc/NEWS entry * get rid of COPY_BUFSIZE; it belongs to another PR * update doc * expose posix._fcopyfile() for OSX * merge from linux branch * merge from linux branch * expose fcopyfile * arg clinic for the win implementation * convert path type to path_t * expose CopyFileW * fix windows tests * release GIL * minor refactoring * update doc * update comment * update docstrings * rename functions * rename test classes * update doc * update doc * update docstrings and comments * avoid do import nt|posix modules if unnecessary * set nt|posix modules to None if not available * micro speedup * update description * add doc note * use better wording in doc * rename function using 'fastcopy' prefix instead of 'zerocopy' * use :ref: in rst doc * change wording in doc * add test to make sure sendfile() doesn't get called aymore in case it doesn't support file to file copies * move CopyFileW in _winapi and actually expose CopyFileExW instead * fix line endings * add tests for mode bits * add docstring * remove test file mode class; let's keep it for later when Istart addressing OSX fcopyfile() specific copies * update doc to reflect new changes * update doc * adjust tests on win * fix argument clinic error * update doc * OSX: expose copyfile(3) instead of fcopyfile(3); also expose flags arg to python * osx / copyfile: use path_t instead of char * do not set dst name in the OSError exception in order to remain consistent with platforms which cannot do that (e.g. linux) * add same file test * add test for same file * have osx copyfile() pre-emptively check if src and dst are the same, otherwise it will return immedialtey and src file content gets deleted * turn PermissionError into appropriate SameFileError * expose ERROR_SHARING_VIOLATION in order to raise more appropriate SameFileError * honour follow_symlinks arg when using CopyFileEx * update Misc/NEWS * expose CreateDirectoryEx mock * change C type * CreateDirectoryExW actual implementation * provide specific makedirs() implementation for win * fix typo * skeleton for SetNamedSecurityInfo * get security info for src path * finally set security attrs * add unit tests * mimick os.makedirs() behavior and raise if dst dir exists * set 2 paths for OSError object * set 2 paths for OSError object * expand windows test * in case of exception on os.sendfile() set filename and filename2 exception attributes * set 2 filenames (src, dst) for OSError in case copyfile() fails on OSX * update doc * do not use CreateDirectoryEx() in copytree() if source dir is a symlink (breaks test_copytree_symlink_dir); instead just create a plain dir and remain consistent with POSIX implementation * use bytearray() and readinto() * use memoryview() with bytearray() * refactoring + introduce a new _fastcopy_binfileobj() fun * remove CopyFileEx and other C wrappers * remove code related to CopyFileEx * Recognize binary files in copyfileobj() ...and use fastest _fastcopy_binfileobj() when possible * set 1MB copy bufsize on win; also add a global _COPY_BUFSIZE variable * use ctx manager for memoryview() * update doc * remove outdated doc * remove last CopyFileEx remnants * OSX - use fcopyfile(3) instead of copyfile(3) ...as an extra safety measure: in case src/dst are "exotic" files (non regular or living on a network fs etc.) we better fail on open() instead of copyfile(3) as we're not quite sure what's gonna happen in that case. * update doc
* bpo-20104: Improve error handling and fix a reference leak in ↵Serhiy Storchaka2018-05-011-2/+2
| | | | os.posix_spawn(). (#6332)
* bpo-32556: nt._getfinalpathname, nt._getvolumepathname and nt._getdiskusage ↵Steve Dower2018-02-221-15/+24
| | | | now correctly convert from bytes. (GH-5761)
* bpo-20104: Expose `posix_spawn` in the os module (GH-5109)Pablo Galindo2018-01-291-1/+53
| | | | | Add os.posix_spawn to wrap the low level POSIX API of the same name. Contributed by Pablo Galindo.
* bpo-31368: Expose preadv and pwritev in the os module (#5239)Pablo Galindo2018-01-271-1/+119
|
* return the new file descriptor from os.dup2 (closes bpo-32441) (#5041)Benjamin Peterson2017-12-291-3/+8
|
* bpo-32240: Add the const qualifier to declarations of PyObject* array ↵Serhiy Storchaka2017-12-151-104/+104
| | | | arguments. (#4746)
* bpo-29464: Rename METH_FASTCALL to METH_FASTCALL|METH_KEYWORDS and make (#1955)Serhiy Storchaka2017-07-031-244/+104
| | | | | the bare METH_FASTCALL be used for functions with positional-only parameters.
* bpo-30600: Fix error messages (condition order in Argument Clinic) (#2051)Sylvain2017-06-101-106/+106
| | | | | | | | The function '_PyArg_ParseStack()' and '_PyArg_UnpackStack' were failing (with error "XXX() takes Y argument (Z given)") before the function '_PyArg_NoStackKeywords()' was called. Thus, the latter did not raise its more meaningful error : "XXX() takes no keyword arguments".
* bpo-16500: Don't use string constants for os.register_at_fork() behavior (#1834)Gregory P. Smith2017-05-291-17/+21
| | | | Instead use keyword only arguments to os.register_at_fork for each of the scenarios. Updates the documentation for clarity.
* bpo-16500: Allow registering at-fork handlers (#1715)Antoine Pitrou2017-05-271-1/+49
| | | | | | | | | | | | * bpo-16500: Allow registering at-fork handlers * Address Serhiy's comments * Add doc for new C API * Add doc for new Python-facing function * Add NEWS entry + doc nit
* bpo-25996: Added support of file descriptors in os.scandir() on Unix. (#502)Serhiy Storchaka2017-03-301-2/+2
| | | | os.fwalk() is sped up by 2 times by using os.scandir().
* Issue #29092: Merge 3.6.Xiang Zhang2017-01-221-2/+3
|\
| * Issue #29092: Sync os.stat's doc and docstring on path type.Xiang Zhang2017-01-221-2/+3
| |\
* | | Run Argument Clinic: METH_VARARGS=>METH_FASTCALLVictor Stinner2017-01-171-106/+246
| | | | | | | | | | | | | | | Issue #29286. Run Argument Clinic to get the new faster METH_FASTCALL calling convention for functions using only positional arguments.
* | | Rename _PyArg_ParseStack to _PyArg_ParseStackAndKeywordsVictor Stinner2017-01-171-67/+67
| | | | | | | | | | | | Issue #29286.
* | | Issue #28585: Restored docstring of os._isdir().Serhiy Storchaka2016-11-081-2/+3
|\ \ \ | |/ /
| * | Issue #28585: Restored docstring of os._isdir().Serhiy Storchaka2016-11-081-2/+3
| |\ \ | | |/
| | * Issue #28585: Restored docstring of os._isdir().Serhiy Storchaka2016-11-081-2/+3
| | |
* | | Issue #28586: Converted os.scandir() to Argument Clinic.Serhiy Storchaka2016-11-061-1/+204
|/ /
* | Issue #28156: Export os.getpid() conditionallyBerker Peksag2016-09-151-1/+9
| | | | | | | | Patch by Ed Schouten.
* | Issue #27810: Rerun Argument Clinic on all modulesVictor Stinner2016-09-101-191/+192
| |
* | Issue #27781: Change file system encoding on Windows to UTF-8 (PEP 529)Steve Dower2016-09-081-19/+77
| |
* | Add os.getrandom()Victor Stinner2016-09-061-1/+40
| | | | | | | | | | | | | | Issue #27778: Expose the Linux getrandom() syscall as a new os.getrandom() function. This change is part of the PEP 524.
* | Run Argument Clinic on posixmodule.cVictor Stinner2016-09-061-7/+7
| | | | | | | | Issue #17884.
* | merge 3.5Benjamin Peterson2016-09-051-3/+3
|\ \ | |/
| * do not pretend to support passing a fd to access()Benjamin Peterson2016-09-051-3/+3
| |
* | Issue #27574: Decreased an overhead of parsing keyword arguments in functionsSerhiy Storchaka2016-08-141-125/+187
| | | | | | | | implemented with using Argument Clinic.
* | - Issue #27332: Fixed the type of the first argument of module-level functionsSerhiy Storchaka2016-07-071-320/+316
|\ \ | |/ | | | | generated by Argument Clinic. Patch by Petr Viktorin.
| * Issue #27332: Fixed the type of the first argument of module-level functionsSerhiy Storchaka2016-07-071-318/+314
| | | | | | | | generated by Argument Clinic. Patch by Petr Viktorin.
* | Clarify documentation for os.fspath().Brett Cannon2016-06-091-4/+4
| |
* | Issue #26305: Argument Clinic now uses braces in C code as required by PEP 7.Serhiy Storchaka2016-06-091-161/+321
| |
* | issue27186: add C version of os.fspath(); patch by Jelle ZijlstraEthan Furman2016-06-041-1/+33
| |
* | Issue #23738: Merge 3.5 into 3.6Martin Panter2015-09-091-3/+3
|\ \ | |/
| * Issue #23738: Merge 3.4 into 3.5Martin Panter2015-09-091-3/+3
| |
* | Issue #23530: fix clinic comment.Charles-François Natali2015-08-131-3/+7
|/
* Converted os._getfullpathname() and os._isdir() to Argument Clinic.Serhiy Storchaka2015-05-121-1/+73
|
* Issue #24007: Argument Clinic now writes the format of PyArg_Parse*() at theSerhiy Storchaka2015-04-231-280/+126
| | | | same line as function name.
* Issue #23944: Argument Clinic now wraps long impl prototypes at column 78.Larry Hastings2015-04-141-24/+47
|
* Issue #23668: Regenerates posixmodule.c.h for new ifdefsSteve Dower2015-04-121-5/+5
|