Commit Graph

30046 Commits

Author SHA1 Message Date
Raymond Hettinger 6ea4845822 * Make the tests independent of the default precision.
* Change the default precision to 28 (to match VB's decimal type).
2004-07-03 12:26:21 +00:00
Vinay Sajip 17c52d8493 Refactored RotatingFileHandler to create a base class for rotating handlers. Added TimedRotatingFileHandler. 2004-07-03 11:48:34 +00:00
Vinay Sajip 779e0c9334 Changed basicConfig() to add keyword arguments. Changes are backward-compatible.
Added error checking to log() to check that level is an integer, and raise a TypeError if not (as long as raiseExceptions is set).
Minor documentation corrections.
2004-07-03 11:47:26 +00:00
Vinay Sajip a13c60b810 Moved example section up to just after the section on Logger objects, and changed it to use the new basicConfig() API 2004-07-03 11:45:53 +00:00
Raymond Hettinger d9c0a7ae94 Work through several open todos:
* Added test for pickling contexts
* Renamed ExceptionList to Signals (to match wording in the spec)
* Simplified Context constructor by allowing flags=None to automatically
  generate a zeroed-out flags dictionary.
* inlined _convertString() which was used only once
* _rounding_decision is private, so excluded its contants from __all__.
* added an XXX comment with concerns about subclassing signals results in
  a deviation from the spec (maybe important, maybe not).
* Taught the test_suite to determine its own directory (modeled after code
  in regrtest.py).  Enables it to be run when the current directory is not
  the test directory.
* Added a clear_flags() method to the Context API to make it easier to do
  a common operation with flags.
* Fixed the trap_enablers defaults in BasicDefaultContext to match the spec.
2004-07-03 10:02:28 +00:00
Brett Cannon 41d13f61d2 Clarify last added comment (bug #754449). 2004-07-03 03:54:54 +00:00
Brett Cannon cc4e935ea5 threading.Thread objects will now print a traceback for an exception raised
during interpreter shutdown instead of masking it with another traceback about
accessing a NoneType when trying to print the exception out in the first place.

Closes bug #754449 (using patch #954922).
2004-07-03 03:52:35 +00:00
Mark Hammond f9bfdd850c Patch [ 983775 ] Allow bdist_wininst to install for non-admin users
to address bugs:
[ 555812 ] installing extension w/o admin rights
[ 555810 ] removing extensions without admin rights

* When enumerating the Python versions found, also remember the HKEY
  they were found under.
* When installing, if Python was installed under HKCU, we will too.
  If Python was installed under HKLM, we check the permissions of
  the current user, and install where we can.
* The "root" key we use is a global variable - all registry setting and
  delete functions use this global rather than a hardcoded HKLM.
* A new entry is written to the install log, indicating the key we used.
  Uninstallation is based on this key.
* 'tempnam()' is used rather than 'tmpnam()' - 'tmpnam' creates a temp
  file on the root of the current drive, and if this is readonly would
  explain the 'freopen' errors occasionally reported. 'tempnam'
  creates the temp file in the %TEMP% directory.
2004-07-02 23:53:16 +00:00
Walter Dörwald 59ad45689b Add tests that check the result of calendar.monthcalendar() for a set
of corner cases.
2004-07-02 19:00:09 +00:00
Fred Drake 0a4dd390bf Make weak references subclassable:
- weakref.ref and weakref.ReferenceType will become aliases for each
  other

- weakref.ref will be a modern, new-style class with proper __new__
  and __init__ methods

- weakref.WeakValueDictionary will have a lighter memory footprint,
  using a new weakref.ref subclass to associate the key with the
  value, allowing us to have only a single object of overhead for each
  dictionary entry (currently, there are 3 objects of overhead per
  entry: a weakref to the value, a weakref to the dictionary, and a
  function object used as a weakref callback; the weakref to the
  dictionary could be avoided without this change)

- a new macro, PyWeakref_CheckRefExact(), will be added

- PyWeakref_CheckRef() will check for subclasses of weakref.ref

This closes SF patch #983019.
2004-07-02 18:57:45 +00:00
Thomas Heller 813914049d Update info about the windows build. 2004-07-02 08:58:46 +00:00
Thomas Heller 04c673b6e2 SF #951851 fixed. 2004-07-02 08:56:20 +00:00
Thomas Heller 1df04617b7 When importing an extension on Windows, the code reads the PE 'import
table' of the dll, to make sure that the dll really was build for the
correct Python version.  It does this by looking for an entry
'pythonXY.dll' (X.Y is the Python version number).

The code now checks the size of the dll's import table before reading
entries from it.  Before this patch, the code crashed trying to read
the import table when the size was zero (as in Win2k's wmi.dll, for
example).

Look for imports of 'pythonXY_d.dll' in a debug build instead of
'pythonXY.dll'.

Fixes SF 951851: Crash when reading "import table" of certain windows dlls.

Already backported to the 2.3 branch.
2004-07-02 08:53:57 +00:00
Thomas Heller 32b8f8052a Fix for SF 982215: bdist_wininst - Next button not greyed out during file copy.
Patch from Mark Hammond.
Recompiled binary.

Already packported to the 2.3 branch.
2004-07-02 08:02:40 +00:00
Raymond Hettinger 214b1c3aae SF Bug #215126: Over restricted type checking on eval() function
The builtin eval() function now accepts any mapping for the locals argument.
Time sensitive steps guarded by PyDict_CheckExact() to keep from slowing
down the normal case.  My timings so no measurable impact.
2004-07-02 06:41:07 +00:00
Skip Montanaro 78bace7442 add cp866 row 2004-07-02 02:14:34 +00:00
Brett Cannon d88471f432 Change signatures for arguments to "s" and friends to be the proper ``const
char *`` instead of just ``char *``.  Also added the mentioning of "const" in
some places where it was left out even when the signature already stated the
fact.

Closes bug #980925.
2004-07-01 20:55:42 +00:00
Fred Drake 83a6430717 Committing Tim's patch for SF bug #983585:
test_repr() fails with id() values that appear negative
2004-07-01 20:28:47 +00:00
Walter Dörwald ac1075a645 Document that encode() and decode() raise UnicodeError
instead of ValueError.

Add a note about error handling schemes added by PEP 293.
2004-07-01 19:58:47 +00:00
Skip Montanaro ecf7a52bb8 link to the codecs page from the "".encode() description. 2004-07-01 19:26:04 +00:00
Michael W. Hudson d7cc1bd809 Fix
[ 924301 ] A leak case with cmd.py & readline & exception

by ensuring that the readline completion function is always reset
even in the case of an exception being raised.  As a bonus, this
makes the documentation for pre & postloop accurate again.
2004-07-01 14:52:10 +00:00
Fred Drake 1f34eb17b5 fix small consistency nit 2004-07-01 14:28:36 +00:00
Fred Drake 1b89656d70 add omitted markup 2004-07-01 14:26:31 +00:00
Raymond Hettinger 68a37ac841 * Fix typos.
* Format an example so that the identation is more obvious.
* Add a section on the decimal module to the Brief Tour Part II.
2004-07-01 12:56:54 +00:00
Raymond Hettinger 0fff62f9cd Move Decimal from the sandbox into production. 2004-07-01 11:52:15 +00:00
Raymond Hettinger 75cc1cb7e0 Move Decimal from the sandbox into production. 2004-07-01 11:15:39 +00:00
Raymond Hettinger 7c85fa4a52 Move Decimal from the sandbox into production. 2004-07-01 11:01:35 +00:00
Skip Montanaro 2ccf5d689b use file() in preference to open() 2004-06-30 21:06:45 +00:00
Michael W. Hudson 7db865af40 tyop 2004-06-30 09:09:38 +00:00
Michael W. Hudson c30ba849cf restore NEWS entry for 957240 2004-06-30 09:06:29 +00:00
Michael W. Hudson d5cf143482 Check in the updated version of patch #957240, which doesn't rely
on the marshalling characteristics of infinities.
2004-06-30 09:02:33 +00:00
Fred Drake 96b935e643 fix handling when a proper getopt(1) is available; the "--"
end-of-options marker wasn't recognized
2004-06-29 14:39:06 +00:00
Andrew M. Kuchling 93b4b88e96 [Patch #974633] Check PyObject_MALLOC return for error 2004-06-29 14:03:04 +00:00
Andrew M. Kuchling 6d3a0d2dff [Bug #948970] Add PyExc_* symbols to index.
(I ran this through texcheck, but don't have LaTeX installed on this machine and therefore haven't
verified that the changes are accepted by LaTeX.)
2004-06-29 13:52:14 +00:00
Andrew M. Kuchling 7dd8fda49f [Bug #978556] Update SHA spec URL; bugfix candidate 2004-06-29 13:35:01 +00:00
Andrew M. Kuchling 08c08bb3d1 [Bug #912845] urllib2 only checks for a 200 return code, but 206 is also legal if a Range: header was supplied.
(Actually, should the first 'if' statement be modified to allow any 2xx status code?)
2004-06-29 13:19:19 +00:00
Andrew M. Kuchling 31352c5a30 Remove unused import. (If it's there for some deep, dark reason, it should have been commented.) 2004-06-29 13:17:29 +00:00
Andrew M. Kuchling bd3200fa2b Add test case for bug #912845: requesting an HTTP byte range doesn't work 2004-06-29 13:15:46 +00:00
Andrew M. Kuchling f1a2f9ec41 Docstring grammar fix 2004-06-29 13:07:53 +00:00
Brett Cannon a031a0870d Add a missing space. 2004-06-29 04:14:02 +00:00
Brett Cannon 46d4ff2b72 Fix stupid mistake of forgetting to mention that the fix for bug #981299
entailed editing the urlparse module.
2004-06-29 04:08:23 +00:00
Brett Cannon fbac294d59 rsync is now a recognized protocol that uses "netloc" (i.e. specifies a network
location) in its addressing.

Closes bug #981299.
2004-06-29 04:02:40 +00:00
Brett Cannon 289e4cba1c Changed applicable use of ``char *`` declarations that are passed into
PyArg_ParseTuple() to ``const char *`` to match the recommendation made in
section 1.3 and to support better coding habits.

Section 1.8 ("Keyword Parameters for Extension Functions") and it's coding
example were not touched since it is stems from an accredited source and thus
did not want to step on anyone's toes.
2004-06-29 03:48:23 +00:00
Martin v. Löwis 93d1b2c93c Add readme.txt 2004-06-28 15:24:23 +00:00
Raymond Hettinger 3b04ce824d Patch from Mark Hammond to fix a test error.
Now runs without exception on WinME/98.
2004-06-28 06:57:19 +00:00
Gregory P. Smith 19699a9351 Adds support for DB.pget and DBCursor.pget methods.
Based on a patch supplied by Ian Ward <ian@arevco.ca> on the pybsddb
mailing list 2004-03-26.
2004-06-28 04:06:49 +00:00
Gregory P. Smith 31c50659ea Add weakref support to all bsddb.db objects.
Make DBTxn objects automatically call abort() in their destructor if
not yet finalized and raise a RuntimeWarning to that effect.
2004-06-28 01:20:40 +00:00
Barry Warsaw 11b91a0ea3 Added socket.getservbyport(), and make its second argument and that of
getservbyname() optional.  Update the tests and the docs.
2004-06-28 00:50:43 +00:00
Brett Cannon 1ed5705154 Add missing backslash for PyDateTimeAPI->Delta_FromDelta() macro. 2004-06-28 00:48:30 +00:00
Gregory P. Smith 589c6abd1b raise the module minor version. 2004-06-27 23:36:37 +00:00