Commit Graph

316 Commits

Author SHA1 Message Date
Barry Warsaw 012852ba7f Merged in NEWS changes from the r22b2 branch. 2001-11-16 16:17:27 +00:00
Guido van Rossum 3fc08d23c7 Group dict[ionary] news together; and use dict() instead of
dictionary().
2001-11-15 20:33:10 +00:00
Guido van Rossum 3d27df0734 Correct the description of mixed multiple inheritance: the code
special-cases classic classes, it doesn't do anything about other
cases where different metaclasses are involved (except for the trivial
case where one metaclass is a subclass of the others).  Also note that
it's metaclass, not metatype.
2001-11-15 20:27:54 +00:00
Tim Peters 76f7fe37bb News about mixing classic and new-style classes in MI. 2001-11-15 20:02:21 +00:00
Tim Peters 5ebfd36afa CVS patch #477161: New "access" keyword for mmap, from Jay T Miller.
This gives mmap() on Windows the ability to create read-only, write-
through and copy-on-write mmaps.  A new keyword argument is introduced
because the mmap() signatures diverged between Windows and Unix, so
while they (now) both support this functionality, there wasn't a way to
spell it in a common way without introducing a new spelling gimmick.
The old spellings are still accepted, so there isn't a backward-
compatibility issue here.
2001-11-13 23:11:19 +00:00
Jeremy Hylton 249aaeda0a Add note about assignment to __debug__ being an error. 2001-11-09 21:06:24 +00:00
Martin v. Löwis 25ee87cc50 Patch #478654: Expose tk_chooseDirectory.
Also delegate kw arguments through ** calls.
2001-11-07 22:38:08 +00:00
Tim Peters 7a33d8bb64 News about OS/2 Visual Age C++ patches. 2001-11-05 02:51:07 +00:00
Tim Peters 169ded0d68 Finish SF patch 477059: __del__ on new classes vs. GC.
Just doc and NEWS here, about the change in gc.garbage meaning.
2001-11-03 19:57:21 +00:00
Tim Peters 7533587d43 Improved error msg when a symbolic group name is redefined. Added docs
and NEWS.  Bugfix candidate?  That's a dilemma for Anthony <wink>:  /F
did fix a longstanding bug here, but the fix can cause code to raise an
exception that previously worked by accident.
2001-11-03 19:35:43 +00:00
Martin v. Löwis b7b3260128 Patch #471120: Improved doc strings and new wrappers. 2001-11-02 23:48:20 +00:00
Guido van Rossum 692adf19cb News and attribution for SF bug #473009. 2001-10-30 03:03:03 +00:00
Tim Peters a427a2b8d0 Rename "dictionary" (type and constructor) to "dict". 2001-10-29 22:25:45 +00:00
Guido van Rossum 7ad2d1eb8e Add __del__ callbacks. They are too useful to leave out.
XXX Remaining problems:

- The GC module doesn't know about these; I think it has its reasons
  to disallow calling __del__, but for now, __del__ on new-style
  objects is called when the GC module discards an object, for better
  or for worse.

- The code to call a __del__ handler is really ridiculously
  complicated, due to all the different debug #ifdefs.  I've copied
  this from the similar code in classobject.c, so I'm pretty sure I
  did it right, but it's not pretty. :-(

- No tests yet.
2001-10-29 22:11:00 +00:00
Guido van Rossum 86443216b7 News about the socket type and the HP-UX port. 2001-10-27 22:28:54 +00:00
Guido van Rossum 12d955c830 Some news. 2001-10-26 14:56:06 +00:00
Tim Peters 1fc240e851 Generalize dictionary() to accept a sequence of 2-sequences. At the
outer level, the iterator protocol is used for memory-efficiency (the
outer sequence may be very large if fully materialized); at the inner
level, PySequence_Fast() is used for time-efficiency (these should
always be sequences of length 2).

dictobject.c, new functions PyDict_{Merge,Update}FromSeq2.  These are
wholly analogous to PyDict_{Merge,Update}, but process a sequence-of-2-
sequences argument instead of a mapping object.  For now, I left these
functions file static, so no corresponding doc changes.  It's tempting
to change dict.update() to allow a sequence-of-2-seqs argument too.

