Commit Graph

788 Commits

Author SHA1 Message Date
Larry Hastings 44e2eaab54 Issue #19674: inspect.signature() now produces a correct signature
for some builtins.
2013-11-23 15:37:55 -08:00
Larry Hastings ebdcb50b8a Issue #19730: Argument Clinic now supports all the existing PyArg
"format units" as legacy converters, as well as two new features:
"self converters" and the "version" directive.
2013-11-23 14:54:00 -08:00
Antoine Pitrou 91a7af3e48 Issue #19727: os.utime(..., None) is now potentially more precise under Windows. 2013-11-23 15:23:26 +01:00
Larry Hastings ed4a1c5703 Argument Clinic: rename "self" to "module" for module-level functions. 2013-11-18 09:32:13 -08:00
Christian Heimes 85ba92a0b8 GetVolumePathNameW: downcast bufsize to DWORD 2013-11-18 10:30:42 +01:00
Victor Stinner b03142782c Issue #19437: Fix parse_envlist() of the posix/nt module, don't call
PyMapping_Values() with an exception set, exit immediatly on error.
2013-11-14 21:37:05 +01:00
Victor Stinner 59799a8399 Don't use deprecated function PyUnicode_GET_SIZE()
Replace it with PyUnicode_GET_LENGTH() or PyUnicode_AsUnicodeAndSize()
2013-11-13 14:17:30 +01:00
Victor Stinner 50abf2294e Issue #19437: Fix fsconvert_strdup(), raise a MemoryError on PyMem_Malloc()
failure
2013-11-07 23:56:10 +01:00
Victor Stinner f0a7bac201 Issue #19437: Fix os.statvfs(), handle errors 2013-10-30 18:55:24 +01:00
Tim Golden 781bbebacb Issue13234 Allow listdir to handle extended paths on Windows (Patch by Santoso Wijaya) 2013-10-25 20:24:06 +01:00
Tim Golden 23005084ad Issue4905: use INVALID_FILE_ATTRIBUTES where appropriate. (Patch by Ulrich Eckhardt) 2013-10-25 11:22:37 +01:00
Christian Heimes ebe83f9875 fix compile issue on windows. path is now a struct ptr 2013-10-19 22:36:17 +02:00
Larry Hastings 3182680210 Issue #16612: Add "Argument Clinic", a compile-time preprocessor
for C files to generate argument parsing code.  (See PEP 436.)
2013-10-19 00:09:25 -07:00
Christian Heimes 2582762b1b Issue #19209: Remove import of copyreg from the os module to speed up
interpreter startup. stat_result and statvfs_result are now hard-coded to
reside in the os module.
The patch is based on Victor Stinner's patch.
2013-10-12 01:27:08 +02:00
Victor Stinner b9981ba680 fix a compilation warning in posix_openpty() on "PPC64 AIX 3.x" buildbot 2013-08-28 01:51:06 +02:00
Victor Stinner daf455554b Issue #18571: Implementation of the PEP 446: file descriptors and file handles
are now created non-inheritable; add functions os.get/set_inheritable(),
os.get/set_handle_inheritable() and socket.socket.get/set_inheritable().
2013-08-28 00:53:59 +02:00
Benjamin Peterson 3a7dffa4ce remove support for compiling on systems without getcwd()
Do we need a fallback implementation of getcwd() from 1991 that claims to
support "really old Unix systems"? I don't think so.
2013-08-23 21:01:48 -05:00
Christian Heimes 177b3f9982 Issue #18673: Add O_TMPFILE to os module. O_TMPFILE requires Linux kernel
3.11 or newer. It's only defined on system with 3.11 uapi headers, too.
2013-08-16 14:35:09 +02:00
Larry Hastings e70f2d588a Issue #18667: Add missing "HAVE_FCHOWNAT" symbol to posix._have_functions. 2013-08-12 13:53:20 -04:00
Larry Hastings 00964ed216 Issue #18667: Add missing "HAVE_FCHOWNAT" symbol to posix._have_functions. 2013-08-12 13:49:30 -04:00
Larry Hastings a27b83ad2d Issue #15301: Parsing fd, uid, and gid parameters for builtins
in Modules/posixmodule.c is now far more robust.
2013-08-08 00:19:50 -07:00
Ned Deily ffb32893a3 Issue #17557: merge from 3.3 2013-08-01 21:37:17 -07:00
Ned Deily b5dd6d2287 Issue #17557: Fix os.getgroups() to work with the modified behavior of
getgroups(2) on OS X 10.8.  Original patch by Mateusz Lenik.
2013-08-01 21:21:15 -07:00
Larry Hastings 2e3e593e34 Issue #17899: Fix rare file descriptor leak in os.listdir().
(Done as separate patch from trunk as the code has diverged quite a bit.)
2013-08-01 19:34:46 -07:00
Larry Hastings 4dbc95e258 Issue #17899: Fix rare file descriptor leak in os.listdir(). 2013-08-01 18:18:56 -07:00
Tim Golden 6b528067c5 Issue #9035: os.path.ismount now recognises volumes mounted below
a drive root on Windows. Original patch by Atsuo Ishimoto.
2013-08-01 12:44:00 +01:00
Christian Heimes abe639f115 Initialize utime with 0. It fixes a couple of compiler warnung:
warning: 'utime.mtime_ns' may be used uninitialized in this function [-Wmaybe-uninitialized]
2013-08-01 00:12:06 +02:00
Christian Heimes b3c872403d Initialize utime with 0. It fixes a couple of compiler warnung:
warning: 'utime.mtime_ns' may be used uninitialized in this function [-Wmaybe-uninitialized]
2013-08-01 00:08:16 +02:00
Victor Stinner 1c8f059019 Issue #18520: Add a new PyStructSequence_InitType2() function, same than
PyStructSequence_InitType() except that it has a return value (0 on success,
-1 on error).

 * PyStructSequence_InitType2() now raises MemoryError on memory allocation failure
 * Fix also some calls to PyDict_SetItemString(): handle error
