Thomas Heller [Fri, 18 Jun 2004 17:03:38 +0000 (17:03 +0000)]
When loading the Python dll to run the postinstall script, try to load
it from the install directory (as reported by the registry) in case it
is not found on the default Loadlibrary search path.
Fixes SF 935091: bdist_winist post-install script fails on non-admin Python
Neal Norwitz [Sun, 13 Jun 2004 20:45:11 +0000 (20:45 +0000)]
SF patch #969180, hotshot incorrectly computes elapsed time by Jason
Beardsley.
If the seconds are different, we still need to calculate the differences
between milliseconds.
Also, on a Gentoo Linux (2.6.5) dual Athlon MP box with glibc 2.3,
time can go backwards. This probably happens when the process switches
the CPU it's running on. Time can also go backwards when running NTP.
If we detect a negative time delta (ie, time went backwards), return
a delta of 0. This prevents an illegal array access elsewhere.
I think it's safest to *not* update prev_timeofday in this case, so we
return without updating.
Improve the memory performance and speed of heapq.nsmallest() by using
an alternate algorithm when the number of selected items is small
relative to the full iterable.
Fred Drake [Fri, 11 Jun 2004 21:50:33 +0000 (21:50 +0000)]
Add support for package data.
This is basically the support for package data from Phillip Eby's
setuptools package. I've changed it only to fit it into the core
implementation rather than to live in subclasses, and added
documentation.
lightly modified version of my patch
[ 971323 ] make test_signal less annoying
after some comments on IRC from a highly opinionated australian who
wishes to remain anonymous.
Futher improvements to frozenset hashing (based on Yitz Gale's battery of
tests which nicely highly highlight weaknesses).
* Initial value is now a large prime.
* Pre-multiply by the set length to add one more basis of differentiation.
* Work a bit harder inside the loop to scatter bits from sources that
may have closely spaced hash values.
All of this is necessary to make up for keep the hash function commutative.
Fortunately, the hash value is cached so the call to frozenset_hash() will
only occur once per set.
* Non-zero initial value so that hash(frozenset()) != hash(0).
* Final permutation to differentiate nested sets.
* Add logic to make sure that -1 is not a possible hash value.
Neal Norwitz [Wed, 9 Jun 2004 01:46:02 +0000 (01:46 +0000)]
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.
Tim Peters [Mon, 7 Jun 2004 23:04:33 +0000 (23:04 +0000)]
SF 952807: Unpickling pickled instances of subclasses of datetime.date,
datetime.datetime and datetime.time could yield insane objects. Thanks
to Jiwon Seo for the fix.
Skip Montanaro [Mon, 7 Jun 2004 11:20:40 +0000 (11:20 +0000)]
Another nit found by Neal Norwitz using pychecker. This was caused by a
too-mechanical translation when converting html() to text() (simply stripped
strong() where it appeared).
Neal Norwitz [Mon, 7 Jun 2004 03:49:50 +0000 (03:49 +0000)]
Cleanup: the in operator already returns a bool, no need to bool() it again
Cleanup: use condition to be consistent with code above
CookieJar is in cookielib
Neal Norwitz [Sun, 6 Jun 2004 20:40:27 +0000 (20:40 +0000)]
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.
Neal Norwitz [Sun, 6 Jun 2004 20:13:10 +0000 (20:13 +0000)]
Valgrind was reporting an uninitialized read for bad input.
This fixes the problem and the test passes. I'm not sure
the test is really correct though. It seems like it would
be better to raise an exception. I think that wasn't done
for backwards compatability.
Neal Norwitz [Sun, 6 Jun 2004 20:09:49 +0000 (20:09 +0000)]
Look for the multibyte codec map files in the parent directory too
This is similar to test_normalization, so that many source trees
can reference the same test file(s).
Kurt B. Kaiser [Sun, 6 Jun 2004 01:29:22 +0000 (01:29 +0000)]
Noam Raphel: Further developemt of CodeContext feature.
The visibility state of the code context pane is now persistent between
sessions and the pane does not appear in the shell window.
M CodeContext.py
M EditorWindow.py
M NEWS.txt
M PyShell.py
M config-extensions.def
M configHandler.py
Remove a number of tests that differ only in input data size. It seems
no bug motivated their inclusion and the chance of them triggering a
problem seems unlikely. Refactor to reduce code duplication. Rename
'hamlet_scene' to 'HAMLET_SCENE'. Test is much faster now. Closes #960995.