Commit Graph

407 Commits

Author SHA1 Message Date
Raymond Hettinger
87f59eeb0a Noted SF patch 552452 adding degree/radian conversions to mathmodule.c. 2002-05-13 04:17:32 +00:00
Raymond Hettinger
9b1df1db68 Noted change in ftplib 1.68 closing SF patch 553277. 2002-05-12 06:07:21 +00:00
Neil Schemenauer
c9abc1de6b Remove news about PyMalloc_*. Do we need to say anything about
pymalloc?
2002-05-08 14:14:41 +00:00
Martin v. Löwis
01f94bda38 Patch #552433: Special-case tuples. Avoid sub-type checking for lists.
Avoid checks for negative indices and duplicate checks for support of
the sequence protocol.
2002-05-08 08:44:21 +00:00
Andrew M. Kuchling
21b23b09a2 Fix typos 2002-05-07 20:58:03 +00:00
Tim Peters
46c04e140c random.gauss() uses a piece of hidden state used by nothing else,
and the .seed() and .whseed() methods failed to reset it.  In other
words, setting the seed didn't completely determine the sequence of
results produced by random.gauss().  It does now.  Programs repeatedly
mixing calls to a seed method with calls to gauss() may see different
results now.

Bugfix candidate (random.gauss() has always been broken in this way),
despite that it may change results.
2002-05-05 20:40:00 +00:00
Fred Drake
d0ba636541 Added notes related to the removal of deprecated features of the xrange type. 2002-05-02 21:28:26 +00:00
Fred Drake
7d28b73ec1 Added note about using the documentation build tools under Cygwin. 2002-05-02 21:17:00 +00:00
Fred Drake
7f781c9aab Add Pickler.clear_memo() so the pickle and cPickle modules are more similar. 2002-05-01 20:33:53 +00:00
Tim Peters
81b9251d59 Mostly in SequenceMatcher.{__chain_b, find_longest_match}:
This now does a dynamic analysis of which elements are so frequently
repeated as to constitute noise.  The primary benefit is an enormous
speedup in find_longest_match, as the innermost loop can have factors
of 100s less potential matches to worry about, in cases where the
sequences have many duplicate elements.  In effect, this zooms in on
sequences of non-ubiquitous elements now.

While I like what I've seen of the effects so far, I still consider
this experimental.  Please give it a try!
2002-04-29 01:37:32 +00:00
Guido van Rossum
26dd830123 Clarify that the strip changes also apply to Unicode. 2002-04-26 20:11:29 +00:00
Guido van Rossum
7dab2426ca - New builtin function enumerate(x), from PEP 279. Example:
enumerate("abc") is an iterator returning (0,"a"), (1,"b"), (2,"c").
  The argument can be an arbitrary iterable object.
2002-04-26 19:40:56 +00:00
Guido van Rossum
517c7d4fd3 PyNumber_CoerceEx: this took a shortcut (not doing anything) when the
left and right type were of the same type and not classic instances.

This shortcut is dangerous for proxy types, because it means that
coerce(Proxy(1), Proxy(2.1)) leaves Proxy(1) unchanged rather than
turning it into Proxy(1.0).

In an ever-so-slight change of semantics, I now only take the shortcut
when the left and right types are of the same type and don't have the
CHECKTYPES feature.  It so happens that classic instances have this
flag, so the shortcut is still skipped in this case (i.e. nothing
changes for classic instances).  Proxies also have this flag set
(otherwise implementing numeric operations on proxies would become
nightmarish) and this means that the shortcut is also skipped there,
as desired.  It so happens that int, long and float also have this
flag set; that means that e.g. coerce(1, 1) will now invoke
int_coerce().  This is fine: int_coerce() can deal with this, and I'm
not worried about the performance; int_coerce() is only invoked when
the user explicitly calls coerce(), which should be rarer than rare.
2002-04-26 02:49:14 +00:00
Neil Schemenauer
89e3ee0ccf If Py_OptimizeFlag is false then always evaluate assert conditions, don't
test __debug__ at runtime.  Closes SF patch #548833.
2002-04-26 01:58:53 +00:00
Guido van Rossum
256705bca7 SF patch 546244 by John Williams: add Text.dump() method. 2002-04-23 13:29:43 +00:00
Anthony Baxter
8388895fe4 SF patch [ 545523 ] patch for 514433 bsddb.dbopen (NULL)
closes SF #514433

