Christian Heimes
3628187b66
Fix for feature request #1528 Add os.fchmod
...
Georg Brandl has added fchmod() and fchown(). I've contributed lchown but I'm not able to test it on Linux. However it should be available on Mac and some other flavors of Unix.
I've made a quick test of fchmod() and fchown() on my system. They are working as expected.
2007-11-30 21:11:28 +00:00
Georg Brandl
b67da6ed2b
#1735632 : add O_NOATIME constant to os module.
...
Also document a few other O_ constants that were missing from documentation.
2007-11-24 13:56:09 +00:00
Martin v. Löwis
af699dd621
Document that we rely on the OS to release the crypto
...
context. Fixes #1626801 .
2007-09-04 09:51:57 +00:00
Neal Norwitz
91a57216c9
Fix memory leak in os.readlink
2007-08-12 17:11:13 +00:00
Martin v. Löwis
6819210b9e
PEP 3123: Provide forward compatibility with Python 3.0, while keeping
...
backwards compatibility. Add Py_Refcnt, Py_Type, Py_Size, and
PyVarObject_HEAD_INIT.
2007-07-21 06:55:02 +00:00
Kristján Valur Jónsson
f030394de3
Fix problems in x64 build that were discovered by the testsuite:
...
- Reenable modules on x64 that had been disabled aeons ago for Itanium.
- Cleared up confusion about compilers for 64 bit windows. There is only Itanium and x64. Added macros MS_WINI64 and MS_WINX64 for those rare cases where it matters, such as the disabling of modules above.
- Set target platform (_WIN32_WINNT and WINVER) to 0x0501 (XP) for x64, and 0x0400 (NT 4.0) otherwise, which are the targeted minimum platforms.
- Fixed thread_nt.h. The emulated InterlockedCompareExchange function didn´t work on x64, probaby due to the lack of a "volatile" specifier. Anyway, win95 is no longer a target platform.
- Itertools module used wrong constant to check for overflow in count()
- PyInt_AsSsize_t couldn't deal with attribute error when accessing the __long__ member.
- PyLong_FromSsize_t() incorrectly specified that the operand were unsigned.
With these changes, the x64 passes the testsuite, for those modules present.
2007-05-03 20:27:03 +00:00
Neal Norwitz
d83eb316dc
Stop using PyMem_FREE while the GIL is not held. For details see:
...
http://mail.python.org/pipermail/python-dev/2007-May/072896.html
2007-05-02 04:47:55 +00:00
Kristján Valur Jónsson
0a440d4184
Export function sanitize_the_mode from fileobject.c as _PyFile_SanitizeMode(). Use this function in posixmodule.c when implementing fdopen(). This fixes test_subprocess.py for a VisualStudio 2005 compile.
2007-04-26 09:15:08 +00:00
Kristján Valur Jónsson
17b8e97e2e
Merge change 54909 from release25-maint: Fix several minor issues discovered using code analysis in VisualStudio 2005 Team Edition
2007-04-25 00:10:50 +00:00
Martin v. Löwis
3bf573f918
Bug #1686475 : Support stat'ing open files on Windows again.
...
Will backport to 2.5.
2007-04-04 18:30:36 +00:00
Martin v. Löwis
382abeff0f
Patch #1490190 : posixmodule now includes os.chflags() and os.lchflags()
...
functions on platforms where the underlying system calls are available.
2007-02-19 10:55:19 +00:00
Georg Brandl
7a28447d4c
Bug #1645944 : os.access now returns bool but docstring is not updated
2007-01-27 19:38:50 +00:00
Ronald Oussoren
10168f25ad
Patch #1580674 : with this patch os.readlink uses the filesystem encoding to
...
decode unicode objects and returns an unicode object when the argument is one.
2006-10-22 10:45:18 +00:00
Martin v. Löwis
012bc7253b
Bug #1567666 : Emulate GetFileAttributesExA for Win95.
...
Will backport to 2.5.
2006-10-15 09:43:39 +00:00
Martin v. Löwis
18aaa568fd
Patch #1576166 : Support os.utime for directories on Windows NT+.
2006-10-15 08:43:33 +00:00
Martin v. Löwis
f43893a878
Bug #1565150 : Fix subsecond processing for os.utime on Windows.
2006-10-09 20:44:25 +00:00
Georg Brandl
74bb783c2f
Bug #1551427 : fix a wrong NULL pointer check in the win32 version
...
of os.urandom().
2006-09-06 06:03:59 +00:00
Neal Norwitz
e0a81afb10
If _stat_float_times is false, we will try to INCREF ival which could be NULL.
...
Return early in that case. The caller checks for PyErr_Occurred so this
should be ok.
Klocwork #297
2006-08-12 01:50:38 +00:00
Martin v. Löwis
982e9fea0a
Bug #1524310 : Properly report errors from FindNextFile in os.listdir.
...
Will backport to 2.4.
2006-07-24 12:54:17 +00:00
Neal Norwitz
2a30cd0ef0
Patch #1516912 : improve Modules support for OpenVMS.
2006-07-10 01:18:57 +00:00
Martin v. Löwis
ee1e06d497
Correct arithmetic in access on Win32. Fixes #1513646 .
2006-07-02 18:44:00 +00:00
Martin v. Löwis
0e8bd7e1cc
Patch #1495999 : Part two of Windows CE changes.
...
- update header checks, using autoconf
- provide dummies for getenv, environ, and GetVersion
- adjust MSC_VER check in socketmodule.c
2006-06-10 12:23:46 +00:00
Kristján Valur Jónsson
dbeaa699cd
Turn off warning about deprecated CRT functions on for VisualStudio .NET 2005.
...
Make the definition #ARRAYSIZE conditional. VisualStudio .NET 2005 already has it defined using a better gimmick.
2006-06-09 16:28:01 +00:00
Georg Brandl
96a8c3954c
Make use of METH_O and METH_NOARGS where possible.
...
Use Py_UnpackTuple instead of PyArg_ParseTuple where possible.
2006-05-29 21:04:52 +00:00
Martin v. Löwis
a43190bc78
Patch #1492356 : Port to Windows CE (patch set 1).
2006-05-22 09:15:18 +00:00
Georg Brandl
9e5b5e4fe1
Fix typo in os.utime docstring (patch #1490189 )
2006-05-17 14:18:20 +00:00
Martin v. Löwis
5f5d99c215
- Test for sys/statvfs.h before including it, as statvfs is present
...
on some OSX installation, but its header file is not.
Will backport to 2.4
2006-05-16 07:05:37 +00:00
Martin v. Löwis
e3edaea33d
Fix memory leak.
2006-05-15 05:51:36 +00:00
Martin v. Löwis
77c176d5b5
Fix alignment error on Itanium.
2006-05-12 17:22:04 +00:00
Martin v. Löwis
682b1bb95f
Dynamically allocate path name buffer for Unicode
...
path name in listdir. Fixes #1431582 .
Stop overallocating MAX_PATH characters for ANSI
path names. Stop assigning to errno.
2006-05-12 12:27:28 +00:00
Martin v. Löwis
9f485bcd68
Add missing PyMem_Free.
2006-05-08 05:25:56 +00:00
Martin v. Löwis
d4e3bb3d39
Port access, chmod, parts of getcwdu, mkdir, and utime to direct Win32 API.
2006-05-06 16:32:54 +00:00
Martin v. Löwis
4fc2bda8d9
Drop now-unnecessary arguments to posix_2str.
2006-05-04 12:04:27 +00:00
Martin v. Löwis
8e0d494e41
Implement os.{chdir,rename,rmdir,remove} using Win32 directly.
2006-05-04 10:08:42 +00:00
Thomas Wouters
1ddba60e3d
Define MAXPATHLEN to be at least PATH_MAX, if that's defined. Python uses
...
MAXPATHLEN-sized buffers for various output-buffers (like to realpath()),
and that's correct on BSD platforms, but not Linux (which uses PATH_MAX, and
does not define MAXPATHLEN.) Cursory googling suggests Linux is following a
newer standard than BSD, but in cases like this, who knows. Using the
greater of PATH_MAX and 1024 as a fallback for MAXPATHLEN seems to be the
most portable solution.
2006-04-25 15:29:46 +00:00
Ronald Oussoren
d06b6f28a0
Patch 1471925 - Weak linking support for OSX
...
This patch causes several symbols in the socket and posix module to be weakly
linked on OSX and disables usage of ftime on OSX. These changes make it possible
to use a binary build on OSX 10.4 on a 10.3 system.
2006-04-23 11:59:25 +00:00
Martin v. Löwis
26fd9607c7
Fix more ssize_t problems.
2006-04-22 11:15:41 +00:00
Neal Norwitz
449b24ebe9
Address issues brought up by MvL on python-checkins.
...
I tested this with valgrind on amd64.
The man pages I found for diff architectures are inconsistent on this.
I'm not entirely sure this change is correct for all architectures either.
Perhaps we should just over-allocate and not worry about it?
2006-04-20 06:56:05 +00:00
Neal Norwitz
0d21b1ed54
Whitespace, fix indentation
2006-04-20 06:44:42 +00:00
Skip Montanaro
94785ef142
Correct implementation and documentation of os.confstr. Add a simple test
...
case. I've yet to figure out how to provoke a None return I can test.
2006-04-20 01:29:48 +00:00
Skip Montanaro
dd527fcbcd
reset errno before calling confstr - use confstr() doc to simplify checks afterwards
2006-04-18 00:49:49 +00:00
Martin v. Löwis
19ab6c98cf
Initialize structseq types only once.
2006-04-16 18:55:50 +00:00
Anthony Baxter
ac6bd46d5c
spread the extern "C" { } magic pixie dust around. Python itself builds now
...
using a C++ compiler. Still lots and lots of errors in the modules built by
setup.py, and a bunch of warnings from g++ in the core.
2006-04-13 02:06:09 +00:00
Anthony Baxter
64182fe0b3
Some more changes to make code compile under a C++ compiler.
2006-04-11 12:14:09 +00:00
Georg Brandl
05e89b86d6
Clear errno before calling opendir() and readdir().
2006-04-11 07:04:06 +00:00
Georg Brandl
bbfe4fad36
Bug #1467952 : os.listdir() now correctly raises an error if readdir()
...
fails with an error condition.
2006-04-11 06:47:43 +00:00
Neal Norwitz
84a98e07f5
Fix warning about ptsname not being a prototype on Solaris. Is this prototype even necessary anymore?
2006-04-10 07:44:23 +00:00
Martin v. Löwis
5fe715f049
Properly support empty woperation in win32_startfile;
...
correct arguments to ShellExecuteW.
2006-04-03 23:01:24 +00:00
Georg Brandl
ad89dc8794
Bug #1451503 : allow unicode filenames in os.startfile().
2006-04-03 12:26:26 +00:00
Thomas Wouters
2a9a6b0e86
In the fdopen(fd, 'a') case on UNIX, don't try to set fd's flags to -1 if
...
fcntl() and fdopen() both fail. Will backport.
2006-03-31 22:38:19 +00:00
Georg Brandl
644b1e7aac
Add guards against fcntl() not being available on Windows.
2006-03-31 20:27:22 +00:00
Georg Brandl
54a188aed8
bug #1461855 : make os.fdopen() add the O_APPEND flag if using "a" mode.
...
glibc, for example, does this already on its own, but it seems that
the solaris libc doesn't. This leads to Python code being able to over-
write file contents even though having specified "a" mode.
2006-03-31 20:00:11 +00:00
Neal Norwitz
1818ed705b
Try to fix broken compile on openbsd.
2006-03-26 00:29:48 +00:00
Neal Norwitz
9b00a56464
Damn Coverity. I can't even sneak in a leak any more. :-)
2006-03-20 08:47:12 +00:00
Neal Norwitz
6c2f913805
The helper is only necessary for wait3/4.
2006-03-20 07:25:26 +00:00
Neal Norwitz
d5a375496e
Try to cleanup a lot of boilerplate #ifdef wrt wait types and make the code
...
more consistent (and smaller by 85 lines or so).
2006-03-20 06:48:34 +00:00
Neal Norwitz
05a45599d7
Patch #1309579 : wait3 and wait4 were added to the posix module by Chad J. Schroeder.
...
This was a fair amount of rework of the patch. Refactored test_fork1 so it
could be reused by the new tests for wait3/4. Also made them into new style
unittests (derive from unittest.TestCase).
2006-03-20 06:30:08 +00:00
Neal Norwitz
d1e0ef68fb
SF #1445431 , fix some leaks in error conditions.
2006-03-20 04:08:12 +00:00
Martin v. Löwis
e920f0d340
Reformulate 42903 using an if statement.
2006-03-07 23:59:33 +00:00
Georg Brandl
516999e6e2
Fix bug introduced in rev. 42884.
2006-03-07 20:56:02 +00:00
Georg Brandl
622927b850
Bug #1432525 : os.listdir now releases the GIL while calling
...
readdir().
2006-03-07 12:48:03 +00:00
Martin v. Löwis
725507b52e
Change int to Py_ssize_t in several places.
...
Add (int) casts to silence compiler warnings.
Raise Python exceptions for overflows.
2006-03-07 12:08:51 +00:00
Tim Peters
67d70eb957
Repair mangled code in the Windows flavor of
...
posix__getfullpathname().
In partial answer to the now-deleted XXX comment:
/* XXX(twouters) Why use 'et#' here at all? insize isn't used */
`insize` is an input parameter too, and it was left uninitialized,
leading to seemingly random failures.
2006-03-01 04:35:45 +00:00
Thomas Wouters
68bc4f9ae5
Py_ssize_t-ify.
2006-03-01 01:05:10 +00:00
Hye-Shik Chang
d69e034571
Fix a build problem introduced by r42230.
2006-02-19 16:22:22 +00:00
Georg Brandl
f4f4415a18
Patch #1393157 : os.startfile() now has an optional argument to specify
...
a "command verb" to invoke on the file.
2006-02-18 22:29:33 +00:00
Martin v. Löwis
18e165558b
Merge ssize_t branch.
2006-02-15 17:27:45 +00:00
Martin v. Löwis
14694662d5
Drop C library for stat/fstat on Windows.
2006-02-03 12:54:16 +00:00
Neal Norwitz
1ac754fa10
Check return result from Py_InitModule*(). This API can fail.
...
Probably should be backported.
2006-01-19 06:09:39 +00:00
Neal Norwitz
30b5c5d011
Fix SF bug #1072182 , problems with signed characters.
...
Most of these can be backported.
2005-12-19 06:05:18 +00:00
Georg Brandl
a13c2446dc
Bug #869197 : setgroups rejects long integer argument
2005-11-22 19:30:31 +00:00
Georg Brandl
e9f8ec98d4
Commit memory leaking fix.
2005-09-25 06:16:40 +00:00
Neal Norwitz
3efd0a1e86
Remove unnecessary/extra parens when returning a value.
2005-09-19 06:45:53 +00:00
Neal Norwitz
24b3c22985
Forward port fixes for problems reported by valgrind
2005-09-19 06:43:44 +00:00
Georg Brandl
402b53d43f
bug [ 1007046 ] os.startfile() doesn't accept Unicode filenames
2005-09-14 20:51:40 +00:00
Martin v. Löwis
f09582eeda
Correct definition of ST_GEN_IDX.
2005-08-14 21:42:34 +00:00
Martin v. Löwis
ebd9d5ba1a
Patch #1180695 : Implement nanosecond stat resolution on FreeBSD,
...
add st_gen, st_birthtime.
2005-08-09 15:00:59 +00:00
Michael W. Hudson
b89638148b
Fix bug
...
[ 1232517 ] OverflowError in time.utime() causes strange traceback
A needed error check was missing.
(Actually, this error check may only have become necessary in fairly
recent Python, not sure).
Backport candidate.
2005-07-05 15:21:58 +00:00
Hye-Shik Chang
5f937a7b8b
Patch #1212117 : Add optional attribute st_flags to os.stat_result
...
when the member is available on the platform. (Contributed by
Diego Petteno)
2005-06-02 13:09:30 +00:00
Skip Montanaro
5ff1492720
Add O_SHLOCK & O_EXLOCK. Closes patch #1103951 .
2005-05-16 02:42:22 +00:00
Martin v. Löwis
b60ae99601
Convert file names of posix.access according to the file system encoding.
2005-03-08 09:10:29 +00:00
Michael W. Hudson
9867ced6c2
Fix
...
[ 1077106 ] Negative numbers to os.read() cause segfault
Sorry for sitting on this for so long! Is there a chance it could
make 2.3.5?
2005-01-31 17:01:59 +00:00
Martin v. Löwis
fe33d0ba87
Default stat_float_times to true.
2005-01-16 08:57:39 +00:00
Andrew MacIntyre
a3be258477
fix unterminated comment
2004-12-18 09:51:05 +00:00
Andrew MacIntyre
a4a8afb4e1
OS/2 specific fixes related to SF bug # 1003471.
...
Also revise a related function to minimise file handle/pipe leakage
and improve reliability.
2004-12-12 08:30:51 +00:00
Anthony Baxter
8a560dee72
Patch 977343, Solaris likes sys/loadavg.h. Added support for sys/loadavg.h
...
detection to configure &c.
2004-10-13 15:30:56 +00:00
Anthony Baxter
9ceaa72ebe
Patch #975056 - fixes for restartable signals on *BSD. In addition,
...
a few remaining calls to signal() were converted to PyOS_setsig().
2004-10-13 14:48:50 +00:00
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
Martin v. Löwis
24a880b499
Patch #656590 : /dev/ptmx support for ptys.
2002-12-31 12:55:15 +00:00
Martin v. Löwis
438b534ad0
Patch #657889 : Implement posix.getloadavg.
2002-12-27 10:16:42 +00:00
Guido van Rossum
0847c5c6c7
execve(), spawnve(): add some extra sanity checking to env;
...
PyMapping_Check() doesn't guarantee that PyMapping_Size() won't raise
an exception, nor that keys and values are lists.
Also folded some long lines and did a little whitespace normalization.
Probably a 2.2 backport candidate.
2002-12-13 18:36:22 +00:00
Martin v. Löwis
79acb9edfa
Patch #614055 : Support OpenVMS.
2002-12-06 12:48:53 +00:00
Martin v. Löwis
0073f2e428
Fix --disable-unicode compilation problems.
2002-11-21 23:52:35 +00:00
Walter Dörwald
3b918c3787
Comment out the getcwdu implementation for --disable-unicode builds
2002-11-21 20:18:46 +00:00
Thomas Heller
1f043e28f4
Enforce valid filemode. Fixes SF Bug #623464 .
2002-11-07 16:00:59 +00:00
Martin v. Löwis
d631ebe20b
Remove extra argument in mknod. Fixes #632628 .
2002-11-02 17:42:33 +00:00
Martin v. Löwis
60a5d72908
Patch #623780 : Replace obsolete struct macros.
2002-10-16 20:28:25 +00:00
Martin v. Löwis
f607bdaa77
Add PyStructSequence_UnnamedField. Add stat_float_times.
...
Use integers in stat tuple, optionally floats in named fields.
2002-10-16 18:27:39 +00:00
Guido van Rossum
1e700d24e9
posix_execve(): add missing argument for "et" format in PyArg_Parse()
...
call. This caused mysterious crashes (hard to debug because it was
happening in a child process).
2002-10-16 16:52:11 +00:00
Neal Norwitz
c18b308229
Fix a few docstrings, remove extra commas
2002-10-11 22:19:42 +00:00
Martin v. Löwis
dbe3f76270
Patch #569139 : Implementation of major, minor and makedev.
2002-10-10 14:27:30 +00:00