Commit Graph

18875 Commits

Author SHA1 Message Date
Tim Peters 772747b3f1 SF patch #438013 Remove 2-byte Py_UCS2 assumptions
Removed all instances of Py_UCS2 from the codebase, and so also (I hope)
the last remaining reliance on the platform having an integral type
with exactly 16 bits.
PyUnicode_DecodeUTF16() and PyUnicode_EncodeUTF16() now read and write
one byte at a time.
2001-08-09 22:21:55 +00:00
Tim Peters ab9ba27dc0 Whitespace normalization. 2001-08-09 21:40:30 +00:00
Tim Peters c7ca3ffba3 Skip test_mhlib on Windows -- too many Unix assumptions. 2001-08-09 21:34:54 +00:00
Guido van Rossum e4deb959cc Fix two bugs detected by PyChecker: there's no need for redundant
"import MacOS", and there *is* a need for "import operator".
2001-08-09 21:22:15 +00:00
Andrew M. Kuchling 6386a4c846 Import UnknownFileError 2001-08-09 21:02:34 +00:00
Andrew M. Kuchling 106ffdb672 Import the errno module 2001-08-09 20:59:53 +00:00
Andrew M. Kuchling affadeb9fd Use correct variable name 2001-08-09 20:57:46 +00:00
Guido van Rossum 42a8c2b221 Add resolution of __new__ story sequel. 2001-08-09 20:25:58 +00:00
Fred Drake eaa77e2ca1 Added tests for operator.floordiv() and operator.truediv(). 2001-08-09 20:23:08 +00:00
Fred Drake 428e75fc3e Add wrappers around the rich-comparison operations.
This closes SF patch #428320.

Add wrappers to expose "floor" and "true" division.
This closes SF feature request #449093.
2001-08-09 20:14:34 +00:00
Guido van Rossum 3720261729 Restore the test for 'object' that I removed when object was
uninstantiable.  All is well now.
2001-08-09 19:45:21 +00:00
Guido van Rossum 29687cd211 Sigh. Strengthen the resriction of the previous checkin: tp_new is
inherited unless *both*: (a) the base type is 'object', and (b) the
subtype is not a "heap" type.
2001-08-09 19:43:37 +00:00
Guido van Rossum c11e192d41 Thinking back to the 2.22 revision, I didn't like what I did there one
bit.  For one, this class:

    class C(object):
        def __new__(myclass, ...): ...

would have no way to call the __new__ method of its base class, and
the workaround (to create an intermediate base class whose __new__ you
can call) is ugly.

So, I've come up with a better solution that restores object.__new__,
but still solves the original problem, which is that built-in and
extension types shouldn't inherit object.__new__.  The solution is
simple: only "heap types" inherit tp_new.  Simpler, less code,
perfect!
2001-08-09 19:38:15 +00:00
Guido van Rossum a995c91243 Use type(x).__name__ to get the name of the type instead of parsing
repr(type(x)).
2001-08-09 18:56:27 +00:00
Guido van Rossum 0263c80b90 Unittests for mhlib, by Nick Mathewson. 2001-08-09 18:18:08 +00:00
Guido van Rossum 29206bc8a3 Apply anonymous SF patch #441229.
Previously, f.read() and f.readlines() checked for
  errors on their file object and possibly raised an
  IOError, but f.readline() didn't. This patch makes
  f.readline() behave like the others.

Note that I've added a call to clearerr() since the other calls to
ferror() include that too.

I have no way to test this code. :-)
2001-08-09 18:14:59 +00:00
Tim Peters 55c12d4d5b SF patch #403640: incomplete proxy handling in URLLIB
Look specific to Windows.  Don't know whether it works.
2001-08-09 18:04:14 +00:00
Guido van Rossum f0713d3f4d SF Patch #420725 by Walter Doerwald:
For local files urllib.py doesn't return the MIME
  headers that the documentation says it does:

  http://www.python.org/doc/current/lib/module-
  urllib.html#l2h-2187 states that "When the method is
  local-file, returned headers will include a Date
  representing the file's last-modified time, a Content-
  Length giving file size, and a Content-Type containing
  a guess at the file's type"

  But in Python 2.1 the only header that gets returned
  is the Content-Type:

  >>> import urllib
  >>> f = urllib.urlopen("gurk.txt")
  >>> f.info().headers
  ['Content-Type: text/plain\n']
