Michael W. Hudson
24ec21174c
silly typo
2004-06-17 15:55:53 +00:00
Michael W. Hudson
9e151d149e
add missing closing quote.
2004-06-17 13:29:11 +00:00
Armin Rigo
8817fcdba5
Performance tweak: allow stack_pointer and oparg to be register variables.
...
SF patch #943898
2004-06-17 10:22:40 +00:00
Martin v. Löwis
64af6c545c
Comment that getfilesystemencoding returns mbcs even on NT+. Fixes #964870 .
2004-06-16 04:53:46 +00:00
Raymond Hettinger
aefde435ef
Reverse argument order for nsmallest() and nlargest().
...
Reads better when the iterable is a generator expression.
2004-06-15 23:53:35 +00:00
Martin v. Löwis
969297f488
Return unicode strings from _getfullpathname even on W9X. Fixes #924703 .
2004-06-15 18:49:58 +00:00
Martin v. Löwis
0d6e8f2e65
Remove CRLF from project files.
2004-06-15 18:18:19 +00:00
Fred Drake
d0620dcf00
add a test that actually installs some scripts
2004-06-15 16:55:46 +00:00
Fred Drake
bb7c14461d
One unit test for distutils is not much, but is more than we had yesterday.
...
We need to write more; hopefully the barrier is a little lower now.
2004-06-15 15:49:46 +00:00
Raymond Hettinger
a050171ee9
SF bug #973092 : inspect.getframeinfo bug if 'context' is to big
...
Make sure the start argument is not negative.
2004-06-15 11:22:53 +00:00
Fred Drake
40333ceeac
add a pointer to the Distutils Cookbook
2004-06-14 22:07:50 +00:00
Raymond Hettinger
b67ad7e671
Patch #826074 : cmath.log optional base argument, fixes #823209
...
(Contributed by Andrew Gaul.)
2004-06-14 07:40:10 +00:00
Martin v. Löwis
ad21945d03
Back out #957240 .
2004-06-14 04:58:42 +00:00
Raymond Hettinger
148a63f1fc
Remove a function no longer in use.
2004-06-14 04:24:41 +00:00
Tim Peters
3d1f6bba6d
Teach pythoncore project about new pystrtod.c for VC7.1. This was done
...
a long time ago for VC6.
2004-06-14 01:05:46 +00:00
Neal Norwitz
965eeca630
SF bug #970042 , lockf() signature uses len, doc refers to length (use length, same as docstring)
2004-06-13 21:11:03 +00:00
Neal Norwitz
7a135166f6
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.
Backport candidate.
2004-06-13 20:45:11 +00:00
Neal Norwitz
0f5aed4e41
Remove compiler warning
2004-06-13 20:32:17 +00:00
Neal Norwitz
d85c452604
Make private function static
2004-06-13 20:31:49 +00:00
Neal Norwitz
75a3204095
Remove warning (static not being first) when building with -W
2004-06-13 20:31:17 +00:00
Neal Norwitz
0a8266a7e3
Remove warning about implicit declaration of strcmp()
2004-06-13 20:29:55 +00:00
Raymond Hettinger
de72eddf69
Fixup error exits in nlargest() and nsmallest().
2004-06-13 15:36:56 +00:00
Raymond Hettinger
bb6b7346ce
Apply heapq.nlargest() to find best matches.
2004-06-13 09:57:33 +00:00
Raymond Hettinger
47edb4b09c
Remove unnecessary GC support. Sets cannot have cycles.
2004-06-13 08:20:46 +00:00
Raymond Hettinger
59efe363b6
Add heapq to list of __all__ checks.
2004-06-13 05:46:14 +00:00
Raymond Hettinger
2e3dfaf707
Install C version of heapq.nsmallest().
2004-06-13 05:26:33 +00:00
Raymond Hettinger
c929766361
Install C version of heapq.nlargest().
...
Maxheap version of heapq.smallest() is forthcoming.
2004-06-12 22:48:46 +00:00
Michael W. Hudson
84a7f0077c
note a really bad test (no time to fix now)
2004-06-12 16:30:32 +00:00
Raymond Hettinger
b25aa36f83
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.
2004-06-12 08:33:36 +00:00
Raymond Hettinger
2e6694086f
Minor wording and spacing nits.
2004-06-12 07:59:40 +00:00
Raymond Hettinger
34809170e5
Complete the list of weakreferencable objects.
2004-06-12 06:56:44 +00:00
Raymond Hettinger
6c7a00fbaa
* Factor out PyObject_SelfIter().
...
* Change a XDECREF to DECREF (adding an assertion just to be sure).
2004-06-12 05:17:55 +00:00
Fred Drake
0eb32a65b0
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.
2004-06-11 21:50:33 +00:00
Michael W. Hudson
5c26e86096
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.
2004-06-11 18:09:28 +00:00
Anthony Baxter
c982bbde1c
Bug 957381: rpmbuild builds a -debuginfo rpm on recent Redhat and Fedora releases.
...
Ignore it, rather than breaking.
Will backport.
(and r1.1000 for Misc/NEWS!)
2004-06-11 17:16:46 +00:00
Anthony Baxter
01e80b45d6
fix a poorly worded error message
2004-06-11 15:57:49 +00:00
Anthony Baxter
3ecdb250af
Fix for bug #966623 - classes created with type() in an exec(, {}) don't
...
have a __module__. Test for this case.
Bugfix candidate, will backport.
2004-06-11 14:41:18 +00:00
Skip Montanaro
51ffac6db7
dump HAVE_FOPENRF stuff - obsolete
2004-06-11 04:49:03 +00:00
Skip Montanaro
a5616d2255
Respect a module's __all__ attribute. Closes #969938 .
2004-06-11 04:46:12 +00:00
Raymond Hettinger
c978633ec6
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.
2004-06-10 22:41:48 +00:00
Raymond Hettinger
27e403ebe9
Fixups to the hash function for frozensets.
...
* 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.
2004-06-10 21:38:41 +00:00
Raymond Hettinger
57c2d930f6
Add a final permutation step to the tuple hash function.
...
Prevents a collision pattern that occurs with nested tuples.
(Yitz Gale provided code that repeatably demonstrated the weakness.)
2004-06-10 18:42:15 +00:00
Raymond Hettinger
bce036b49e
Convert test_heapq.py to unittests.
2004-06-10 05:07:18 +00:00
Raymond Hettinger
33ecffb65a
SF patch #969791 : Add nlargest() and nsmallest() to heapq.
2004-06-10 05:03:17 +00:00
Thomas Heller
7d019664d7
Defining Py_GCC_ATTRIBUTE finds even some more undocumented functions.
2004-06-09 18:50:54 +00:00
Thomas Heller
4369b59b6d
Public Python functions are nowadays marked PyAPI_FUNC, not DL_IMPORT.
2004-06-09 18:38:20 +00:00
Fred Drake
da4513a88b
make a reference to the SimpleHTTPServer module a hyperlink to the
...
docs
2004-06-09 14:50:19 +00:00
Neal Norwitz
2adf210993
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.
2004-06-09 01:46:02 +00:00
Tim Peters
4182cfd7db
test_devnull(): Use assertEqual() instead of an assert stmt.
2004-06-08 20:34:34 +00:00
Tim Peters
2242fe84f9
Teach MSVC 6 about pystrtod.c.
2004-06-08 20:32:58 +00:00