Also changed the name of dictionary's keyword argument from "mapping"
to "x".  Got a better name?  "mapping_or_sequence_of_pairs" isn't
attractive, although more so than "mosop" <wink>.

abstract.h, abstract.tex:  Added new PySequence_Fast_GET_SIZE function,
much faster than going thru the all-purpose PySequence_Size.

libfuncs.tex:
- Document dictionary().
- Fiddle tuple() and list() to admit that their argument is optional.
- The long-winded repetitions of "a sequence, a container that supports
  iteration, or an iterator object" is getting to be a PITA.  Many
  months ago I suggested factoring this out into "iterable object",
  where the definition of that could include being explicit about
  generators too (as is, I'm not sure a reader outside of PythonLabs
  could guess that "an iterator object" includes a generator call).
- Please check my curly braces -- I'm going blind <0.9 wink>.

abstract.c, PySequence_Tuple():  When PyObject_GetIter() fails, leave
its error msg alone now (the msg it produces has improved since
PySequence_Tuple was generalized to accept iterable objects, and
PySequence_Tuple was also stomping on the msg in cases it shouldn't
have even before PyObject_GetIter grew a better msg).
2001-10-26 05:06:50 +00:00
Barry Warsaw d970fe4022 I went back and figured out the release date for Python 2.2a1. 2001-10-25 21:53:30 +00:00
Guido van Rossum 491921467c Note updated RISCOS port. Remove reference in the 2.1 release notes
to os.extsep -- that variable actually didn't exist in that release!
2001-10-24 20:51:44 +00:00
Tim Peters 98791affc8 Doc and NEWS changes due to Jeremy adding traceback objects to gc. 2001-10-23 01:59:54 +00:00
Fred Drake cb7a6b5bf7 Added two very tardy notes about the 2.2b1 release, fixed a typo. 2001-10-22 18:41:51 +00:00
Andrew M. Kuchling 15e0353715 Add curses-related news items 2001-10-22 16:37:10 +00:00
Andrew M. Kuchling 51c18166bb Fix some typos 2001-10-22 01:47:26 +00:00
Guido van Rossum c8e5645f15 Methods of built-in types now properly check for keyword arguments
(formerly these were silently ignored).  The only built-in methods
that take keyword arguments are __call__, __init__ and __new__.
2001-10-22 00:43:43 +00:00
Tim Peters 84362bc74a The usual post-release fiddling. 2001-10-19 17:55:30 +00:00
Marc-André Lemburg b5507ecd3c Additional test and documentation for the unicode() changes.
This patch should also be applied to the 2.2b1 trunk.
2001-10-19 12:02:29 +00:00
Barry Warsaw f6fb171c9d Last minute updates for changes since 2.2a4. Unless Fred wants to add
anything about the hotshot profiler, this file is ready for the 2.2b1
Windows build.
2001-10-19 05:35:40 +00:00
Jeremy Hylton cb4414366b Add entry for RAND_xxx() functions in socket module. 2001-10-19 03:40:19 +00:00
Guido van Rossum 1c486099ad Note the Unicode changes from SF patch #470578. 2001-10-19 02:05:35 +00:00
Guido van Rossum c524d952da SF patch #460805 by Chris Gonnerman: Support for unsetenv()
This adds unsetenv to posix, and uses it in the __delitem__ method of
os.environ.

(XXX Should we change the preferred name for putenv to setenv, for
consistency?)
2001-10-19 01:31:59 +00:00
Guido van Rossum 98bf58f1c6 SF patch #462296: Add attributes to os.stat results; by Nick Mathewson.
This is a big one, touching lots of files.  Some of the platforms
aren't tested yet.  Briefly, this changes the return value of the
os/posix functions stat(), fstat(), statvfs(), fstatvfs(), and the
time functions localtime(), gmtime(), and strptime() from tuples into
pseudo-sequences.  When accessed as a sequence, they behave exactly as
before.  But they also have attributes like st_mtime or tm_year.  The
stat return value, moreover, has a few platform-specific attributes
that are not available through the sequence interface (because
everybody expects the sequence to have a fixed length, these couldn't
be added there).  If your platform's struct stat doesn't define
st_blksize, st_blocks or st_rdev, they won't be accessible from Python
either.

