]> granicus.if.org Git - python/log
python
21 years ago* Make the tests independent of the default precision.
Raymond Hettinger [Sat, 3 Jul 2004 12:26:21 +0000 (12:26 +0000)]
* Make the tests independent of the default precision.
* Change the default precision to 28 (to match VB's decimal type).

21 years agoRefactored RotatingFileHandler to create a base class for rotating handlers. Added...
Vinay Sajip [Sat, 3 Jul 2004 11:48:34 +0000 (11:48 +0000)]
Refactored RotatingFileHandler to create a base class  for rotating handlers. Added TimedRotatingFileHandler.

21 years agoChanged basicConfig() to add keyword arguments. Changes are backward-compatible.
Vinay Sajip [Sat, 3 Jul 2004 11:47:26 +0000 (11:47 +0000)]
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.

21 years agoMoved example section up to just after the section on Logger objects, and changed...
Vinay Sajip [Sat, 3 Jul 2004 11:45:53 +0000 (11:45 +0000)]
Moved example section up to just after the section on Logger objects, and changed it to use the new basicConfig() API

21 years agoWork through several open todos:
Raymond Hettinger [Sat, 3 Jul 2004 10:02:28 +0000 (10:02 +0000)]
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.

21 years agoClarify last added comment (bug #754449).
Brett Cannon [Sat, 3 Jul 2004 03:54:54 +0000 (03:54 +0000)]
Clarify last added comment (bug #754449).

21 years agothreading.Thread objects will now print a traceback for an exception raised
Brett Cannon [Sat, 3 Jul 2004 03:52:35 +0000 (03:52 +0000)]
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).

21 years agoPatch [ 983775 ] Allow bdist_wininst to install for non-admin users
Mark Hammond [Fri, 2 Jul 2004 23:53:16 +0000 (23:53 +0000)]
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.

21 years agoAdd tests that check the result of calendar.monthcalendar() for a set
Walter Dörwald [Fri, 2 Jul 2004 19:00:09 +0000 (19:00 +0000)]
Add tests that check the result of calendar.monthcalendar() for a set
of corner cases.

21 years agoMake weak references subclassable:
Fred Drake [Fri, 2 Jul 2004 18:57:45 +0000 (18:57 +0000)]
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.

21 years agoUpdate info about the windows build.
Thomas Heller [Fri, 2 Jul 2004 08:58:46 +0000 (08:58 +0000)]
Update info about the windows build.

21 years agoSF #951851 fixed.
Thomas Heller [Fri, 2 Jul 2004 08:56:20 +0000 (08:56 +0000)]
SF #951851 fixed.

21 years agoWhen importing an extension on Windows, the code reads the PE 'import
Thomas Heller [Fri, 2 Jul 2004 08:53:57 +0000 (08:53 +0000)]
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.

21 years agoFix for SF 982215: bdist_wininst - Next button not greyed out during file copy.
Thomas Heller [Fri, 2 Jul 2004 08:02:40 +0000 (08:02 +0000)]
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.

21 years agoSF Bug #215126: Over restricted type checking on eval() function
Raymond Hettinger [Fri, 2 Jul 2004 06:41:07 +0000 (06:41 +0000)]
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.

21 years agoadd cp866 row
Skip Montanaro [Fri, 2 Jul 2004 02:14:34 +0000 (02:14 +0000)]
add cp866 row

21 years agoChange signatures for arguments to "s" and friends to be the proper ``const
Brett Cannon [Thu, 1 Jul 2004 20:55:42 +0000 (20:55 +0000)]
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.

21 years agoCommitting Tim's patch for SF bug #983585:
Fred Drake [Thu, 1 Jul 2004 20:28:47 +0000 (20:28 +0000)]
Committing Tim's patch for SF bug #983585:
test_repr() fails with id() values that appear negative

21 years agoDocument that encode() and decode() raise UnicodeError
Walter Dörwald [Thu, 1 Jul 2004 19:58:47 +0000 (19:58 +0000)]
Document that encode() and decode() raise UnicodeError
instead of ValueError.

Add a note about error handling schemes added by PEP 293.

21 years agolink to the codecs page from the "".encode() description.
Skip Montanaro [Thu, 1 Jul 2004 19:26:04 +0000 (19:26 +0000)]
link to the codecs page from the "".encode() description.

21 years agoFix
Michael W. Hudson [Thu, 1 Jul 2004 14:52:10 +0000 (14:52 +0000)]
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.

21 years agofix small consistency nit
Fred Drake [Thu, 1 Jul 2004 14:28:36 +0000 (14:28 +0000)]
fix small consistency nit

21 years agoadd omitted markup
Fred Drake [Thu, 1 Jul 2004 14:26:31 +0000 (14:26 +0000)]
add omitted markup

21 years ago* Fix typos.
Raymond Hettinger [Thu, 1 Jul 2004 12:56:54 +0000 (12:56 +0000)]
* 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.

21 years agoMove Decimal from the sandbox into production.
Raymond Hettinger [Thu, 1 Jul 2004 11:52:15 +0000 (11:52 +0000)]
Move Decimal from the sandbox into production.

21 years agoMove Decimal from the sandbox into production.
Raymond Hettinger [Thu, 1 Jul 2004 11:15:39 +0000 (11:15 +0000)]
Move Decimal from the sandbox into production.

21 years agoMove Decimal from the sandbox into production.
Raymond Hettinger [Thu, 1 Jul 2004 11:01:35 +0000 (11:01 +0000)]
Move Decimal from the sandbox into production.

21 years agouse file() in preference to open()
Skip Montanaro [Wed, 30 Jun 2004 21:06:45 +0000 (21:06 +0000)]
use file() in preference to open()

21 years agotyop
Michael W. Hudson [Wed, 30 Jun 2004 09:09:38 +0000 (09:09 +0000)]
tyop

21 years agorestore NEWS entry for 957240
Michael W. Hudson [Wed, 30 Jun 2004 09:06:29 +0000 (09:06 +0000)]
restore NEWS entry for 957240

21 years agoCheck in the updated version of patch #957240, which doesn't rely
Michael W. Hudson [Wed, 30 Jun 2004 09:02:33 +0000 (09:02 +0000)]
Check in the updated version of patch #957240, which doesn't rely
on the marshalling characteristics of infinities.

21 years agofix handling when a proper getopt(1) is available; the "--"
Fred Drake [Tue, 29 Jun 2004 14:39:06 +0000 (14:39 +0000)]
fix handling when a proper getopt(1) is available; the "--"
end-of-options marker wasn't recognized

21 years ago[Patch #974633] Check PyObject_MALLOC return for error
Andrew M. Kuchling [Tue, 29 Jun 2004 14:03:04 +0000 (14:03 +0000)]
[Patch #974633] Check PyObject_MALLOC return for error

21 years ago[Bug #948970] Add PyExc_* symbols to index.
Andrew M. Kuchling [Tue, 29 Jun 2004 13:52:14 +0000 (13:52 +0000)]
[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.)

21 years ago[Bug #978556] Update SHA spec URL; bugfix candidate
Andrew M. Kuchling [Tue, 29 Jun 2004 13:35:01 +0000 (13:35 +0000)]
[Bug #978556] Update SHA spec URL; bugfix candidate

21 years ago[Bug #912845] urllib2 only checks for a 200 return code, but 206 is also legal if...
Andrew M. Kuchling [Tue, 29 Jun 2004 13:19:19 +0000 (13:19 +0000)]
[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?)

21 years agoRemove unused import. (If it's there for some deep, dark reason, it should have...
Andrew M. Kuchling [Tue, 29 Jun 2004 13:17:29 +0000 (13:17 +0000)]
Remove unused import.  (If it's there for some deep, dark reason, it should have been commented.)

21 years agoAdd test case for bug #912845: requesting an HTTP byte range doesn't work
Andrew M. Kuchling [Tue, 29 Jun 2004 13:15:46 +0000 (13:15 +0000)]
Add test case for bug #912845: requesting an HTTP byte range doesn't work

21 years agoDocstring grammar fix
Andrew M. Kuchling [Tue, 29 Jun 2004 13:07:53 +0000 (13:07 +0000)]
Docstring grammar fix

21 years agoAdd a missing space.
Brett Cannon [Tue, 29 Jun 2004 04:14:02 +0000 (04:14 +0000)]
Add a missing space.

21 years agoFix stupid mistake of forgetting to mention that the fix for bug #981299
Brett Cannon [Tue, 29 Jun 2004 04:08:23 +0000 (04:08 +0000)]
Fix stupid mistake of forgetting to mention that the fix for bug #981299
entailed editing the urlparse module.

21 years agorsync is now a recognized protocol that uses "netloc" (i.e. specifies a network
Brett Cannon [Tue, 29 Jun 2004 04:02:40 +0000 (04:02 +0000)]
rsync is now a recognized protocol that uses "netloc" (i.e. specifies a network
location) in its addressing.

Closes bug #981299.

21 years agoChanged applicable use of ``char *`` declarations that are passed into
Brett Cannon [Tue, 29 Jun 2004 03:48:23 +0000 (03:48 +0000)]
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.

21 years agoAdd readme.txt
Martin v. Löwis [Mon, 28 Jun 2004 15:24:23 +0000 (15:24 +0000)]
Add readme.txt

21 years agoPatch from Mark Hammond to fix a test error.
Raymond Hettinger [Mon, 28 Jun 2004 06:57:19 +0000 (06:57 +0000)]
Patch from Mark Hammond to fix a test error.
Now runs without exception on WinME/98.

21 years agoAdds support for DB.pget and DBCursor.pget methods.
Gregory P. Smith [Mon, 28 Jun 2004 04:06:49 +0000 (04:06 +0000)]
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.

21 years agoAdd weakref support to all bsddb.db objects.
Gregory P. Smith [Mon, 28 Jun 2004 01:20:40 +0000 (01:20 +0000)]
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.

21 years agoAdded socket.getservbyport(), and make its second argument and that of
Barry Warsaw [Mon, 28 Jun 2004 00:50:43 +0000 (00:50 +0000)]
Added socket.getservbyport(), and make its second argument and that of
getservbyname() optional.  Update the tests and the docs.

21 years agoAdd missing backslash for PyDateTimeAPI->Delta_FromDelta() macro.
Brett Cannon [Mon, 28 Jun 2004 00:48:30 +0000 (00:48 +0000)]
Add missing backslash for PyDateTimeAPI->Delta_FromDelta() macro.

21 years agoraise the module minor version.
Gregory P. Smith [Sun, 27 Jun 2004 23:36:37 +0000 (23:36 +0000)]
raise the module minor version.

21 years agoSF patch / bug #967763
Gregory P. Smith [Sun, 27 Jun 2004 23:32:34 +0000 (23:32 +0000)]
SF patch / bug #967763
Fix memory leaks revealed by valgrind and ensuing code inspection.

In the existing test suite valgrind revealed two memory leaks (DB_get
and DBC_set_range).  Code inspection revealed that there were many other
potential similar leaks (many on odd code error paths such as passing
something other than a DBTxn object for a txn= parameter or in the face
of an out of memory error).  The most common case that would cause a
leak was when using recno or queue format databases with integer keys,
sometimes only with an exception exit.

21 years agoAdd code for a range function that uses generators.
Brett Cannon [Sun, 27 Jun 2004 23:17:35 +0000 (23:17 +0000)]
Add code for a range function that uses generators.

Cleaned up existing code by abstracting code to parse arguments.  Also removed
any unneeded operations (such as calling 'int' on a division when using floor
division also works).  Fixed a bug where the values  returned by
OldStyleRange could be short by one value.  Added more documentation.

Testing code also has a basic sanity check.

21 years agoFix SF bug # 897820 - we can no longer use the DB_TRUNCATE flag when
Gregory P. Smith [Sun, 27 Jun 2004 22:56:42 +0000 (22:56 +0000)]
Fix SF bug # 897820 - we can no longer use the DB_TRUNCATE flag when
opening the DB to implement legacy interface flag='n' support as
BerkeleyDB 4.2.52 no longer allows it in transaction protected
environments.  Do the os.unlink ourselves.

21 years agosizeof(char) is 1, by definition, so get rid of that expression in
Tim Peters [Sun, 27 Jun 2004 17:24:49 +0000 (17:24 +0000)]
sizeof(char) is 1, by definition, so get rid of that expression in
places it's just noise.

21 years agoPatch #923098: Share interned strings in marshal.
Martin v. Löwis [Sun, 27 Jun 2004 16:51:46 +0000 (16:51 +0000)]
Patch #923098: Share interned strings in marshal.

21 years agoPatch #966493: Cleanup generator/eval_frame exposure.
Martin v. Löwis [Sun, 27 Jun 2004 15:43:12 +0000 (15:43 +0000)]
Patch #966493: Cleanup generator/eval_frame exposure.

21 years agoMention Py_RETURN_NONE when introducing the idiom of how to have a function
Brett Cannon [Sun, 27 Jun 2004 04:28:00 +0000 (04:28 +0000)]
Mention Py_RETURN_NONE when introducing the idiom of how to have a function
return Py_None.

21 years ago* Silence a test failure that resulted when test_site was run by
Raymond Hettinger [Sun, 27 Jun 2004 03:02:18 +0000 (03:02 +0000)]
* Silence a test failure that resulted when test_site was run by
  regrtest.py after it ran test_frozen.  This test was really only
  designed to be run immediately after startup.  Afterwards, other
  modules could be loaded when had not been fixed-up by site.py
  Took the chicken way out and only tested those modules known to
  be imported by site.py.

* Normalized whitespace.

21 years agoSF bug #980419: int left-shift causes memory leak
Raymond Hettinger [Sat, 26 Jun 2004 23:22:57 +0000 (23:22 +0000)]
SF bug #980419: int left-shift causes memory leak

21 years agoClarify sentence at end of Intermezzo section stating that PyMODINIT_FUNC will
Brett Cannon [Sat, 26 Jun 2004 23:10:32 +0000 (23:10 +0000)]
Clarify sentence at end of Intermezzo section stating that PyMODINIT_FUNC will
be discussed later by saying it is the function return type of the sample code
to make spotting it easier.

21 years agoInstall Barry's smtpd.py daemon.
Skip Montanaro [Sat, 26 Jun 2004 22:29:42 +0000 (22:29 +0000)]
Install Barry's smtpd.py daemon.

21 years agoremove debugging print
Skip Montanaro [Sat, 26 Jun 2004 19:42:10 +0000 (19:42 +0000)]
remove debugging print

21 years agoAllow classes from other modules to be specified at startup. For example,
Skip Montanaro [Sat, 26 Jun 2004 19:18:49 +0000 (19:18 +0000)]
Allow classes from other modules to be specified at startup.  For example,
using the postfixproxy module from Spambayes you might start smtpd up like

    smtpd.py -c spambayes.postfixproxy.SpambayesProxy :8025 :8026

21 years agoAdd a comment with implementation notes.
Raymond Hettinger [Sat, 26 Jun 2004 04:42:06 +0000 (04:42 +0000)]
Add a comment with implementation notes.

21 years agoGet ceval.c to compile again by moving declarations before other statments.
Raymond Hettinger [Sat, 26 Jun 2004 04:34:33 +0000 (04:34 +0000)]
Get ceval.c to compile again by moving declarations before other statments.

21 years agoModules/getpath.c now compiles properly under OS X when using the
Brett Cannon [Sat, 26 Jun 2004 04:03:06 +0000 (04:03 +0000)]
Modules/getpath.c now compiles properly under OS X when using the
--disable-framework build; header file was protected in an #if using the wrong
macro to check.

Closes bug #978645.

21 years agoMassive performance improvement for C extension and builtin tracing code
Nicholas Bastin [Fri, 25 Jun 2004 23:31:06 +0000 (23:31 +0000)]
Massive performance improvement for C extension and builtin tracing code

21 years agoMake distutils "install --home" support all platforms.
Fred Drake [Fri, 25 Jun 2004 23:02:59 +0000 (23:02 +0000)]
Make distutils "install --home" support all platforms.

21 years agoCosmetic spacing fix.
Raymond Hettinger [Fri, 25 Jun 2004 22:24:35 +0000 (22:24 +0000)]
Cosmetic spacing fix.

21 years agoFix leak found by Eric Huss.
Raymond Hettinger [Fri, 25 Jun 2004 22:20:33 +0000 (22:20 +0000)]
Fix leak found by Eric Huss.

21 years agoFix leak found by Eric Huss.
Raymond Hettinger [Fri, 25 Jun 2004 22:17:39 +0000 (22:17 +0000)]
Fix leak found by Eric Huss.

21 years agoadd boilerplate so the test modules can be run as scripts
Fred Drake [Fri, 25 Jun 2004 19:04:21 +0000 (19:04 +0000)]
add boilerplate so the test modules can be run as scripts

21 years agoMove NOP to end of code transformation.
Raymond Hettinger [Thu, 24 Jun 2004 09:25:39 +0000 (09:25 +0000)]
Move NOP to end of code transformation.

21 years agomove the note about the bsddb185 module above the "See also" box; that
Fred Drake [Thu, 24 Jun 2004 06:03:59 +0000 (06:03 +0000)]
move the note about the bsddb185 module above the "See also" box; that
should always go last in the relevant section's main content, but
before child sections

21 years agoAdd compilation of timemodule.c with datetimemodule.c to get
Brett Cannon [Thu, 24 Jun 2004 01:38:47 +0000 (01:38 +0000)]
Add compilation of timemodule.c with datetimemodule.c to get
__PyTime_DoubleToTimet().

21 years agoChange comment from C++ style to C.
Brett Cannon [Thu, 24 Jun 2004 00:48:44 +0000 (00:48 +0000)]
Change comment from C++ style to C.

21 years agoLess ugly #ifdefs for C profiling fix
Nicholas Bastin [Tue, 22 Jun 2004 15:37:51 +0000 (15:37 +0000)]
Less ugly #ifdefs for C profiling fix

21 years agoOne forgotten C profiling #ifdef
Nicholas Bastin [Tue, 22 Jun 2004 04:18:47 +0000 (04:18 +0000)]
One forgotten C profiling #ifdef

21 years agoMaking C profiling a configure option (at least temporarily)
Nicholas Bastin [Tue, 22 Jun 2004 03:51:38 +0000 (03:51 +0000)]
Making C profiling a configure option (at least temporarily)

21 years agoInstall two code generation optimizations that depend on NOP.
Raymond Hettinger [Mon, 21 Jun 2004 16:31:15 +0000 (16:31 +0000)]
Install two code generation optimizations that depend on NOP.
Reduces the cost of "not" to almost zero.

21 years agoadd a couple of tests for the build_scripts command
Fred Drake [Mon, 21 Jun 2004 16:15:22 +0000 (16:15 +0000)]
add a couple of tests for the build_scripts command

21 years agoSF patch 876130: add C API to datetime module, from Anthony Tuininga.
Tim Peters [Sun, 20 Jun 2004 22:41:32 +0000 (22:41 +0000)]
SF patch 876130:  add C API to datetime module, from Anthony Tuininga.
The LaTeX is untested (well, so is the new API, for that matter).
Note that I also changed NULL to get spelled consistently in concrete.tex.
If that was a wrong thing to do, Fred should yell at me.

21 years agoPatch #975885: print file name in err msg in quiet mode
Martin v. Löwis [Sun, 20 Jun 2004 20:59:56 +0000 (20:59 +0000)]
Patch #975885: print file name in err msg in quiet mode

21 years agoImprove the documented advice on how to best use heapq.heapreplace().
Raymond Hettinger [Sun, 20 Jun 2004 09:07:53 +0000 (09:07 +0000)]
Improve the documented advice on how to best use heapq.heapreplace().

21 years agoUse PyArg_UnpackTuple() where possible.
Raymond Hettinger [Sun, 20 Jun 2004 04:23:19 +0000 (04:23 +0000)]
Use PyArg_UnpackTuple() where possible.

21 years agoBug 975996: Add _PyTime_DoubleToTimet to C API
Tim Peters [Sun, 20 Jun 2004 02:50:16 +0000 (02:50 +0000)]
Bug 975996:  Add _PyTime_DoubleToTimet to C API
New include file timefuncs.h exports private API function
_PyTime_DoubleToTimet() from timemodule.c.  timemodule should export
some other functions too (look for painful bits in datetimemodule.c).

Added insane-argument checking to datetime's assorted fromtimestamp()
and utcfromtimestamp() methods.  Added insane-argument tests of these
to test_datetime, and insane-argument tests for ctime(), localtime()
and gmtime() to test_time.

21 years agoshutil.move() will raise an exception when trying to move a directory into
Brett Cannon [Sat, 19 Jun 2004 21:11:35 +0000 (21:11 +0000)]
shutil.move() will raise an exception when trying to move a directory into
itself.

Closes bug #919012  .  Thanks Johannes Gijsbers.

21 years agoAdd news item about raising ValueError when timemodule.c code that uses
Brett Cannon [Sat, 19 Jun 2004 20:50:47 +0000 (20:50 +0000)]
Add news item about raising ValueError when timemodule.c code that uses
timestamps will lose precision thanks to time_t < double (bug #919012).

21 years agoRaise ValueError when value being stored in a time_t variable will result in
Brett Cannon [Sat, 19 Jun 2004 20:48:43 +0000 (20:48 +0000)]
Raise ValueError when value being stored in a time_t variable will result in
more than a second of precision.  Primarily affects ctime, localtime, and
gmtime.

Closes bug #919012 thanks to Tim Peters' code.

Tim suggests that the new funciton being introduced, _PyTime_DoubletoTimet(),
should be added to the internal C API and then used in datetime where
appropriate.  Not being done now for lack of time.

21 years agoAdded normalization for Windows system name. Closes SF #945665.
Marc-André Lemburg [Sat, 19 Jun 2004 17:17:00 +0000 (17:17 +0000)]
Added normalization for Windows system name. Closes SF #945665.

21 years agoChange pydoc.stripid() be able to match against 64-bit addresses by having
Brett Cannon [Sat, 19 Jun 2004 01:22:48 +0000 (01:22 +0000)]
Change pydoc.stripid() be able to match against 64-bit addresses by having
regex match from 6 to 16 characters.

21 years agopydoc.stripid() is now case-insensitive for its regex to support platforms that
Brett Cannon [Sat, 19 Jun 2004 01:02:51 +0000 (01:02 +0000)]
pydoc.stripid() is now case-insensitive for its regex to support platforms that
have pointer addresses in uppercase.

Closes bug #934282.  Thanks Robin Becker.

21 years agofix typo
Fred Drake [Fri, 18 Jun 2004 21:28:28 +0000 (21:28 +0000)]
fix typo

21 years agoIf self.packages is None (this can happen, I saw it), return
Sjoerd Mullender [Fri, 18 Jun 2004 20:39:11 +0000 (20:39 +0000)]
If self.packages is None (this can happen, I saw it), return
immediately (since None is not a sequence you can iterate over).

21 years agoDisabling end-of-loop code not reached warning on SunPro
Nicholas Bastin [Fri, 18 Jun 2004 19:57:13 +0000 (19:57 +0000)]
Disabling end-of-loop code not reached warning on SunPro

21 years agoRebuild the wininst.exe files.
Thomas Heller [Fri, 18 Jun 2004 18:30:27 +0000 (18:30 +0000)]
Rebuild the wininst.exe files.

21 years agoThe wininst.exe is no longer compressed with UPX.
Thomas Heller [Fri, 18 Jun 2004 18:29:46 +0000 (18:29 +0000)]
The wininst.exe is no longer compressed with UPX.

21 years agoFix an obvious typo (It *is* a typo, or not?)
Thomas Heller [Fri, 18 Jun 2004 17:31:23 +0000 (17:31 +0000)]
Fix an obvious typo (It *is* a typo, or not?)

21 years agoWhen loading the Python dll to run the postinstall script, try to load
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

Already backported.

21 years agoThe 'distributing python modules' manual now has an index.
Thomas Heller [Fri, 18 Jun 2004 08:27:36 +0000 (08:27 +0000)]
The 'distributing python modules' manual now has an index.