Armin Rigo
b6aa856f25
Patch #1009075 , bug #952953 : allow execve with empty 2nd argument
2004-09-27 19:54:33 +00:00
Tim Peters
d311538a93
win32_urandom(): There's no need to copy the generated byte string, so
...
don't.
2004-08-30 17:36:46 +00:00
Tim Peters
9b279a8df4
win32_urandom(): pass the function name to PyArg_ParseTuple, for better
...
error msgs.
2004-08-30 17:10:53 +00:00
Tim Peters
51eba6115d
win32_urandom(): Raise ValueError if the argument is negative.
2004-08-30 17:08:02 +00:00
Tim Peters
4ad8217ae9
win32_urandom(): Rewrite to Python C standards (hard tabs, function name
...
in first column, no parens around return value).
2004-08-30 17:02:04 +00:00
Martin v. Löwis
dc3883f671
Patch #934711 : Expose platform-specific entropy.
2004-08-29 15:46:35 +00:00
Martin v. Löwis
969297f488
Return unicode strings from _getfullpathname even on W9X. Fixes #924703 .
2004-06-15 18:49:58 +00:00
Neal Norwitz
2adf210993
Ensure path is initialized to prevent freeing random memory
...
(reported by Thomas Heller). If have_unicode_filename is set,
path looks like it will not be used, so there's no need to free it.
2004-06-09 01:46:02 +00:00
Neal Norwitz
9665271f92
Plug a few memory leaks in utime(). path is allocated from within
...
PyArg_ParseTuple() since the format is "et" This change should
be reviewed carefully.
Bugfix candidate.
2004-06-06 20:40:27 +00:00
Martin v. Löwis
d8948725d2
Patch #954115 : Fix os.stat handling of UNC roots.
...
Will backport to 2.3.
2004-06-02 09:57:56 +00:00
Mark Hammond
2d5914b17e
Fix [ 947405 ] os.utime() raises bad exception for unicode filenames
2004-05-04 08:10:37 +00:00
Andrew MacIntyre
69e18c9344
OS/2 has support for spawnvp() and spawnvpe() in the C libraries supplied
...
with major C compilers (VACPP, EMX+gcc and [Open]Watcom).
Also tidy up the export of spawn*() symbols in the os module to match what
is found/implemented.
2004-04-04 07:11:43 +00:00
Andrew MacIntyre
da4d6cb573
OS/2 VACPP build updates/fixes
2004-03-29 11:53:38 +00:00
Neal Norwitz
94f1d71d70
Fix docstrings to mention the correct function
2004-02-16 01:26:34 +00:00
Skip Montanaro
7befb9966e
remove support for missing ANSI C header files (limits.h, stddef.h, etc).
2004-02-10 16:50:21 +00:00
Skip Montanaro
ce59c04127
Remove support for SunOS 4.
...
Remove BAD_EXEC_PROTOYPE (leftover from IRIX 4 demolition).
2004-01-17 14:19:44 +00:00
Andrew M. Kuchling
8135fd5365
Make parameter names in docstring more mnemonic
2004-01-16 13:18:42 +00:00
Hye-Shik Chang
2b2c97356f
FIx unicodefilename support of posix.uname(). This fixes test_unicode_file
...
failure on FreeBSD.
2004-01-04 13:54:25 +00:00
Mark Hammond
817c929bba
Fix [ 846133 ] os.chmod/os.utime/shutil do not work with unicode filenames
2003-12-03 01:22:38 +00:00
Martin v. Löwis
49ee14dac5
Patch #839038 : Add getsid(2).
2003-11-10 06:35:36 +00:00
Martin v. Löwis
9ad853bc37
Patch #788404 : ignore "b" and "t" mode modifiers in posix_popen.
...
Fixes #703198 . Backported to 2.3.
2003-10-31 10:01:53 +00:00
Walter Dörwald
f0dfc7ac5c
Fix a bunch of typos in documentation, docstrings and comments.
...
(From SF patch #810751 )
2003-10-20 14:01:56 +00:00
Raymond Hettinger
8ae4689657
Simplify and speedup uses of Py_BuildValue():
...
* Py_BuildValue("(OOO)",a,b,c) --> PyTuple_Pack(3,a,b,c)
* Py_BuildValue("()",a) --> PyTuple_New(0)
* Py_BuildValue("O", a) --> Py_INCREF(a)
2003-10-12 19:09:37 +00:00
Martin v. Löwis
212ede6cbf
Patch #730597 : Disable POPEN for RTEMS.
2003-09-20 11:20:30 +00:00
Martin v. Löwis
1b699a5f00
Patch #790000 : Allow os.access to handle Unicode file name.
2003-09-12 16:25:38 +00:00
Raymond Hettinger
b5cb66542d
SF patch #798534 : Windows os.popen needlessly gets a reference to tuple ()
...
(Contributed by Andrew Gaul.)
Fixes a minor leak.
2003-09-01 22:25:41 +00:00
Mark Hammond
7edd0a9b21
Demonstrate and fix [ 783882 ] os.lstat crashes with Unicode filename.
...
Will also check in on the 2.3 branch.
2003-08-06 02:46:58 +00:00
Brett Cannon
807413d3b2
Clarify docstring for symlink.
2003-06-11 00:18:09 +00:00
Martin v. Löwis
c16f3bd8a3
Patch #708495 : Port more stuff to OpenVMS.
2003-05-03 09:14:54 +00:00
Tim Peters
11b2306960
Enable os.fsync() for Windows, mapping it to MS's _commit() there. The
...
docs here are best-guess: the MS docs I could find weren't clear, and
some even claimed _commit() has no effect on Win32 systems (which is
easily shown to be false just by trying it).
2003-04-23 02:39:17 +00:00
Andrew MacIntyre
baf25b06a6
apply Mark Hammond's PEP 311 changes to the EMX ripoff of the Windows
...
popen[234]() code
2003-04-21 14:22:36 +00:00
Andrew MacIntyre
75e0145bb5
- DosSetExtLIBPATH objects to a NULL pointer, but a pointer to a NULL
...
string does what is expected (ie unset [BEGIN|END]LIBPATH)
- set the size of the DosQuerySysInfo buffer correctly; it was safe,
but incorrect (allowing a 1 element overrun)
2003-04-21 14:19:51 +00:00
Mark Hammond
8d98d2cb95
New PyGILState_ API - implements pep 311, from patch 684256.
2003-04-19 15:41:53 +00:00
Martin v. Löwis
b9a0f91218
Rename LONG_LONG to PY_LONG_LONG. Fixes #710285 .
2003-03-29 10:06:18 +00:00
Neal Norwitz
2deaddb0d6
Get rid of warning on IRIX
2003-03-21 03:08:31 +00:00
Neal Norwitz
b59798b157
Add support for os.openpty() on AIX which uses /dev/ptc instead of /dev/ptmx.
2003-03-21 01:43:31 +00:00
Martin v. Löwis
7a924e6eb2
Patch #696645 : Remove VMS code with uncertain authorship.
2003-03-05 14:15:21 +00:00
Just van Rossum
6a42183967
os.listdir(): Fall back to the original byte string if conversion to unicode
...
fails, as discussed in patch #683592 .
2003-03-04 19:30:44 +00:00
Just van Rossum
2fe07fda2d
plugged leak noted by nnorwitz: the 'et' format returns allocated memory
2003-03-03 19:07:13 +00:00
Just van Rossum
96b1c903f5
Patch #683592 revisited, after discussions with MvL:
...
- Implement the behavior as specified in PEP 277, meaning os.listdir()
will only return unicode strings if it is _called_ with a unicode
argument.
- And then return only unicode, don't attempt to convert to ASCII.
- Don't switch on Py_FileSystemDefaultEncoding, but simply use the
default encoding if Py_FileSystemDefaultEncoding is NULL. This means
os.listdir() can now raise UnicodeDecodeError if the default encoding
can't represent the directory entry. (This seems better than silcencing
the error and fall back to a byte string.)
- Attempted to decribe the above in Doc/lib/libos.tex.
- Reworded the Misc/NEWS items to reflect the current situation.
This checkin also fixes bug #696261 , which was due to os.listdir() not
using Py_FileSystemDefaultEncoding, like all file system calls are
supposed to.
2003-03-03 17:32:15 +00:00
Just van Rossum
46c9784f68
Patch #683592 : unicode support for os.listdir()
...
os.listdir() may now return unicode strings on platforms that set
Py_FileSystemDefaultEncoding.
2003-02-25 21:42:15 +00:00
Mark Hammond
05107b6af7
os.mkdir() would crash with a Unicode filename and mode param.
2003-02-19 04:08:27 +00:00
Neal Norwitz
e241ce830a
Added test_posix (hopefully it works on Windows).
...
Remove PyArg_ParseTuple() for methods which take no args,
use METH_NOARGS instead
2003-02-17 18:17:05 +00:00
Neal Norwitz
ec74f2fda7
Add more missing PyErr_NoMemory() after failled memory allocs
2003-02-11 23:05:40 +00:00
Neal Norwitz
4adc9abc32
Fix memory leak of newstr when putenv() fails
2003-02-10 03:10:43 +00:00
Neal Norwitz
8e914d9a1d
Get rid of compiler warnings
2003-01-10 15:29:16 +00:00
Barry Warsaw
5676bd1c2d
all_ins(): EX_OK and friends, constants from sysexits.h
2003-01-07 20:57:09 +00:00
Martin v. Löwis
14e73b1864
Expose I_ constants. Auto-detect stropts.h. Properly configure the slave terminal.
2003-01-01 09:51:12 +00:00
Neal Norwitz
6700e47b3c
Fix compilation errors on HPUX11
2002-12-31 16:16:07 +00:00
Martin v. Löwis
c8b2e770cf
Restore signalhandler in case of error. Fix type of signal handler.
2002-12-31 14:30:26 +00:00