2001-08-09 17:43:35 +00:00
Martin v. Löwis c8718c13e8 Patch #403514: precompute _subst_format_str to avoid a call to
string.join() on each invocation of _bind.
2001-08-09 16:57:33 +00:00
Guido van Rossum e358b423c2 Added Josh Cogliati (turtle.py contributor). 2001-08-09 16:43:52 +00:00
Guido van Rossum 3c7a25a4d9 Applied SF patch #438424 by Josh Cogliati:
Python's logolike module turtle.py did not display
the turtle except when actually drawing lines.
This patch changes the turtle.py module so that
it displays the turtle at all times when tracing is
on. This is similar to the the way that logo works.
When tracing is off the turtle will not be displayed.
2001-08-09 16:42:07 +00:00
Guido van Rossum 92e2d5c7ae Apply SF patch #424554: check for PYTHONDUMPREFS to be set instead of
asking to print the references.
2001-08-09 16:37:16 +00:00
Neil Schemenauer 6d40bf24dc One more. 2001-08-09 16:04:28 +00:00
Neil Schemenauer c7c8d8e32d Add get_objects function. This is a low level function (like
get_referents, and is not yet documented in the library manual).
Suggestions for a better name welcome.
2001-08-09 15:58:59 +00:00
Neil Schemenauer 48c7034454 Add get_referents function. Closes SF patch #402925. 2001-08-09 15:38:31 +00:00
Martin v. Löwis dbdcb0fc3a Regenerate for glibc 2.2.3. 2001-08-09 12:48:17 +00:00
Martin v. Löwis 4414933f62 Regenerate for Solaris 8. 2001-08-09 12:33:32 +00:00
Martin v. Löwis f2f8c51ae6 When representing #includes as imports, do from MOD import *. 2001-08-09 12:32:10 +00:00
Martin v. Löwis 4f85bf3311 Patch #437683: Use re instead of regex.
If multiple header files are processed simultaneously which include each
other, the corresponding modules mport each other. Specifically, if h2py
is invoked with sys/types.h first, later header files won't contain the
complete contents of TYPES.py.
2001-08-09 12:24:38 +00:00
Martin v. Löwis a2ac60277c Move IPv6 test further down so that usage of -lnsl has been tested.
Recognize Solaris IPv6 by checking /etc/netconfig.
2001-08-09 11:40:14 +00:00
Martin v. Löwis 1d5ecb7cfa Patch #433537: Cache ac_cv_bad_static_forward.
Also move up AC_AIX and AC_MINIX further up.
2001-08-09 10:29:44 +00:00
Thomas Wouters df8dc365c5 Michael Hudson correctly pointed out we should cvsignore pyconfig.h, not
config.h (anymore). People will still have to delete config.h from their
source trees manually :)
2001-08-09 09:53:00 +00:00
Martin v. Löwis 8cc965c1fb Patch #448474: Add support for tell() and seek() to gzip.GzipFile. 2001-08-09 07:21:56 +00:00
Tim Peters f30f1fc900 In the acks, CamelCase InstallMaster the same way Wise does it. 2001-08-09 05:16:00 +00:00
Tim Peters b6135df018 Add a comma. 2001-08-08 22:58:52 +00:00
Guido van Rossum 396c032d68 Mark binary operators as done.
(This file could stand some reorganization -- it's hard to tell the
open items apart from those that are done or nearly done.)
2001-08-08 22:51:13 +00:00
Tim Peters 8eb16b1658 Give some special thanks on the final "Installation Completed!" screen. 2001-08-08 22:50:35 +00:00
Guido van Rossum 64deef2b17 A test suite for binary operators, disguised as a rational number
class.
2001-08-08 22:27:20 +00:00
Guido van Rossum dc91b99f23 Proper support for binary operators, including true division and floor
division.  The basic binary operators now all correctly call the
__rxxx__ variant when they should.

In type_new(), I now make the new type a new-style number unless it
inherits from an old-style number that has numeric methods.

By way of cosmetics, I've changed the signatures of the SLOT<i> macros
to take actual function names and operator names as strings, rather
than rely on C preprocessor symbol manipulations.  This makes the
calls slightly more verbose, but greatly helps simple searches through
the file: you can now find out where "__radd__" is used or where the
function slot_nb_power() is defined and where it is used.
2001-08-08 22:26:22 +00:00
Jack Jansen ab04653715 Resource files for OSX Python.framework. Incomplete, and they should probably
eventually be generated so version numbers and such are automatically
correct, but they do the job for now.
2001-08-08 22:00:26 +00:00
Greg Ward 034cbf1350 Typo fix (spelling mistake in error message). 2001-08-08 20:55:10 +00:00
Tim Peters 36a90f61e8 Thanks to
LettError, Erik van Blokland, http://www.letterror.com/
the Python Windows installer finally has an attractive Pythonic bitmap
to delight the senses and dampen the fears of the millions and millions of
eager new Windows users anticipating their first Python programming joy.

Always knew Mac users secretly wanted to switch to Windows <wink>.
2001-08-08 20:50:07 +00:00
Martin v. Löwis 6113d352a6 Patch #422471: Install IDLE Help File 2001-08-08 20:26:14 +00:00
Tim Peters ce42a8ec68 Add the new Tools/compiler/README to the WIndows install, as README.txt.
In the Wise installer's "Advanced Options" dialog, substitute in the
actual name of "the system directory" -- this is clearer, and especially
for people reading this dialog who aren't me <wink>.
2001-08-08 19:32:25 +00:00
Fred Drake 0197858f62 Added documentation for PyNumber_*FloorDivide(), PyNumber_*TrueDivide(),
PyInterpreterState_*Head(), PyInterpreterState_Next(), and
PyThreadState_Next().

Wrapped some long lines, added some others.
2001-08-08 19:14:53 +00:00
Andrew M. Kuchling 564165e5c5 Added README to this directory 2001-08-08 19:10:11 +00:00
Fred Drake 03590c6bdc Reference counting information for PyNumber_*FloorDivide() and
PyNumber_*TrueDivide().
2001-08-08 18:50:18 +00:00
Tim Peters 8a267b62cc Remove 6-year old hack to worm around a bug in "NextSpec/Sparc 3.3
pre-release limits.h".
2001-08-08 18:24:45 +00:00
Guido van Rossum 0415620af9 Added note to self about __new__ issue. 2001-08-08 16:57:43 +00:00
Martin v. Löwis ff88556af6 Patch #449083: Use builtins to initalize the module. 2001-08-08 16:02:01 +00:00