can now pass 'None' as the filename for the bsddb.*open functions,
and you'll get an in-memory temporary store.

docs are ripped out of the bsddb dbopen man page. Fred may want to
clean them up.

Considering this for 2.2, but not 2.1.
2002-04-23 02:11:05 +00:00
Tim Peters
639295f0a5 Enable universal newlines on Windows. Note that NEWS needs more words! 2002-04-21 07:30:30 +00:00
Marc-André Lemburg
1ec71ea48e Added note about new distutils commands. 2002-04-17 20:33:40 +00:00
Tim Peters
08e7295ef8 Windows installer: disabled Wise's "delete in-use files" uninstall
option.  It was the cause of at least one way UNWISE.EXE could vanish
(install a python; uninstall it; install it again; reboot the machine;
abracadabra the uinstaller is gone).

Bugfix candidate, but I'll backport it myself.
2002-04-16 20:48:01 +00:00
Walter Dörwald
068325ef92 Apply the second version of SF patch http://www.python.org/sf/536241
Add a method zfill to str, unicode and UserString and change
Lib/string.py accordingly.

This activates the zfill version in unicodeobject.c that was
commented out and implements the same in stringobject.c. It also
adds the test for unicode support in Lib/string.py back in and
uses repr() instead() of str() (as it was before Lib/string.py 1.62)
2002-04-15 13:36:47 +00:00
Guido van Rossum
862fe3c52e Add news about deprecated complex ops. 2002-04-15 12:36:47 +00:00
Martin v. Löwis
06a83e90aa Patch #543447: Add posix.mknod. 2002-04-14 10:19:44 +00:00
Guido van Rossum
4904204158 News for strip methods. 2002-04-13 00:59:05 +00:00
Neil Schemenauer
9344b14828 Add news about memory managent APIs changing. 2002-04-12 23:00:08 +00:00
Guido van Rossum
c69343b69a News about dict.pop(). 2002-04-12 19:22:48 +00:00
Martin v. Löwis
688357e035 Patch #512005: getrusage() returns struct-like object. 2002-04-08 21:28:20 +00:00
Guido van Rossum
0986d8250f - A type can now inherit its metatype from its base type. Previously,
when PyType_Ready() was called, if ob_type was found to be NULL, it
  was always set to &PyType_Type; now it is set to base->ob_type,
  where base is tp_base, defaulting to &PyObject_Type.

- PyType_Ready() accidentally did not inherit tp_is_gc; now it does.