2013-07-22 22:24:54 +02:00
Victor Stinner d85032e25d (Merge 3.3) Fix posix_chflags(): return_value was uninitialized when
follow_symlinks=False whereas the fchmodat() function is not avaialble.
2013-07-18 23:58:08 +02:00
Victor Stinner 45e90394e7 Fix posix_chflags(): return_value was uninitialized when follow_symlinks=False
whereas the fchmodat() function is not avaialble.
2013-07-18 23:57:35 +02:00
Victor Stinner 6ce0dbf460 Fix a compiler warning in posix_sendfile() on FreeBSD:
Modules/posixmodule.c: In function 'posix_sendfile':
Modules/posixmodule.c:7700: warning: ISO C90 forbids mixed declarations and code
2013-07-07 16:32:36 +02:00
Victor Stinner b64049183c Issue #18203: Replace malloc() with PyMem_Malloc() in Python modules
Replace malloc() with PyMem_Malloc() when the GIL is held, or with
PyMem_RawMalloc() otherwise.
2013-07-07 16:21:41 +02:00
Victor Stinner dd3a6a5533 Fix os.confstr(): the result type of the C function is size_t, not int 2013-06-25 23:13:47 +02:00
Victor Stinner 14b9b11098 If MS_WIN64 is defined, MS_WINDOWS is also defined: #ifdef can be simplified. 2013-06-25 00:37:25 +02:00
Christian Heimes 99d6135a15 Define S_IFMT and S_IFLNK in pyport.h so posixmodule.c can use named constants instead
of arbitrary looking numbers.
2013-06-23 23:56:05 +02:00
Richard Oudkerk ac0ad884d1 Issue #17931: Resolve confusion on Windows between pids and process handles. 2013-06-05 23:29:30 +01:00
Victor Stinner 072318b178 Issue #13772: Use syntax for literal wchar_t character 2013-06-05 02:07:46 +02:00
Victor Stinner 31b3b92f7a Issue #13772: Mark helper functions as private (static)
Cleanup also the code to follow the Python coding style (PEP 7).
2013-06-05 01:49:17 +02:00
Victor Stinner e87267dc6e Issue #13772: Fix a compiler warning on Windows 2013-06-05 01:30:25 +02:00
Victor Stinner 5a4367600f Issue #13772: fix _check_dirA(): call *A() functions, not *W() functions 2013-06-05 00:37:12 +02:00
Victor Stinner e7e7eba108 Issue #13772: Fix compiler warnings on Windows 2013-06-05 00:35:54 +02:00
Victor Stinner 0b81111b18 (Merge 3.3) Close #18109: os.uname() now decodes fields from the locale
encoding, and socket.gethostname() now decodes the hostname from the locale
encoding, instead of using the UTF-8 encoding in strict mode.
2013-06-03 22:09:14 +02:00
Victor Stinner a534fc4b3b Close #18109: os.uname() now decodes fields from the locale encoding, and
socket.gethostname() now decodes the hostname from the locale encoding, instead
of using the UTF-8 encoding in strict mode.
2013-06-03 22:07:27 +02:00
Jason R. Coombs 3a09286790 Issue #13772: Restored directory detection of targets in `os.symlink` on Windows, which was temporarily removed in Python 3.2.3 due to an incomplete implementation. The implementation now works even if the symlink is created in a location other than the current directory. 2013-05-27 23:21:28 -04:00
Benjamin Peterson 3b08a2978e indicate that read/write work with bytes (closes #18009) 2013-05-24 14:35:57 -07:00
Jason R. Coombs 8f1a8e32b1 Merge with 3.3 2013-05-27 23:26:36 -04:00
Benjamin Peterson e08b583d88 merge 3.3 2013-05-24 14:36:04 -07:00
Charles-Francois Natali 74ca886788 Issue #17917: Use PyModule_AddIntMacro() instead of PyModule_AddIntConstant()
when applicable.
2013-05-20 19:13:19 +02:00
Charles-Francois Natali 7c4f8dacf4 Issue #17914: We can now inline _bsd_cpu_count(). 2013-05-20 17:40:32 +02:00