| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
| |
Due to a cut-and-paste error, the type object exported under the name
statvfs_result was in fact the stat_result type object. :-(
2.2.1 bugfix!
|
|
|
|
|
|
|
| |
Patch from Mark Hammond, plus code rearrangement and comments from me.
posix_do_stat(): Windows-specific code could try to free() stack
memory in some cases when a path ending with a forward or backward slash
was passed to os.stat().
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
type.__module__ behavior.
This adds the module name and a dot in front of the type name in every
type object initializer, except for built-in types (and those that
already had this). Note that it touches lots of Mac modules -- I have
no way to test these but the changes look right. Apologies if they're
not. This also touches the weakref docs, which contains a sample type
object initializer. It also touches the mmap test output, because the
mmap type's repr is included in that output. It touches object.h to
put the correct description in a comment.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Anthony Roach.
Release the global interpreter lock around platform spawn calls.
Bugfix candidate? Hard to say; I favor "yes, bugfix".
These clearly *should* have been releasing the GIL all along, if for no
other reason than compatibility with the similar os.system(). But it's
possible some program out there is (a) multithreaded, (b) calling a spawn
function with P_WAIT, and (c) relying on the spawn call to block all their
threads until the spawned program completes. I think it's very unlikely
anyone is doing that on purpose, but someone may be doing so by accident.
|
|
|
|
|
| |
sprintf -> PyOS_snprintf. This is the last of this
stuff I intend to do.
|
| |
|
| |
|
|
|
|
|
| |
Also changed <>-style #includes to ""-style in some places where the
former didn't make sense.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
This adds unsetenv to posix, and uses it in the __delitem__ method of
os.environ.
(XXX Should we change the preferred name for putenv to setenv, for
consistency?)
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a big one, touching lots of files. Some of the platforms
aren't tested yet. Briefly, this changes the return value of the
os/posix functions stat(), fstat(), statvfs(), fstatvfs(), and the
time functions localtime(), gmtime(), and strptime() from tuples into
pseudo-sequences. When accessed as a sequence, they behave exactly as
before. But they also have attributes like st_mtime or tm_year. The
stat return value, moreover, has a few platform-specific attributes
that are not available through the sequence interface (because
everybody expects the sequence to have a fixed length, these couldn't
be added there). If your platform's struct stat doesn't define
st_blksize, st_blocks or st_rdev, they won't be accessible from Python
either.
(Still missing is a documentation update.)
|
|
|
|
| |
<grp.h> it seems. This requires yet another configure test.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
Curious: the MS docs say stati64 etc are supported even on Win95, but
Win95 doesn't support a filesystem that allows partitions > 2 Gb.
test_largefile: This was opening its test file in text mode. I have no
idea how that worked under Win64, but it sure needs binary mode on Win98.
BTW, on Win98 test_largefile runs quickly (under a second).
|
|
|
|
|
|
|
|
|
|
|
| |
pyport.h: typedef a new Py_intptr_t type.
DELICATE ASSUMPTION: That HAVE_UINTPTR_T implies intptr_t is
available as well as uintptr_t. If that turns out not to be
true, things must get uglier (C99 wants both, so I think it's
an assumption we're *likely* to get away with).
thread_nt.h, PyThread_start_new_thread: MS _beginthread is documented
as returning unsigned long; no idea why uintptr_t was being used.
Others: Always use Py_[u]intptr_t, never [u]intptr_t directly.
|
|
|
|
| |
Brian Quinlan.
|
| |
|
| |
|
|
|
|
| |
This is part of SF patch #434992.
|
| |
|
|
|
|
|
|
|
| |
Also note that it isn't just Linux nice() that is broken: at least FreeBSD
and BSDI also have this problem. os.nice() should probably just be emulated
using getpriority()/setpriority(), if they are available, but I'll get to
that later.
|
|
|
|
|
|
|
| |
Work around Linux's nonstandard nice() systemcall, which does not return the
new priority.
This closes SF bug #439990.
|
| |
|
|
|
|
| |
fileobject.h, and initialize it in bltinmodule.
|
|
|
|
| |
dealing with the file system. As discussed on python-dev and in patch 410465.
|
| |
|
| |
|
|
|
|
|
| |
squelch warning from GCC 2.95.2 on Solaris - partially addresses bug
#232787.
|
|
|
|
|
| |
bugreport, just an IRC one by Marion Delgado.) These prototypes are
necessary because the functions are tossed around, not just called.
|
|
|
|
|
|
|
|
| |
finding w9xpopen.exe.
"Partial" as the code uses sys.prefix in an attempt to locate 'w9xpopen.exe', but sys.prefix is not set if Python can't find it itself. So this _still_ fails in Pythonwin, but I am committing the patch for 2 reasons:
* Embedded apps that set sys.prefix or use PYTHONHOME will work
* The exception raised on failure to find the executable is far more obvious
|
| |
|
| |
|
|
|
|
|
| |
including "tmpfile" in the posix_methods[] array is wrong -- should be
HAVE_TMPFILE, not HAVE_TMPNAM.
|
| |
|
|
|
|
|
| |
getlogin() -- it is not clear that a NULL is always
an error.
|
|
|
|
|
|
|
| |
NULL without setting errno; observed on Linux
Mandrake 7.2 by an anonymous user.
This closes bug #124758.
|
|
|
|
|
|
| |
Changes to error messages to increase consistency & clarity.
This (mostly) closes SourceForge patch #101839.
|
|
|
|
| |
terminals, not the master end (though it does, on most systems.)
|
| |
|
|
|
|
| |
unnecessary. Sez edg@SF
|
|
|
|
|
|
|
| |
was reported twice so far.
Someone with access to HP-UX, please test this! (Is '__hppa' or
'hppa' really the correct symbol to test for?)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
subset of Win32 ShellExecute's functionality. Guido wants this because
IDLE's Help -> Docs function currently crashes his machine because of a
conflict between his version of Norton AntiVirus (6.10.20) and MS's
_popen. Docs for startfile are being mailed to Fred (or just read the
docstring -- it tells the whole story).
Changed webbrowser.py to use os.startfile instead of os.popen on Windows.
Changed IDLE's EditorWindow.py to pass an absolute path for the docs
(hardcoding ShellExecute's "directory" arg to "." as used to be done let
IDLE work, but made the startfile command exceedingly obscure for other
uses -- the MS docs are terrible, of course, & still not sure I
understand it).
Note that Windows Python must link with shell32.lib now! That's where
ShellExecute lives.
|
|
|
|
|
|
| |
glob.glob("k:*py") (i.e., a raw drive letter + colon at the start) were
using the root of the drive rather than the expected Windows behavior
of using the drive's "current directory".
|
|
|
|
| |
This should match the situation in the 1.6b1 tree.
|