Serhiy Storchaka
988b9bcd88
Issue #26117 : The os.scandir() iterator now closes file descriptor not only
...
when the iteration is finished, but when it was failed with error.
2016-02-08 17:56:36 +02:00
Serhiy Storchaka
ef1585eb9a
Issue #25923 : Added more const qualifiers to signatures of static and private functions.
2015-12-25 20:01:53 +02:00
Serhiy Storchaka
2d06e84455
Issue #25923 : Added the const qualifier to static constant arrays.
2015-12-25 19:53:18 +02:00
Serhiy Storchaka
8bc2b4d522
Issue #25890 : Removed yet one unused variable.
2015-12-18 10:06:58 +02:00
Serhiy Storchaka
9b3a2eec1c
Issues #25890 , #25891 , #25892 : Removed unused variables in Windows code.
...
Reported by Alexander Riccio.
2015-12-18 10:03:13 +02:00
Victor Stinner
9fdaff30db
Merge 3.5
2015-12-14 00:22:10 +01:00
Victor Stinner
e847d7170d
Issue #25846 : Fix usage of Py_ARRAY_LENGTH() in win32_wchdir() (new try)
2015-12-14 00:21:50 +01:00
Victor Stinner
6b8f0c892a
(Merge 3.5) Issue #25846 : Fix usage of Py_ARRAY_LENGTH() in win32_wchdir()
2015-12-13 21:41:12 +01:00
Victor Stinner
ed53782ed5
Issue #25846 : Fix usage of Py_ARRAY_LENGTH() in win32_wchdir()
2015-12-13 21:40:26 +01:00
Victor Stinner
5ebae87628
Issue #25207 , #14626 : Fix my commit.
...
It doesn't work to use #define XXX defined(YYY)" and then "#ifdef XXX"
to check YYY.
2015-09-22 01:29:33 +02:00
Victor Stinner
4552ced916
Issue #25207 , #14626 : Fix ICC compiler warnings in posixmodule.c
...
Replace "#if XXX" with #ifdef XXX".
2015-09-21 22:37:15 +02:00
Victor Stinner
024364a89a
Merge 3.5 (os.waitpid)
2015-09-15 10:24:27 +02:00
Victor Stinner
d3ffd32767
Issue #25118 : Fix a regression of Python 3.5.0 in os.waitpid() on Windows.
...
Add an unit test on os.waitpid()
2015-09-15 10:11:03 +02:00
Martin Panter
3f560c16e5
Merge 3.5 into 3.6
2015-09-09 06:28:08 +00:00
Martin Panter
6088b7bd49
Merge 3.4 into 3.5
2015-09-09 06:27:43 +00:00
Martin Panter
9499413508
os.sendfile(headers=None, trailers=None) arguments are not actually accepted
...
Needs to be tested on a BSD.
2015-09-09 05:29:24 +00:00
Martin Panter
a122b5a1fd
Issue #23738 : Merge 3.5 into 3.6
2015-09-09 03:01:17 +00:00
Martin Panter
0ff89099c7
Issue #23738 : Merge 3.4 into 3.5
2015-09-09 01:56:53 +00:00
Martin Panter
bf19d16950
Issue #23738 : Document and test actual keyword parameter names
...
Also fix signature because os.utime(..., ns=None) is not allowed.
2015-09-09 01:01:13 +00:00
Serhiy Storchaka
56f6e76c68
Issue #15989 : Fixed some scarcely probable integer overflows.
...
It is very unlikely that they can occur in real code for now.
2015-09-06 21:25:30 +03:00
Victor Stinner
fed0931de4
Merge 3.5 (ICC)
2015-09-03 21:34:03 +02:00
Victor Stinner
5b6917e60d
Merge 3.4 (ICC)
2015-09-03 21:32:44 +02:00
Victor Stinner
528a9ab1f0
Don't use defined() in C preprocessor macros
...
The ICC compiler doesn't seem to support defined() in macro expansion. Example
of warning:
warning #3199 : "defined" is always false in a macro expansion in Microsoft mode
2015-09-03 21:30:26 +02:00
Charles-François Natali
80d62e628b
Issue #23530 : fix clinic comment.
2015-08-13 20:37:08 +01:00
Charles-François Natali
dc87e4b885
Issue #23530 : Improve os.cpu_count() description.
...
Patch by Julian Taylor.
2015-07-13 21:01:39 +01:00
Serhiy Storchaka
f0b5015edb
Converted os._getfullpathname() and os._isdir() to Argument Clinic.
2015-05-13 00:52:39 +03:00
Victor Stinner
cc0bbbc781
(Merge 3.4) Issue #9246 : On POSIX, os.getcwd() now supports paths longer than
...
1025 bytes. Patch written by William Orr.
2015-04-25 00:21:52 +02:00
Victor Stinner
4403d7def0
Issue #9246 : On POSIX, os.getcwd() now supports paths longer than 1025 bytes
...
Patch written by William Orr.
2015-04-25 00:16:10 +02:00
Christian Heimes
8714cfdc4a
Get rid of unused-but-set-variable warning. len and len2 should be equal and len2 is technically more correct, too.
2015-04-21 10:57:41 +02:00
Serhiy Storchaka
7e9d1d1a1b
Issue #23908 : os functions now reject paths with embedded null character
...
on Windows instead of silently truncate them.
Removed no longer used _PyUnicode_HasNULChars().
2015-04-20 10:12:28 +03:00
Serhiy Storchaka
2b0d2007a1
Issue #23908 : os functions now reject paths with embedded null character
...
on Windows instead of silently truncate them.
2015-04-20 09:53:58 +03:00
Larry Hastings
89964c48d1
Issue #23944 : Argument Clinic now wraps long impl prototypes at column 78.
2015-04-14 18:07:59 -04:00
Benjamin Peterson
5646de47e1
make DirEntryType and ScandirIteratorType static ( closes #23918 )
2015-04-12 17:56:34 -04:00
Steve Dower
a1c7e727c8
Issue #23668 : Suppresses invalid parameter handler around chsize calls.
2015-04-12 00:26:43 -04:00
Steve Dower
8fc8980c96
Issue #23524 : Replace _PyVerify_fd function with calls to _set_thread_local_invalid_parameter_handler.
2015-04-12 00:26:27 -04:00
Steve Dower
fe0a41aae4
Issue #23668 : Adds support for os.truncate and os.ftruncate on Windows
2015-03-20 19:50:46 -07:00
Serhiy Storchaka
a4c6badfdd
Issue #23501 : #include "clinic/posixmodule.c.h" was in the section skipped on Windows.
2015-04-04 23:35:52 +03:00
Serhiy Storchaka
1009bf18b3
Issue #23501 : Argumen Clinic now generates code into separate files by default.
2015-04-03 23:53:51 +03:00
Larry Hastings
0759f84d62
Issue #23500 : Argument Clinic is now smarter about generating the "#ifndef"
...
(empty) definition of the methoddef macro: it's only generated once, even
if Argument Clinic processes the same symbol multiple times, and it's emitted
at the end of all processing rather than immediately after the first use.
2015-04-03 13:09:02 -07:00
Victor Stinner
e134a7fe36
Issue #23752 : _Py_fstat() is now responsible to raise the Python exception
...
Add _Py_fstat_noraise() function when a Python exception is not welcome.
2015-03-30 10:09:31 +02:00
Victor Stinner
dca028b86a
Issue #22117 : Fix os.utime(), it now rounds the timestamp towards minus
...
infinity (-inf) instead of rounding towards zero.
Replace _PyTime_ROUND_DOWN with _PyTime_ROUND_FLOOR.
2015-03-30 01:02:57 +02:00
Steve Dower
2ea51c98db
Closes #9445 : Removes detection of GetFinalPathNameByHandle
2015-03-20 21:49:12 -07:00
Victor Stinner
66aab0c4b5
Issue #23708 : Add _Py_read() and _Py_write() functions to factorize code handle
...
EINTR error and special cases for Windows.
These functions now truncate the length to PY_SSIZE_T_MAX to have a portable
and reliable behaviour. For example, read() result is undefined if counter is
greater than PY_SSIZE_T_MAX on Linux.
2015-03-19 22:53:20 +01:00
Victor Stinner
a555cfcb73
Issue #23694 : Enhance _Py_open(), it now raises exceptions
...
* _Py_open() now raises exceptions on error. If open() fails, it raises an
OSError with the filename.
* _Py_open() now releases the GIL while calling open()
* Add _Py_open_noraise() when _Py_open() cannot be used because the GIL is not
held
2015-03-18 00:22:14 +01:00
Victor Stinner
35a97c0bed
Issue #22524 : Fix os.scandir() for platforms which don't have a d_type field in
...
the dirent structure (ex: OpenIndiana).
2015-03-08 02:59:09 +01:00
Victor Stinner
6036e4431d
Issue #22524 : New os.scandir() function, part of the PEP 471: "os.scandir()
...
function -- a better and faster directory iterator". Patch written by Ben
Hoyt.
2015-03-08 01:58:04 +01:00
Steve Dower
d81431f587
Issue #23524 : Replace _PyVerify_fd function with calling _set_thread_local_invalid_parameter_handler on every thread.
2015-03-06 14:47:02 -08:00
Serhiy Storchaka
06a13f81ea
Issue #23152 : Move declarations back to posixmodule.c.
...
Declarations of Windows-specific auxilary functions need Windows types
from windows.h. Instead of including windows.h in Python.h and making
it available to all Windows users, it is simpler and safer just move
declarations to the single file that needs them.
2015-02-22 21:34:54 +02:00
Serhiy Storchaka
12ebbc74f1
Issue #23152 : Move declaration into a header and exclude from stable API.
2015-02-22 19:39:36 +02:00
Steve Dower
bf1f376b3e
Issue #23152 : Renames time_t_to_FILE_TIME to _Py_time_t_to_FILE_TIME, removes unused struct win32_stat and return value
2015-02-21 15:26:02 -08:00
Steve Dower
a2af1a5a5a
Issue #23152 : Renames attribute_data_to_stat to _Py_attribute_data_to_stat
2015-02-21 10:04:10 -08:00
Steve Dower
f2f373f593
Issue #23152 : Implement _Py_fstat() to support files larger than 2 GB on Windows.
...
fstat() may fail with EOVERFLOW on files larger than 2 GB because the file size type is an signed 32-bit integer.
2015-02-21 08:44:05 -08:00
Serhiy Storchaka
4d0d982985
Issue #23446 : Use PyMem_New instead of PyMem_Malloc to avoid possible integer
...
overflows. Added few missed PyErr_NoMemory().
2015-02-16 13:33:32 +02:00
Serhiy Storchaka
1a1ff29659
Issue #23446 : Use PyMem_New instead of PyMem_Malloc to avoid possible integer
...
overflows. Added few missed PyErr_NoMemory().
2015-02-16 13:28:22 +02:00
Charles-François Natali
6e6c59b508
Issue #23285 : PEP 475 -- Retry system calls failing with EINTR.
2015-02-07 13:27:50 +00:00
Gregory P. Smith
bd4976bbd3
Always #define _PyLong_FromDev as we always need it to compile rather than
...
only defining it when HAVE_MKNOD && HAVE_MAKEDEV are true.
This "oops" issue reported by John E. Malmberg on core-mentorship.
(what kinds of systems don't HAVE_MKNOD && HAVE_MAKEDEV?)
2015-01-28 16:08:07 -08:00
Gregory P. Smith
702dada2c5
Always #define _PyLong_FromDev as we always need it to compile rather than
...
only defining it when HAVE_MKNOD && HAVE_MAKEDEV are true.
This "oops" issue reported by John E. Malmberg on core-mentorship.
(what kinds of systems don't HAVE_MKNOD && HAVE_MAKEDEV?)
2015-01-28 16:07:52 -08:00
Steve Dower
7d0e0c9f7b
Closes #23253 : Delay-load ShellExecute
2015-01-24 08:18:24 -08:00
Serhiy Storchaka
acdb7c158a
Issue #23098 : 64-bit dev_t is now supported in the os module.
2015-01-18 11:17:39 +02:00
Serhiy Storchaka
b2653b344e
Issue #23098 : 64-bit dev_t is now supported in the os module.
2015-01-18 11:12:11 +02:00
Serhiy Storchaka
56a6d855e2
Removed duplicated words in in comments and docs.
2014-12-01 18:28:43 +02:00
Steve Dower
65e4cb10d9
Issue #22919 : Windows build updated to support VC 14.0 (Visual Studio 2015), which will be used for the official 3.5 release.
2014-11-22 12:54:57 -08:00
Victor Stinner
cbc18f328c
Issue #9647 : os.confstr() ensures that the second call to confstr() returns the
...
same length.
2014-12-05 22:51:51 +01:00
Serhiy Storchaka
83000a490a
Removed duplicated words in in comments and docs.
2014-12-01 18:30:14 +02:00
Victor Stinner
f427a14156
Issue #22592 : Drop support of the Borland C compiler to build Python
...
The distutils module still supports it to build extensions.
2014-10-22 12:33:23 +02:00
Georg Brandl
bfd7881aa6
#22568 : merge with 3.4
2014-10-12 08:45:26 +02:00
Georg Brandl
e1a7d9dbf5
Closes #22568 : fix UTIME_TO_* macros in posixmodule for rare cases.
2014-10-12 08:45:15 +02:00
Victor Stinner
d42c4282b9
Closes #22579 : Fix posixmodule.c to support any C compiler on Windows
2014-10-10 00:09:47 +02:00
Victor Stinner
67e2e6d600
(Merge 3.4) Issue #22568 : Fix compilation of posixmodule.c with Open Watcom:
...
rename "utime" variable to "ut" to avoid conflict with the C utime() function.
Patch written by Jeffrey Armstrong.
2014-10-09 13:53:45 +02:00
Victor Stinner
484df0075a
Issue #22568 : Fix compilation of posixmodule.c with Open Watcom: rename "utime"
...
variable to "ut" to avoid conflict with the C utime() function. Patch written
by Jeffrey Armstrong.
2014-10-09 13:52:31 +02:00
Victor Stinner
ec39e26881
(Merge 3.4) Issue #22396 : On 32-bit AIX platform, don't expose
...
os.posix_fadvise() nor os.posix_fallocate() because their prototypes in system
headers are wrong.
2014-09-30 12:35:58 +02:00
Victor Stinner
d6b176905d
Issue #22396 : On 32-bit AIX platform, don't expose os.posix_fadvise() nor
...
os.posix_fallocate() because their prototypes in system headers are wrong.
2014-09-30 12:20:05 +02:00
Serhiy Storchaka
d8a1447c99
Issue #22215 : Now ValueError is raised instead of TypeError when str or bytes
...
argument contains not permitted null character or byte.
2014-09-06 20:07:17 +03:00
Victor Stinner
706768c687
Issue #22156 : Fix some "comparison between signed and unsigned integers"
...
compiler warnings in the Modules/ subdirectory.
2014-08-16 01:03:39 +02:00
Larry Hastings
a73cb8a6b8
Issue #22120 : For functions using an unsigned integer return converter,
...
Argument Clinic now generates a cast to that type for the comparison
to -1 in the generated code. (This supresses a compilation warning.)
2014-08-05 19:55:21 +10:00
Larry Hastings
b1dc112dca
More fixes for the unhappy AMD FreeBSD 9 buildbot. Fingers crossed.
2014-08-05 16:06:16 +10:00
Larry Hastings
548095cd4f
Fix for AMD FreeBSD 9 buildbot (hopefully), broken by my last checkin.
2014-08-05 16:00:03 +10:00
Larry Hastings
2f93635d34
Issue #20170 : Convert posixmodule to use Argument Clinic.
2014-08-05 14:04:04 +10:00
Victor Stinner
1db9e7bb19
Issue #22054 : Add os.get_blocking() and os.set_blocking() functions to get and
...
set the blocking mode of a file descriptor (False if the O_NONBLOCK flag is
set, True otherwise). These functions are not available on Windows.
2014-07-29 22:32:47 +02:00
Victor Stinner
b28ed92dd0
Issue #21932 : os.read() now uses a :c:func:`Py_ssize_t` type instead of
...
:c:type:`int` for the size to support reading more than 2 GB at once. On
Windows, the size is truncted to INT_MAX. As any call to os.read(), the OS
may read less bytes than the number of requested bytes.
2014-07-11 17:04:41 +02:00
Zachary Ware
63f277b694
Issue #21741 : Add st_file_attributes to os.stat_result on Windows.
...
Patch by Ben Hoyt.
2014-06-19 09:46:37 -05:00
Tim Golden
0321cf2550
Issue18314 Allow unlink to remove junctions. Includes support for creating junctions. Patch by Kim Gräsman
2014-05-05 19:46:17 +01:00
Tim Golden
fbf963c064
Backed out changeset: 17df50df62c7
2014-04-27 18:35:36 +01:00
Tim Golden
4675d798bf
Issue #18314 os.unlink will now remove junction points on Windows. Patch by Kim Gräsman.
2014-04-27 18:00:10 +01:00
doko@ubuntu.com
4a173bc4ed
Fixes for KFreeBSD and the Hurd:
...
- Issue #21274 : Define PATH_MAX for GNU/Hurd in Python/pythonrun.c.
- Issue #21276 : posixmodule: Don't define USE_XATTRS on KFreeBSD and the Hurd.
- Issue #21275 : Fix a socket test on KFreeBSD.
2014-04-17 19:47:16 +02:00
Victor Stinner
3c1b379ebd
Issue #20320 : select.select() and select.kqueue.control() now round the timeout
...
aways from zero, instead of rounding towards zero.
It should make test_asyncio more reliable, especially test_timeout_rounding() test.
2014-02-17 00:02:43 +01:00
Benjamin Peterson
e18e787e70
merge 3.3 ( #20594 )
2014-02-11 10:19:12 -05:00
Benjamin Peterson
932bba33f2
avoid name clash with posix_close ( closes #20594 )
2014-02-11 10:16:16 -05:00
Larry Hastings
b082731fbb
Issue #20517 : Functions in the os module that accept two filenames
...
now register both filenames in the exception on failure.
This required adding new C API functions allowing OSError exceptions
to reference two filenames instead of one.
2014-02-09 22:05:19 -08:00
Serhiy Storchaka
dfe98a102e
Issue #20437 : Fixed 22 potential bugs when deleting objects references.
2014-02-09 13:46:20 +02:00
Serhiy Storchaka
505ff755d7
Issue #20437 : Fixed 21 potential bugs when deleting objects references.
2014-02-09 13:33:53 +02:00
Larry Hastings
2623c8c23c
Issue #20530 : Argument Clinic's signature format has been revised again.
...
The new syntax is highly human readable while still preventing false
positives. The syntax also extends Python syntax to denote "self" and
positional-only parameters, allowing inspect.Signature objects to be
totally accurate for all supported builtins in Python 3.4.
2014-02-08 22:15:29 -08:00
Larry Hastings
7726ac9163
#Issue 20456: Several improvements and bugfixes for Argument Clinic,
...
including correctly generating code for Clinic blocks inside C
preprocessor conditional blocks.
2014-01-31 22:03:12 -08:00
Larry Hastings
581ee3618c
Issue #20326 : Argument Clinic now uses a simple, unique signature to
...
annotate text signatures in docstrings, resulting in fewer false
positives. "self" parameters are also explicitly marked, allowing
inspect.Signature() to authoritatively detect (and skip) said parameters.
Issue #20326 : Argument Clinic now generates separate checksums for the
input and output sections of the block, allowing external tools to verify
that the input has not changed (and thus the output is not out-of-date).
2014-01-28 05:00:08 -08:00
Larry Hastings
5c66189e88
Issue #20189 : Four additional builtin types (PyTypeObject,
...
PyMethodDescr_Type, _PyMethodWrapper_Type, and PyWrapperDescr_Type)
have been modified to provide introspection information for builtins.
Also: many additional Lib, test suite, and Argument Clinic fixes.
2014-01-24 06:17:25 -08:00
Benjamin Peterson
dc3cce077d
merge 3.3 ( #17811 )
2014-01-18 22:57:05 -05:00
Benjamin Peterson
e83ed43281
improve description of buffers argument for readv/writev ( closes #17811 )
...
Patch by Nikolaus Rath.
2014-01-18 22:54:59 -05:00
Larry Hastings
2a727916c5
Issue #20226 : Major improvements to Argument Clinic.
...
* You may now specify an expression as the default value for a
parameter! Example: "sys.maxsize - 1". This support is
intentionally quite limited; you may only use values that
can be represented as static C values.
* Removed "doc_default", simplified support for "c_default"
and "py_default". (I'm not sure we still even need
"py_default", but I'm leaving it in for now in case a
use presents itself.)
* Parameter lines support a trailing '\\' as a line
continuation character, allowing you to break up long lines.
* The argument parsing code generated when supporting optional
groups now uses PyTuple_GET_SIZE instead of PyTuple_GetSize,
leading to a 850% speedup in parsing. (Just kidding, this
is an unmeasurable difference.)
* A bugfix for the recent regression where the generated
prototype from pydoc for builtins would be littered with
unreadable "=<object ...>"" default values for parameters
that had no default value.
* Converted some asserts into proper failure messages.
* Many doc improvements and fixes.
2014-01-16 11:32:01 -08:00
Benjamin Peterson
463753831c
fix build when SCHED_SPORADIC is defined ( closes #20217 )
2014-01-10 09:22:40 -06:00
Victor Stinner
149e540adf
(Merge 3.3) Issue #20113 : os.readv() and os.writev() now raise an OSError
...
exception on error instead of returning -1.
2014-01-08 15:26:12 +01:00
Victor Stinner
57ddf78b6b
Issue #20113 : os.readv() and os.writev() now raise an OSError exception on
...
error instead of returning -1.
2014-01-08 15:21:28 +01:00
Larry Hastings
61272b77b0
Issue #19273 : The marker comments Argument Clinic uses have been changed
...
to improve readability.
2014-01-07 12:41:53 -08:00
Christian Heimes
af01f66817
Issue #16136 : Remove VMS support and VMS-related code
2013-12-21 16:19:10 +01:00
Victor Stinner
f326665fe7
Fix os.listdir(): _Py_dup() already raises an exception on error, no need to
...
raise a new exception
2013-12-19 13:24:49 +01:00
R David Murray
3c2a178af2
Merge: #19970 : Fix some comment typos.
2013-12-13 20:53:26 -05:00
R David Murray
fc06999e0b
#19970 : Fix some comment typos.
...
Report and patch by Vajrasky Kok.
2013-12-13 20:52:19 -05:00
doko@ubuntu.com
ca616a2709
- Issue #19736 : Add module-level statvfs constants defined for GNU/glibc
...
based systems.
2013-12-08 15:23:07 +01:00
Victor Stinner
000de53624
Issue #19752 : Fix "HAVE_DEV_PTMX" implementation of os.openpty()
...
Regression introduced by the implementation of the PEP 446 (non-inheritable
file descriptors by default).
master_fd must be set non-inheritable after the creation of the slave_fd,
otherwise grantpt(master_fd) fails with EPERM (errno 13).
2013-11-25 23:19:58 +01:00
Victor Stinner
7587507a97
Issue #19636 : Fix usage of MAX_PATH in posixmodule.c
2013-11-24 19:23:25 +01:00
Victor Stinner
6edddfaf5b
Issue #19636 : Fix posix__getvolumepathname(), raise an OverflowError if
...
the length doesn't fit in an DWORD
2013-11-24 19:22:57 +01:00
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