Commit Graph

305 Commits

Author SHA1 Message Date
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
Tim Peters 7402f791a4 SF patch [#466616] Exclude imported items from doctest,
from Tim Hochberg.  Also mucho fiddling to change the way doctest
determines whether a thing is a function, module or class.  Under 2.2,
this really requires the functions in inspect.py (e.g., types.ClassType
is close to meaningless now, if not outright misleading).
2001-10-02 03:53:41 +00:00
Tim Peters 1ce3cf7749 SF patch [#466877] SIGBREAK is missing from signal module.
Patch from Steve Scott to add SIGBREAK support (unique to Windows).
2001-10-01 17:58:40 +00:00
Martin v. Löwis 5868fb8df1 Undo last checkin. 2001-10-01 17:04:03 +00:00
Martin v. Löwis 2fa69d7984 Patch #426880: Implement Listbox itemcget and itemconfigure. 2001-10-01 10:09:31 +00:00
Martin v. Löwis 0daad598d0 Patch #462122: add readline startup and pre_event hooks. 2001-09-30 21:09:59 +00:00
Martin v. Löwis 16dc7f44b1 Patch #462190, patch #464070: Support quoted printable in the binascii module.
Decode and encode underscores for header style encoding. Fixes bug #463996.
2001-09-30 20:32:11 +00:00
Tim Peters d38b1c74f3 SF [#466125] PyLong_AsLongLong works for any integer.
Generalize PyLong_AsLongLong to accept int arguments too.  The real point
is so that PyArg_ParseTuple's 'L' code does too.  That code was
undocumented (AFAICT), so documented it.
2001-09-30 05:09:37 +00:00
Tim Peters abf925f6bf Post-release fiddling (prep for 2.2b1). 2001-09-28 21:53:42 +00:00
Barry Warsaw 647d5e8f4a Fixed a minor typo. 2001-09-28 17:01:02 +00:00
Barry Warsaw 86fbaf8e67 Merged changes from 22a4 branch. 2001-09-28 15:26:12 +00:00
Marc-André Lemburg bf99017bbb Added note about new StringIO/cStringIO feature. 2001-09-27 14:17:33 +00:00