Commit Graph

818 Commits

Author SHA1 Message Date
Serhiy Storchaka 56a6d855e2 Removed duplicated words in in comments and docs. 2014-12-01 18:28:43 +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 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 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
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