Commit Graph

22170 Commits

Author SHA1 Message Date
Barry Warsaw be22ae6def ehlo(): A proper fix for SF bug #498572. RFC 1869 describes ESMTP
which requires that if there are ehlo parameters returned with an ehlo
keyword (in the response to EHLO), the keyword and parameters must be
delimited by an ASCII space.  Thus responses like

    250-AUTH=LOGIN

should be ignored as non-conformant to the RFC (the `=' isn't allowed
in the ehlo keyword).

This is a bug fix candidate.
2002-04-15 20:03:30 +00:00
Fred Drake 8a5a270000 Better documentation for GetArgv() and the ProgressBar type.
Back-porting to release22-maint.
This closes SF patch #496705.
2002-04-15 19:53:35 +00:00
Fred Drake e19a5bcc7b Be consistent in presenting the signatures. 2002-04-15 19:46:40 +00:00
Fred Drake 154985587b Add docs for os.fchdir(). 2002-04-15 19:41:27 +00:00
Fred Drake 4d1e64bb46 posix_fildes(): New helper: run a function that takes a file descriptor
and returns None.  This allows any object that supports the fileno()
    method to be passed as a file descriptor, not just an integer.

posix_fchdir():  New exposed function: implements posix.fchdir().  This
    closes SF feature #536796.

posix_fsync(), posix_fdatasync():  Convert to use posix_fildes() instead
    of posix_int().  This also changes them from METH_VARARGS to METH_O
    functions.

setup_confname_table():  Remove unused variable.  Change to take a module
    rather than a dict to save the resulting table into.

setup_confname_tables():  Change to take a module instead of a dict to
    pass to setup_confname_table().
2002-04-15 19:40:07 +00:00
Fred Drake 0157276cf8 Generate the right annotations in the index entries.
Thanks to Thomas Heller for the sharp eye.
2002-04-15 19:35:29 +00:00
Fred Drake 6b3cc524c0 Add a test for fchdir().
This is part of SF feature #536796.
2002-04-15 19:20:27 +00:00
Fred Drake 188ecd141a Integrated more text from Guido. 2002-04-15 18:44:46 +00:00
Fred Drake c63042bcc4 Move the listing of the type structure, since both the C API reference and
the Extending & Embedding manual use it.
2002-04-15 18:43:20 +00:00
Walter Dörwald 0fe940c862 Return the orginal string only if it's a real str or unicode
instance, otherwise make a copy.
2002-04-15 18:42:15 +00:00
Fred Drake 8a5e6790d9 Clean up the application of style to verbatim text.
This moves styling to the stylesheet; the use of <dl> structures to control
style sometimes produced improper indentation of subsequent text in many
browsers when the text was already part of the <dl> structure (as in a
function or class description).
2002-04-15 18:41:31 +00:00
Fred Drake eeb5ec42e0 Add support for \cmemberline and the cmemberdesc environment. 2002-04-15 17:46:00 +00:00
Neal Norwitz 726e013eff Remove unused variable reported by Walter Dörwald 2002-04-15 16:29:00 +00:00
Andrew M. Kuchling 8e8af6e722 Add item 2002-04-15 14:05:59 +00:00
Guido van Rossum 3aa3fc46c8 Remove 'const' from local variable declaration in string_zfill() -- it
isn't constant, so why bother.

Folded long lines.

Whitespace normalization.
2002-04-15 13:48:52 +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
Neal Norwitz b384c72639 posix.mknod() and {}.pop() were added 2002-04-15 12:46:11 +00:00
Guido van Rossum 69cf3c7641 Deprecate % as well. The message for deprecation of //, % and divmod
is the same in all three cases (mostly because // calls divmod :-).
2002-04-15 12:39:12 +00:00
Guido van Rossum 862fe3c52e Add news about deprecated complex ops. 2002-04-15 12:36:47 +00:00
Andrew MacIntyre 6c65531511 update build infrastructure for pymalloc and bool changes 2002-04-15 12:09:45 +00:00
Andrew M. Kuchling f367651472 Add items 2002-04-15 02:27:55 +00:00
Guido van Rossum 9ec4c78a54 SF bug #543387.
Complex numbers implement divmod() and //, neither of which makes one
lick of sense.  Unfortunately this is documented, so I'm adding a
deprecation warning now, so we can delete this silliness, oh, around
2005 or so.

Bugfix candidate (At least for 2.2.2, I think.)
2002-04-15 01:41:56 +00:00
Guido van Rossum a3a4300fe0 Four more names for the hall of fame. 2002-04-15 01:05:01 +00:00
Guido van Rossum b6b8942f53 SF bug #541883 (Vincent Fiack).
A stupid bug in object_set_class(): didn't check for value==NULL
before checking its type.

Bugfix candidate.
2002-04-15 01:03:30 +00:00
Guido van Rossum d1c08f33f2 Add exit as alias for quit, as the easiest way to address SF bug
#543674.

Bugfix candidate.
2002-04-15 00:48:24 +00:00
Guido van Rossum beae477767 SF bug #543318 (Frank J. Tobin).
In DatagramRequestHandler.setup(), the wfile initialization should be
StringIO.StringIO(), not StringIO.StringIO(slf.packet).

Bugfix candidate (all the way back to Python 1.5.2 :-).
2002-04-15 00:36:48 +00:00
Guido van Rossum a2da305211 Fix from SF bug #541980 (Jacques A. Vidrine).
When os.stat() for a file raises OSError, turn it into IOError per
documentation.

Bugfix candidate.
2002-04-15 00:25:01 +00:00
Guido van Rossum f90d529229 Provisional fix for writefile() [SF bug # 541730].
The problem was that an exception can occur in the text.get() call or
in the write() call, when the text buffer contains non-ASCII
characters.  This causes the previous contents of the file to be lost.

The provisional fix is to call str(self.text.get(...)) *before*
opening the file, so that if the exception occurs, we never open the
file.

Two orthogonal better solutions have to wait for policy decisions:

1. We could try to encode the data as Latin-1 or as UTF-8; but that
   would require IDLE to grow a notion of file encoding which requires
   more thought.

2. We could make backups before overwriting a file.  This requires
   more thought because it needs to be fast and cross-platform and
   configurable.
2002-04-15 00:19:12 +00:00
Jack Jansen a258324a3d Enable universal newline support for MacPython. 2002-04-14 22:13:35 +00:00
Tim Peters 077f27141f SF bug 543840: complex(string) accepts strings with \0
complex_subtype_from_string():  this stopped parsing at the first 0
byte, as if that were the end of the input string.

Bugfix candidate.
2002-04-14 22:04:03 +00:00
Jack Jansen 518d261f63 Test suite for universal newline support. 2002-04-14 20:17:18 +00:00
Jack Jansen 7b8c7546eb Mass checkin of universal newline support.
Highlights: import and friends will understand any of \r, \n and \r\n
as end of line. Python file input will do the same if you use mode 'U'.
Everything can be disabled by configuring with --without-universal-newlines.

See PEP278 for details.
2002-04-14 20:12:41 +00:00
Martin v. Löwis dcd2dc2fff Patch #540583: Open MS Help Docs if available. 2002-04-14 10:30:51 +00:00
Martin v. Löwis 2f6d4da278 Patch #542569: tp_print tp_repr tp_str in test_bool.py. 2002-04-14 10:22:29 +00:00
Martin v. Löwis 06a83e90aa Patch #543447: Add posix.mknod. 2002-04-14 10:19:44 +00:00
Martin v. Löwis 314fc79ce8 Patch #542659: Eliminate duplicate check for NULL of freevars/cellvars. 2002-04-14 09:53:49 +00:00
Fred Drake 88c9344986 initpwd(): Clean up initialization, avoid PyModule_GetDict(). 2002-04-13 21:07:45 +00:00
Neal Norwitz f42d32cb27 BDFL agreed with Tim: rehabilitate randint(). 2002-04-13 14:41:19 +00:00
Guido van Rossum 5961042061 Fold long lines. (Walter, please take note! :-) 2002-04-13 14:06:36 +00:00
Guido van Rossum f49562586f Add pop() to UserDict. 2002-04-13 14:03:38 +00:00
Tim Peters 0e871188e8 _PyObject_DebugDumpStats: renamed to _PyObject_DebugMallocStats.
Added code to call this when PYMALLOC_DEBUG is enabled, and envar
PYTHONMALLOCSTATS is set, whenever a new arena is obtained and once
late in the Python shutdown process.
2002-04-13 08:29:14 +00:00
Tim Peters b7ba743312 SF bug 543148: Memory leak with stackframes + inspect.
Put a bound on the number of frameobjects that can live in the
frameobject free_list.

Am also backporting to 2.2.  I don't intend to backport to 2.1 (too
much work -- lots of cyclic structures leak there, and the GC API).
2002-04-13 05:21:47 +00:00
Fred Drake 8b1c47bb8b Document the optional argument to the .strip(), .rstrip(), .strip() string
methods.
Part of SF feature #444708.
2002-04-13 02:43:39 +00:00
Guido van Rossum 4904204158 News for strip methods. 2002-04-13 00:59:05 +00:00
Guido van Rossum 018b0eb0f5 Partially implement SF feature request 444708.
Add optional arg to string methods strip(), lstrip(), rstrip().
The optional arg specifies characters to delete.

Also for UserString.

Still to do:

- Misc/NEWS
- LaTeX docs (I did the docstrings though)
- Unicode methods, and Unicode support in the string methods.
2002-04-13 00:56:08 +00:00
Neil Schemenauer 9344b14828 Add news about memory managent APIs changing. 2002-04-12 23:00:08 +00:00
Fred Drake 01e94618f5 Additional support for describing C structure members. 2002-04-12 22:48:02 +00:00
Fred Drake 4d2a95dfe7 Integrate a bunch of new text from Guido. 2002-04-12 22:47:18 +00:00
Barry Warsaw 56cdf11922 AddrlistClass -> AddressList 2002-04-12 20:55:31 +00:00
Barry Warsaw e1df15c401 AddrlistClass -> AddressList 2002-04-12 20:50:05 +00:00