properly build the module.
Also moved up the creation of config_h_vars (from
distutils.sysconfig.parse_config_h()) higher on up in detect_modules() so that
it can be used sooner).
for non-complex arguments.
* Replace type() comparisons with isinstance() checks.
* Replace apply() calls with equivalent syntactic form.
* Simplify __hash__ definition to hash the underlying tuple.
* Use math.hypot() for more robust computation of __abs__().
* Use sorted() instead of the multi-step keys/sort/iter.
* Update comment on the cmath module.
test_site often failed under "regrtest.py -r", because this xmlrpc test
left sys with a setdefaultencoding attribute, but loading site.py removes
that attribute and test_site.py verifies the attribute is gone. Changed
this test to get rid of sys.setdefaultencoding if it didn't exist when
this test started.
Don't know whether this is a bugfix (backport) candidate.
because (essentially) I didn't realise that PY_BEGIN/END_ALLOW_THREADS
actually expanded to nothing under a no-threads build, so if you somehow
NULLed out the threadstate (e.g. by calling PyThread_SaveThread) it would
stay NULLed when you return to Python. Argh!
Backport candidate.
* resp[:1] in '123' # after Py2.2, this allowed blank responses to pass.
* replace <> with !=
* provide a usage message for empty command line calls
Backport candidate.
the last character read is "\r" (and size is None, i.e. we're allowed to
call read() multiple times), so that we can return the correct line ending
(this additional character might be a "\n").
If the stream is temporarily exhausted, we might return the wrong line ending
(if the last character read is "\r" and the next one (after the byte stream
provides more data) is "\n", but at least the atcr member ensure that we
get the correct number of lines (i.e. this "\n" will not be treated as
another line ending.)
[ 1165306 ] Property access with decorator makes interpreter crash
Don't allow the creation of unbound methods with NULL im_class, because
attempting to call such crashes.
Backport candidate.
[ 1166660 ] The readline module can cause python to segfault
It seems to me that the code I'm rewriting here attempted to call any
user-supplied hook functions using the thread state of the thread that
called the hook-setting function, as opposed to that of the thread
that is currently executing. This doesn't work, in general.
Fix this by using the PyGILState API (It wouldn't be that hard to
define a dummy version of said API when #ifndef WITH_THREAD, would
it?).
Also, check the conversion to integer of the return value of a hook
function for errors (this problem was mentioned in the ipython bug
report linked to in the above bug).