Bugfix candidate.
2002-04-08 01:38:42 +00:00
Guido van Rossum
8ace1ab53a - Changed new-style class instantiation so that when C's __new__
method returns something that's not a C instance, its __init__ is
  not called.  [SF bug #537450]
2002-04-06 01:05:01 +00:00
Guido van Rossum
181e41ad40 Some more news. 2002-04-06 00:23:25 +00:00
Marc-André Lemburg
4179a01bb7 Comment about UTF-16 changes. 2002-04-05 12:15:05 +00:00
Tim Peters
3318792e5f SF bug 497854: Short-cuts missing for All Users
Fix Windows-specific install glitch.  Tested on Win2K, but I can't test
on XP.
Already checked in to the release22-maint branch.
2002-04-04 20:02:04 +00:00
Fred Drake
fed7e85791 Add note about changes in xml.sax.expatreader. 2002-04-04 19:36:15 +00:00
Marc-André Lemburg
4626009493 Added note about updated freeze.py Tool. 2002-04-04 16:17:11 +00:00
Guido van Rossum
47834463d0 Add a note about bool. 2002-04-04 15:21:33 +00:00
Tim Peters
8deda70b16 Eliminate DONT_SHARE_SHORT_STRINGS. 2002-03-30 10:06:07 +00:00
Martin v. Löwis
1142de3f5b Patch #527027: Allow building python as shared library. 2002-03-29 16:28:31 +00:00
Tim Peters
1f7df3595a Remove the CACHE_HASH and INTERN_STRINGS preprocessor symbols. 2002-03-29 03:29:08 +00:00
Guido van Rossum
95b62a6dd4 News for SF #535905. 2002-03-29 01:07:24 +00:00
Martin v. Löwis
2e64c34850 Expose C library's gettext. Fixes #516412. 2002-03-27 18:49:02 +00:00
Neal Norwitz
0c766a0bb6 Change sys_exit to use METH_VARARGS.
sys.exit() now requires 0-1 arguments.  Previously 2+ arguments were allowed.
2002-03-27 13:03:09 +00:00
Neil Schemenauer
9d50d138e7 Add news about pymalloc being enabled. 2002-03-22 17:06:59 +00:00
Walter Dörwald
b25c2b0a4a [Apply SF patch #504943]
This patch makes it possible to pass Warning instances as the first
argument to warnings.warn. In this case the category argument
will be ignored. The message text used will be str(warninginstance).
2002-03-21 10:38:40 +00:00
Martin v. Löwis
5c137c2251 Patch #495598: add an -q (quiet) option to pycompile. 2002-03-18 12:44:08 +00:00
Martin v. Löwis
587c98c863 Patch #430706: Persistent connections in BaseHTTPServer. 2002-03-17 18:37:22 +00:00
Guido van Rossum
8c84255316 "Fix" for SF bug #520644: __slots__ are not pickled.
As promised in my response to the bug report, I'm not really fixing
it; in fact, one could argule over what the proper fix should do.
Instead, I'm adding a little magic that raises TypeError if you try to
pickle an instance of a class that has __slots__ but doesn't define or
override __getstate__.  This is done by adding a bozo __getstate__
that always raises TypeError.

Bugfix candidate (also the checkin to typeobject.c, of course).
2002-03-14 23:05:54 +00:00
Tim Peters
fbf74f2acc News about zlib-1.1.4. 2002-03-14 19:06:01 +00:00
Tim Peters
fb05db2cae file_truncate(): provide full "large file" support on Windows, by
dropping MS's inadequate _chsize() function.  This was inspired by
SF patch 498109 ("fileobject truncate support for win32"), which I
rejected.

libstdtypes.tex:  Someone who knows should update the availability
blurb.  For example, if it's available on Linux, it would be good to
say so.

test_largefile:  Uncommented the file.truncate() tests, and reworked to
do more.  The old comment about "permission errors" in the truncation
tests under Windows was almost certainly due to that the file wasn't open
for *write* access at this point, so of course MS wouldn't let you
truncate it.  I'd be appalled if a Unixish system did.

CAUTION:  Someone should run this test on Linux (etc) too.  The
truncation part was commented out before.  Note that test_largefile isn't
run by default.
2002-03-11 00:24:00 +00:00
Martin v. Löwis
cfeb3b6ab8 Patch #50002: Display line information for bad \x escapes:
- recognize "SyntaxError"s by the print_file_and_line attribute.
- add the syntaxerror attributes to all exceptions in compile.c.
Fixes #221791
2002-03-03 21:30:27 +00:00
Martin v. Löwis
29001ff234 Patch #523268, #522027: return enhanced tuples. 2002-03-01 10:47:37 +00:00
Martin v. Löwis
9986633609 Patch 520694: arraymodule.c improvements:
- make array.array a type
- add Py_UNICODE arrays
- support +=, *=
2002-03-01 10:27:01 +00:00