Brett Cannon
c2b151c66e
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.
2004-06-27 23:17:35 +00:00
Gregory P. Smith
a6b3caad41
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.
2004-06-27 22:56:42 +00:00
Tim Peters
e7c053233f
sizeof(char) is 1, by definition, so get rid of that expression in
...
places it's just noise.
2004-06-27 17:24:49 +00:00
Martin v. Löwis
ef82d2fdfe
Patch #923098 : Share interned strings in marshal.
2004-06-27 16:51:46 +00:00
Martin v. Löwis
8d97e33bb7
Patch #966493 : Cleanup generator/eval_frame exposure.
2004-06-27 15:43:12 +00:00
Brett Cannon
634893d1a3
Mention Py_RETURN_NONE when introducing the idiom of how to have a function
...
return Py_None.
2004-06-27 04:28:00 +00:00
Raymond Hettinger
ebd95222bf
* 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.
2004-06-27 03:02:18 +00:00
Raymond Hettinger
a006c37472
SF bug #980419 : int left-shift causes memory leak
2004-06-26 23:22:57 +00:00
Brett Cannon
555a96475d
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.
2004-06-26 23:10:32 +00:00
Skip Montanaro
852f79993f
Install Barry's smtpd.py daemon.
2004-06-26 22:29:42 +00:00
Skip Montanaro
5fad8bd088
remove debugging print
2004-06-26 19:42:10 +00:00
Skip Montanaro
90e0153940
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
2004-06-26 19:18:49 +00:00
Raymond Hettinger
616f4f61ba
Add a comment with implementation notes.
2004-06-26 04:42:06 +00:00
Raymond Hettinger
a7f56bc0cc
Get ceval.c to compile again by moving declarations before other statments.
2004-06-26 04:34:33 +00:00
Brett Cannon
f6af76da61
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 .
2004-06-26 04:03:06 +00:00
Nicholas Bastin
d858a7763a
Massive performance improvement for C extension and builtin tracing code
2004-06-25 23:31:06 +00:00
Fred Drake
ec6229e352
Make distutils "install --home" support all platforms.
2004-06-25 23:02:59 +00:00
Raymond Hettinger
8d726eef96
Cosmetic spacing fix.
2004-06-25 22:24:35 +00:00
Raymond Hettinger
70b3a1ab0a
Fix leak found by Eric Huss.
2004-06-25 22:20:33 +00:00
Raymond Hettinger
d56cbe57b8
Fix leak found by Eric Huss.
2004-06-25 22:17:39 +00:00
Fred Drake
22021579a9
add boilerplate so the test modules can be run as scripts
2004-06-25 19:04:21 +00:00
Raymond Hettinger
43ea47ff06
Move NOP to end of code transformation.
2004-06-24 09:25:39 +00:00
Fred Drake
b86aa99eb9
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
2004-06-24 06:03:59 +00:00
Brett Cannon
057e7200d1
Add compilation of timemodule.c with datetimemodule.c to get
...
__PyTime_DoubleToTimet().
2004-06-24 01:38:47 +00:00
Brett Cannon
6cc48148fe
Change comment from C++ style to C.
2004-06-24 00:48:44 +00:00
Nicholas Bastin
941b8bc41a
Less ugly #ifdefs for C profiling fix
2004-06-22 15:37:51 +00:00
Nicholas Bastin
bbffbd1983
One forgotten C profiling #ifdef
2004-06-22 04:18:47 +00:00
Nicholas Bastin
4c70b69fb1
Making C profiling a configure option (at least temporarily)
2004-06-22 03:51:38 +00:00
Raymond Hettinger
9c18e81fb2
Install two code generation optimizations that depend on NOP.
...
Reduces the cost of "not" to almost zero.
2004-06-21 16:31:15 +00:00
Fred Drake
2c9f889122
add a couple of tests for the build_scripts command
2004-06-21 16:15:22 +00:00
Tim Peters
9ddf40b4e1
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.
2004-06-20 22:41:32 +00:00
Martin v. Löwis
873a277eb4
Patch #975885 : print file name in err msg in quiet mode
2004-06-20 20:59:56 +00:00
Raymond Hettinger
28224f897a
Improve the documented advice on how to best use heapq.heapreplace().
2004-06-20 09:07:53 +00:00
Raymond Hettinger
1761a7cc8b
Use PyArg_UnpackTuple() where possible.
2004-06-20 04:23:19 +00:00
Tim Peters
1b6f7a9057
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.
2004-06-20 02:50:16 +00:00
Brett Cannon
1c3fa18be7
shutil.move() will raise an exception when trying to move a directory into
...
itself.
Closes bug #919012 . Thanks Johannes Gijsbers.
2004-06-19 21:11:35 +00:00
Brett Cannon
b46ed71d70
Add news item about raising ValueError when timemodule.c code that uses
...
timestamps will lose precision thanks to time_t < double (bug #919012 ).
2004-06-19 20:50:47 +00:00
Brett Cannon
298c380c74
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.
2004-06-19 20:48:43 +00:00
Marc-André Lemburg
cdc7923f6d
Added normalization for Windows system name. Closes SF #945665 .
2004-06-19 17:17:00 +00:00
Brett Cannon
84601f14a3
Change pydoc.stripid() be able to match against 64-bit addresses by having
...
regex match from 6 to 16 characters.
2004-06-19 01:22:48 +00:00
Brett Cannon
c6c1f478d9
pydoc.stripid() is now case-insensitive for its regex to support platforms that
...
have pointer addresses in uppercase.
Closes bug #934282 . Thanks Robin Becker.
2004-06-19 01:02:51 +00:00
Fred Drake
2b2fe94cde
fix typo
2004-06-18 21:28:28 +00:00
Sjoerd Mullender
4dbda47aea
If self.packages is None (this can happen, I saw it), return
...
immediately (since None is not a sequence you can iterate over).
2004-06-18 20:39:11 +00:00
Nicholas Bastin
9e1bfe7dd9
Disabling end-of-loop code not reached warning on SunPro
2004-06-18 19:57:13 +00:00
Thomas Heller
89a2dc72b1
Rebuild the wininst.exe files.
2004-06-18 18:30:27 +00:00
Thomas Heller
74db40419e
The wininst.exe is no longer compressed with UPX.
2004-06-18 18:29:46 +00:00
Thomas Heller
dd6d207cf8
Fix an obvious typo (It *is* a typo, or not?)
2004-06-18 17:31:23 +00:00
Thomas Heller
48340390ac
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.
2004-06-18 17:03:38 +00:00
Thomas Heller
a42bc21ef8
The 'distributing python modules' manual now has an index.
2004-06-18 08:27:36 +00:00
Thomas Heller
949f66141b
Fix typo - the module is named distutils.util.
2004-06-18 06:55:28 +00:00