Commit graph

29932 commits

Author SHA1 Message Date
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
Gregory P. Smith
dc5af70631 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.
2004-06-27 23:32:34 +00:00
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