summaryrefslogtreecommitdiffstats
path: root/Modules
Commit message (Collapse)AuthorAgeFilesLines
* Py_ssize_t-ify.Thomas Wouters2006-03-011-5/+10
|
* Fix DBEnv's set_tx_timestamp wrapper to be slightly more correct onThomas Wouters2006-03-011-4/+5
| | | | | | | | | non-32bit platforms. Will still only allow 32 bits in a timestamp on Win64, but at least it won't crash, and it'll work right on platforms where longs are big enough to contain time_t's. (A better-working, although conceptually less-right fix would have been to use Py_ssize_t here, but Martin and Tim won't let me.)
* Updates to the with-statement:Guido van Rossum2006-02-281-0/+36
| | | | | | | | | | | | | | | | - New semantics for __exit__() -- it must re-raise the exception if type is not None; the with-statement itself doesn't do this. (See the updated PEP for motivation.) - Added context managers to: - file - thread.LockType - threading.{Lock,RLock,Condition,Semaphore,BoundedSemaphore} - decimal.Context - Added contextlib.py, which defines @contextmanager, nested(), closing(). - Unit tests all around; bot no docs yet.
* Another bit of unconstification.Tim Peters2006-02-281-1/+1
|
* SF patch #1438387, PEP 328: relative and absolute imports.Thomas Wouters2006-02-281-13/+28
| | | | | | | | | | | | | | | | | | | | | | | - IMPORT_NAME takes an extra argument from the stack: the relativeness of the import. Only passed to __import__ when it's not -1. - __import__() takes an optional 5th argument for the same thing; it __defaults to -1 (old semantics: try relative, then absolute) - 'from . import name' imports name (be it module or regular attribute) from the current module's *package*. Likewise, 'from .module import name' will import name from a sibling to the current module. - Importing from outside a package is not allowed; 'from . import sys' in a toplevel module will not work, nor will 'from .. import sys' in a (single-level) package. - 'from __future__ import absolute_import' will turn on the new semantics for import and from-import: imports will be absolute, except for from-import with dots. Includes tests for regular imports and importhooks, parser changes and a NEWS item, but no compiler-package changes or documentation changes.
* unconst.Martin v. Löwis2006-02-271-2/+2
|
* Convert array.array.insert to use Py_ssize_t (like the rest already does.)Thomas Wouters2006-02-271-2/+2
|
* More unconsting.Martin v. Löwis2006-02-279-62/+56
|
* unconst.Martin v. Löwis2006-02-271-9/+9
|
* Revert backwards-incompatible const changes.Martin v. Löwis2006-02-2712-30/+30
|
* Update for PEP 308 patch.Thomas Wouters2006-02-271-3/+54
|
* Create _ast module.Martin v. Löwis2006-02-271-0/+4
| | | | Cleanup Python-ast.c generation.
* - Patch 1433928:Guido van Rossum2006-02-251-1/+265
| | | | | | | | - 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).
* Fix typo in functional moduleGeorg Brandl2006-02-211-2/+2
|
* NETLINK_TCPDIAG and NETLINK_NFLOG aren't defined on older LinuxGuido van Rossum2006-02-211-0/+4
| | | | systems; define these conditionally.
* Patch #931938: prevent setting sys.prefix to ""Georg Brandl2006-02-201-0/+6
|
* Bug #854823: socketmodule now builds on Sun platforms even whenGeorg Brandl2006-02-201-2/+2
| | | | INET_ADDRSTRLEN is not defined.
* Fix a build problem introduced by r42230.Hye-Shik Chang2006-02-191-1/+1
|
* Remove two instances of trailing commas. Resolves patch #1209781.Georg Brandl2006-02-192-2/+2
|
* Patch #1352711: make zipimport raise a complete IOErrorGeorg Brandl2006-02-191-2/+1
|
* Remove unused variableNeal Norwitz2006-02-181-1/+0
|
* Patch #1393157: os.startfile() now has an optional argument to specifyGeorg Brandl2006-02-181-7/+14
| | | | a "command verb" to invoke on the file.
* Bug #1366000: cleanup BZ2File.seek() logic. Fixes the case of whence=2, ↵Georg Brandl2006-02-181-42/+33
| | | | offset>=0.
* Fix typo.Martin v. Löwis2006-02-181-1/+1
|
* Fix size computation on Win64.Martin v. Löwis2006-02-181-12/+46
|
* Make ssize_t-clean.Martin v. Löwis2006-02-171-38/+40
|
* Add deprecation warning to modules deprecated since 2000.Georg Brandl2006-02-171-0/+5
|
* Fix typo.Thomas Wouters2006-02-171-1/+1
|
* Bug #1432350: arrayobject should use PyObject_VAR_HEADGeorg Brandl2006-02-171-2/+1
|
* Remove size restrictions.Martin v. Löwis2006-02-171-29/+19
|
* mmap_flush_method(): Squash compiler warning aboutTim Peters2006-02-171-2/+2
| | | | mixing signed and unsigned types in comparison.
* Remove space between function name and left parenTim Peters2006-02-171-94/+92
| | | | in function calls.
* Removed pointless parens around `return` expressions;Tim Peters2006-02-161-22/+20
| | | | deleted some curlies around one-line blocks.
* Trimmed trailing whitespace.Tim Peters2006-02-161-41/+41
|
* new_mmap_object(), Windows flavor.Tim Peters2006-02-161-2/+16
| | | | | | | | | | | | | | 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.
* More Py_ssize_t format characters.Thomas Wouters2006-02-161-1/+1
|
* struct_pack(): Repair new assert-fail crash inTim Peters2006-02-161-1/+1
| | | | | debug-build test_struct on a box where plain "char" is signed.
* Also make _heapq.nlargest() use Py_ssize_t instead of ints, to iter overThomas Wouters2006-02-161-2/+2
| | | | | lists and call Py_ssize_t-using helpers. All other code in this module was already adapted to Py_ssize_t.
* Use 'n' format for Py_ssize_t variables to PyArg_ParseTuple(). Py_ssize_tThomas Wouters2006-02-161-1/+1
| | | | | | | 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)
* Use correct format specifier for Py_ssize_t variable to PyArg_ParseTuple().Thomas Wouters2006-02-161-1/+1
|
* Change _PyObject_GC_Resize to expect Py_ssize_t.Martin v. Löwis2006-02-161-1/+1
|
* Use Py_ssize_t for counts and sizes.Martin v. Löwis2006-02-1612-66/+67
|
* Update comment and make accurate.Neal Norwitz2006-02-161-1/+1
|
* Merge ssize_t branch.Martin v. Löwis2006-02-1526-275/+338
|
* randombits(): Stop compiler warning about mixingTim Peters2006-02-151-1/+1
| | | | signed with unsigned types in comparison.
* Try to improve name based on discussion on python-checkins with Jim JewettNeal Norwitz2006-02-131-5/+5
|
* Renamed _length_cue() to __length_hint__(). See:Armin Rigo2006-02-112-4/+4
| | | | http://mail.python.org/pipermail/python-dev/2006-February/060524.html
* Introduce Py_SOCKET_FD_CAN_BE_GE_FD_SETSIZE.Martin v. Löwis2006-02-112-0/+9
| | | | Proposed by Tim Peters.
* The default timer unit was incorrectly measured in milliseconds insteadArmin Rigo2006-02-101-3/+3
| | | | | of seconds, producing numbers 1000 times too large. It would be nice to write a test for this, but how... (thanks mwh)
* Added the cProfile module.Armin Rigo2006-02-083-0/+1015
| | | | | | | | | | | | | | | | | | | | | | | 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!