(Still missing is a documentation update.)
2001-10-18 20:34:25 +00:00
Guido van Rossum 6c4bce3b5c Note stricter tp_compare return value requirements. 2001-10-18 19:20:25 +00:00
Fred Drake 934d2a4310 Add a note about changes related to the weak reference objects. 2001-10-18 18:18:06 +00:00
Guido van Rossum a5343ccd28 SF bug #471720: ThreadingMixIn/TCPServer forgets close
Solved with a helper method that calls finish_request() and then
close_request().  The code is by Max Neunhöffer.
2001-10-18 18:02:07 +00:00
Martin v. Löwis 61c5edf6fc Expose setgroups. Fixes feature request #468116. 2001-10-18 04:06:00 +00:00
Guido van Rossum 9074ef6081 Add fix for getattr(obj, name, default). Rearrange a few things. 2001-10-16 21:34:49 +00:00
Guido van Rossum 3c28863e08 Partial patch from SF #452266, by Jason Petrone.
This changes Pythread_start_thread() to return the thread ID, or -1
for an error.  (It's technically an incompatible API change, but I
doubt anyone calls it.)
2001-10-16 21:13:49 +00:00
Jeremy Hylton 6f543b606d Add note about new zlib feature. 2001-10-16 20:42:52 +00:00
Guido van Rossum 3eea25c3fa Reword the text on the demise of __dynamic__ somewhat, correcting a
typo.
2001-10-16 00:46:57 +00:00
Guido van Rossum 687ae00460 Get rid of __defined__ and tp_defined -- there's no need to
distinguish __dict__ and __defined__ any more.  In the C structure,
tp_cache takes its place -- but this hasn't been implemented yet.
2001-10-15 22:03:32 +00:00
Guido van Rossum a8bcf80e7b Note about fix in list comprehensions. 2001-10-15 15:53:58 +00:00
Tim Peters 04cf1d31d9 Add item about new "Edit with IDLE" menu entry created by Windows installer. 2001-10-09 22:39:40 +00:00
Tim Peters 659a60311d Allow the profiler's calibration constant to be specified in the constructor
call, or via setting an instance or class vrbl.
Rewrote the calibration docs.
Modern boxes are so friggin' fast, and a profiler event does so much work
anyway, that the cost of looking up an instance vrbl (the bias constant)
per profile event just isn't a big deal.
2001-10-09 20:51:19 +00:00
Tim Peters cce092d046 A brand new implementation of Profile.calibrate(). This measures an
actual run of the profiler, instead of timing a simplified simulation of
part of what the profiler does.  It computes a constant about 60% higher
on my Win98SE box than the old method, and the new constant appears much
more realistic.  Deleted the undocumented simple(), instrumented(), and
profiler_simulation() methods (which existed only to support the previous
calibration method).
2001-10-09 05:31:56 +00:00
Tim Peters 0a1fc4e389 Remove code and docs for the OldProfile and HotProfile classes: code
hasn't worked in years, docs were wrong, and they aren't interesting
anymore regardless.
2001-10-07 03:12:08 +00:00
Martin v. Löwis 16628c9709 Document addition of chroot. 2001-10-04 22:46:41 +00:00
Guido van Rossum 50fda3ba26 Make new classes dynamic by default. 2001-10-04 19:46:06 +00:00
Guido van Rossum c4b09b4417 Add note about profile fix. 2001-10-04 10:19:00 +00:00
Tim Peters 1c9ca8726e Added a little type/class NEWS. 2001-10-04 06:43:12 +00:00
Guido van Rossum ed554f6fc7 Note removal of Demo/dns, point to PyDNS. 2001-10-02 23:15:37 +00:00