summaryrefslogtreecommitdiffstats
path: root/Modules/clinic/posixmodule.c.h
Commit message (Collapse)AuthorAgeFilesLines
* 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-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-37206: Unrepresentable default values no longer represented as None. ↵Serhiy Storchaka2019-09-141-13/+12
| | | | | | | (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-37034: Display argument name on errors with keyword arguments with ↵Rémi Lapeyre2019-08-291-8/+8
| | | | Argument Clinic. (GH-13593)
* 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)
* 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-26826: Expose copy_file_range in the os module (GH-7255)Pablo Galindo2019-05-311-1/+107
|
* 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-31904: Add posix module support for VxWorks (GH-12118)pxinwr2019-05-211-5/+5
|
* bpo-36085: Enable better DLL resolution on Windows (GH-12302)Steve Dower2019-03-291-1/+97
|
* bpo-36127: Argument Clinic: inline parsing code for keyword parameters. ↵Serhiy Storchaka2019-03-141-205/+1346
| | | | (GH-12058)
* Remove stray quote in os.replace docstring. (GH-11556)Anthony Sottile2019-02-131-2/+2
|
* 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-35582: Argument Clinic: inline parsing code for positional parameters. ↵Serhiy Storchaka2019-01-111-57/+470
| | | | (GH-11313)
* bpo-23867: Argument Clinic: inline parsing code for a single positional ↵Serhiy Storchaka2018-12-251-26/+118
| | | | parameter. (GH-9689)
* 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
| |