| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
- The copy module now "copies" function objects (as atomic objects).
- dict.__getitem__ now looks for a __missing__ hook before raising
KeyError.
- Added a new type, defaultdict, to the collections module.
This uses the new __missing__ hook behavior added to dict (see above).
|
| |
|
|
|
|
| |
systems; define these conditionally.
|
| |
|
|
|
|
| |
INET_ADDRSTRLEN is not defined.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
a "command verb" to invoke on the file.
|
|
|
|
| |
offset>=0.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
mixing signed and unsigned types in comparison.
|
|
|
|
| |
in function calls.
|
|
|
|
| |
deleted some curlies around one-line blocks.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On a box where sizeof(size_t) == 4, C doesn't define
what happens when a size_t value is shifted right by
32 bits, and this caused test_mmap to fail on Windows
in a debug build. So use different code to break
the size apart depending on how large size_t actually
is.
This looks like an illusion, since lots of code in this
module still appears to assume sizes can't be more
than 32 bits (e.g., the internal _GetMapSize() still
returns an int), but at least test_mmap passes again.
|
| |
|
|
|
|
|
| |
debug-build test_struct on a box where plain "char"
is signed.
|
|
|
|
|
| |
lists and call Py_ssize_t-using helpers. All other code in this module was
already adapted to Py_ssize_t.
|
|
|
|
|
|
|
| |
has been applied fairly arbitrarily in this module (nsmallest uses
Py_ssize_t, nlargest does not) and it probably deserves a more complete
review. Fixes heapq.nsmallest() always returning the empty list (on
platforms with 64-bit ssize_t/long)
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
signed with unsigned types in comparison.
|
| |
|
|
|
|
| |
http://mail.python.org/pipermail/python-dev/2006-February/060524.html
|
|
|
|
| |
Proposed by Tim Peters.
|
|
|
|
|
| |
of seconds, producing numbers 1000 times too large. It would be nice to
write a test for this, but how... (thanks mwh)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Based on lsprof (patch #1212837) by Brett Rosen and Ted Czotter.
With further editing by Michael Hudson and myself.
History in svn repo: http://codespeak.net/svn/user/arigo/hack/misc/lsprof
* Module/_lsprof.c is the internal C module, Lib/cProfile.py a wrapper.
* pstats.py updated to display cProfile's caller/callee timings if available.
* setup.py and NEWS updated.
* documentation updates in the profiler section:
- explain the differences between the three profilers that we have now
- profile and cProfile can use a unified documentation, like (c)Pickle
- mention that hotshot is "for specialized usage" now
- removed references to the "old profiler" that no longer exists
* test updates:
- extended test_profile to cover delicate cases like recursion
- added tests for the caller/callee displays
- added test_cProfile, performing the same tests for cProfile
* TO-DO:
- cProfile gives a nicer name to built-in, particularly built-in methods,
which could be backported to profile.
- not tested on Windows recently!
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
is larger than FD_SETSIZE.
This can only be acheived with ulimit -n SOME_NUMBER_BIGGER_THAN_FD_SETSIZE
which is typically only available to root. Since this wouldn't normally
be run in a test (ie, run as root), it doesn't seem too worthwhile to
add a normal test. The bug report has one version of a test. I've
written another. Not sure what the best thing to do is.
Do the check before calling internal_select() because we can't set
an error in between Py_BEGIN_ALLOW_THREADS and Py_END_ALLOW_THREADS.
This seemed the clearest solution, ie handle before calling internal_select()
rather than inside. Plus there is at least one place outside
of internal_select() that needed to be handled.
Will backport.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
on both Unix (SVR4 and BSD) and Windows. Restores behaviour of passing -1
for anonymous memory on Unix. Use MAP_ANONYMOUS instead of _ANON since
the latter is deprecated according to Linux (gentoo) man pages.
Should we continue to allow mmap.mmap(0, length) to work on Windows?
0 is a valid fd.
Will backport bugfix portions.
|
| |
|
| |
|
| |
|
|
|
|
| |
is ok for a standalone pybsddb source dist for use with <= 2.3.
|
| |
|
|
|
|
| |
Will backport.
|
|
|
|
|
|
| |
this fixes the bsddb db associate tests when compiled against
BerkeleyDB 3.3 thru 4.1. 4.2 thru 4.4 already passed and still
pass.
|
|
|
|
|
| |
way back thru 3.2). This should be backported to the release24-maint
branch.
|