317 Commits

Author SHA1 Message Date
Andrew MacIntyre
3497a04a6c fix unterminated comment 2004-12-18 09:46:18 +00:00
Andrew MacIntyre
7c80d34bbe OS/2 specific fixes related to SF bug # 1003471.
Also revise a related function to minimise file handle/pipe leakage
and improve reliability.

Backported from -HEAD.
2004-12-12 08:37:08 +00:00
Martin v. Löwis
0f8c23cde4 Patch #954115: Fix os.stat handling of UNC roots.
Closes #513572.
2004-06-02 10:07:01 +00:00
Mark Hammond
082b0f098e Fix [ 947405 ] os.utime() raises bad exception for unicode filenames. 2004-05-04 08:07:49 +00:00
Andrew MacIntyre
fc019dd00b Backport to 2.3 to support Zope 2.7 on OS/2:
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:17:05 +00:00
Andrew MacIntyre
61525be632 OS/2 VACPP build updates/fixes 2004-03-29 11:58:55 +00:00
Neal Norwitz
66bc72c4bb Fix docstrings to mention the correct function 2004-02-16 01:30:49 +00:00
Mark Hammond
5610c7e34b Fix [ 846133 ] os.chmod/os.utime/shutil do not work with unicode filenames 2003-12-03 01:21:01 +00:00
Martin v. Löwis
f62fad7442 Patch #788404: ignore "b" and "t" mode modifiers in posix_popen.
Fixes #703198.
2003-10-31 10:01:37 +00:00
Walter Dörwald
4958f2741a Backport checkin:
Fix a bunch of typos in documentation, docstrings and comments.
(From SF patch #810751)
2003-10-20 14:34:48 +00:00
Raymond Hettinger
617fc1758a SF patch #798534: Windows os.popen needlessly gets a reference to tuple ()
(Contributed by Andrew Gaul.)

Fixes a minor leak.
2003-09-01 22:34:31 +00:00
Mark Hammond
7fc99bd89b Demonstrate and fix [ 783882 ] os.lstat crashes with Unicode filename.
Also checked in on trunk.
2003-08-06 02:47:57 +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