| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
parser_ast2tuple(). Create an temporary empty dictionary to
use. Bug reported by Mark Favas <m.favas@per.dem.csiro.au>.
Fix a couple of comments.
|
| |
|
|
|
|
|
|
|
|
|
| |
the right variant of gethostbyname_r for us, since not all Linuxes are
equal in this respect. Reported by Laurent Pointal.
(2) On BeOS, Chris Herborth reports that instead of arpa/inet.h you
must include net/netdb.h to get the inet_ntoa() and inet_addr()
prototypes.
|
|
|
|
|
| |
the proper function to call is inet_addr(). Since we already had code
to do that (for MS-Windows), this simplifies things a lot!
|
|
|
|
|
|
|
|
|
| |
names match the documentation.
Removed broken code that supports the __methods__ attribute on ast
objects; the right magic was added to Py_FindMethod() since this was
originally written. <ast-object>.__methods__ now works, so dir() and
rlcompleter are happy.
|
| |
|
| |
|
|
|
|
| |
(for Windows/CE).
|
|
|
|
|
|
| |
environment variable repeatedly. I posted this to the list
some time ago, but only now got around to asking g--d- what he
thought about it.
|
|
|
|
|
|
| |
- fix unescaped newline in string literal
- removed unused err variable
- Windows doesn't have inet_aton; use inet_addr instead
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
Treat them as read-only, and make a copy as appropriately. This was
first reported by Bill Janssend and later by Craig Rowland and Ron
Sedlmeyer. This fix is mine.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
"""
It fixes a memory corruption error resulting from BadPickleGet
exceptions in load_get, load_binget and load_long_binget. This was
initially reported on c.l.py as a problem with Cookie.py; see the thread
titled "python core dump (SIGBUS) on Solaris" for more details.
If PyDict_GetItem(self->memo, py_key) call failed, then py_key was being
Py_DECREF'd out of existence before call was made to
PyErr_SetObject(BadPickleGet, py_key).
The bug can be duplicated as follows:
import cPickle
cPickle.loads('garyp')
This raises a BadPickleGet exception whose value is a freed object. A
core dump will soon follow.
"""
Jim Fulton approves of the patch.
|
|
|
|
|
|
|
|
| |
different values in the environ dict with the same key (although he
couldn't explain exactly how this came to be). Since getenv() uses
the first one, Python should do too. (Some doubts about case
sensitivity, but for now this at least seems the right thing to do
regardless of platform.)
|
|
|
|
|
|
|
|
| |
- Don't call Py_FatalError() when initialization fails.
- Fix bogus use of return value from PyRun_String().
- Fix misc. compiler errors on some platforms.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I've updated cPickle.c to use class exceptions:
Changed pickle error types to classes:
PickleError
PicklingError
UnpickleableError
UnpicklingError
And change the handling of unpickleable objects so that an UnpickleableError
is raised with the unpickleable object as the argument. UnpickleableError
has a reasonable string representation and provides access to the problem
object, which is useful during debugging.
[I'm still waiting for patches to do the same to pickle.py.]
|
|
|
|
|
|
| |
posix_error_with_filename() instead of posix_error(), passing in the
name argument, so you get information on which directory was being
listed.
|
|
|
|
| |
to the libs variable. Reported by Albert Chin-A-Young.
|
|
|
|
|
|
|
| |
The test really wanted to distinguish between the two. So now we test
for __GLIBC__ instead. I have confirmed that this works for glibc and
I have an email from Christian Tanzer confirming that it works for
libc5, so it should be fine.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I have attached a new cPickle that adds a new control attribute
to unpicklers:
Added new Unpickler attribute, find_global. If set to None, then
global and instance pickles are disabled. Otherwise, it should be set to
a callable object that takes two arguments, a module name and an
object name, and returns an object. If the attribute is unset, then
the default mechanism is used.
This feature provides an additional mechanism for controlling which
classes can be used for unpickling.
|
|
|
|
| |
by a line when Python is run with -x.
|
|
|
|
| |
join \-terminated lines.
|
| |
|
|
|
|
|
|
| |
it was being used even without threads. This of course might be an
all-platform problem so now we only use the _r variant when we are
using threads.
|
|
|
|
|
| |
Tamito Kajiyama. (This caused a bug only on platforms where malloc(0)
returns NULL.)
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
Without this, if inflate() returned Z_BUF_ERROR asking for more output
space, we would report the error; now, we increase the buffer size and
try again, just as for Z_OK.
|
| |
|
|
|
|
| |
#else/#endif are wrong, and that #if HAVE_TM_ZONE should be #ifdef.
|
|
|
|
| |
The problem was reported by Moshe Zadka.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
"""
The GNU folks, in their infinite wisdom, have decided not to implement
altzone in libc6; this would not be horrible, except that timezone
(which is implemented) includes the current DST setting (i.e. timezone
for Central is 18000 in summer and 21600 in winter). So Python's
timezone and altzone variables aren't set correctly during DST.
Here's a patch relative to 1.5.2b2 that (a) makes timezone and altzone
show the "right" thing on Linux (by using the tm_gmtoff stuff
available in BSD, which is how the GLIBC manual claims things should
be done) and (b) should cope with the southern hemisphere. In pursuit
of (b), I also took the liberty of renaming the "summer" and "winter"
variables to "july" and "jan". This patch should also make certain
time calculations on Linux actually work right (like the tz-aware
functions in the rfc822 module).
(It's hard to find DST that's currently being used in the southern
hemisphere; I tested using Africa/Windhoek.)
"""
|
|
|
|
| |
middlename) Marangozov, patch coded by Greg Stein.
|
|
|
|
|
|
| |
is not an empty string, this means that you have arrived at the
end of the stream of compressed data, and the contents of .unused_data are
whatever follows the compressed stream.
|
|
|
|
| |
Fix comments about zlib version and URL.
|
|
|
|
|
|
|
|
|
|
|
|
| |
data struct before calling gethostby{name,addr}_r(); (2) ignore the
3/5/6 args determinations made by the configure script and switch on
platform identifiers instead:
AIX, OSF have 3 args
Sun, SGI have 5 args
Linux has 6 args
On all other platforms, undef HAVE_GETHOSTBYNAME_R altogether.
|
| |
|
|
|
|
| |
with egcs (after setting EXE=.exe). Patch by Norman Vine.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Use HAVE_GETHOSTBYNAME_R_6_ARG instead of testing for Linux and
glibc2.
- If gethostbyname takes 3 args, undefine HAVE_GETHOSTBYNAME_R --
don't know what code should be used.
- New symbol USE_GETHOSTBYNAME_LOCK defined iff the lock should be used.
- Modify the gethostbyaddr() code to also hold on to the lock until
after it is safe to release, overlapping with the Python lock.
(Note: I think that it could in theory be possible that Python code
executed while gethostbyname_lock is held could attempt to reacquire
the lock -- e.g. in a signal handler or destructor. I will simply say
"don't do that then.")
|
|
|
|
|
|
|
|
| |
Here's a patch to fix the race condition, which wasn't fixed by Rob's
patch. It holds the gethostbyname lock until the results are copied out,
which means that this lock and the Python global lock are held at the same
time. This shouldn't be a problem as long as the gethostbyname lock is
always acquired when the global lock is not held.
|
|
|
|
|
| |
the end of loop was incorrect, and failed when the flushmode != Z_FINISH.
Logic cleaned up and commented.
|
| |
|
|
|
|
|
| |
hyperbolic cosine. Problem report via David Ascher by one of his
students.
|
|
|
|
| |
converntion for gethostbyname_r() etc. than Solaris!
|