Commit Graph

26956 Commits

Author SHA1 Message Date
Neal Norwitz 6e5be22d97 Remove extra space in docstring 2003-04-17 13:13:55 +00:00
Guido van Rossum c1f6e8cbc1 - The repr() of a weakref object now shows the __name__ attribute of
the referenced object, if it has one.

Also use %p to format pointers consistently, and use <weakproxy ...>
in proxy_repr(), to match the type name.
2003-04-16 21:13:23 +00:00
Martin v. Löwis 6f29ff319b Support UCS-4 Tcl for UCS-4 Python builds. Fixes #719880. 2003-04-16 20:34:55 +00:00
Guido van Rossum 2cd0a65c70 Add 'get' method to Variable and switch it from internal class to
standard class (it is now useful because it doesn't constrain the type
of the value).
2003-04-16 20:10:03 +00:00
Guido van Rossum a4541a30fc - super() no longer ignores data descriptors, except __class__. See
the thread started at
  http://mail.python.org/pipermail/python-dev/2003-April/034338.html
2003-04-16 20:02:22 +00:00
Guido van Rossum 6cc5bb685d Sigh. The crucial change was still missing from the previous
checkin. :-(
2003-04-16 20:01:36 +00:00
Martin v. Löwis bfe175c190 For StringVar results to strings. Document that boolean things are of
type bool. Requested in #721171.
2003-04-16 19:42:51 +00:00
Guido van Rossum 76ba09fd81 - super() no longer ignores data descriptors, except __class__. See
the thread started at
  http://mail.python.org/pipermail/python-dev/2003-April/034338.html
2003-04-16 19:40:58 +00:00
Raymond Hettinger 954bcf5fe0 Minor source formatting fixes. 2003-04-16 18:40:04 +00:00
Barry Warsaw e04ee70a68 Mostly reformatting, splitting long lines, whitespace normalization
etc.

Fixed one typo in the __main__ section.
2003-04-16 18:08:23 +00:00
Raymond Hettinger 2ed6dff796 As discussed on python-dev, revised docs to note that
PyObject_IsTrue() can have an error result.

Also, added missing docs for PyObject_Not().

Will backport.
2003-04-16 17:28:12 +00:00
Neal Norwitz 1475c49211 Add version info for name2codepoint and codepoint2name 2003-04-16 13:21:06 +00:00
Jack Jansen be5d707926 When on MacOSX, and only in a framework build, add
~/Library/Python/2.3/site-packages to sys.path, if it exists.
2003-04-16 13:12:21 +00:00
Jack Jansen 36d49a907f The identify() description didn't match the code. Fixed. 2003-04-16 13:10:53 +00:00
Jack Jansen 36b5198381 Refer people to the help pages on failure to load the database. 2003-04-16 12:40:21 +00:00
Jack Jansen 64509b33a7 Added a note on getting 404 Not Found errors when loading the database. 2003-04-16 12:39:03 +00:00
Jack Jansen a950d7b24f Added support for per-user installs.
Don't show psuedo-packages by default, added a button to show them.
Cleaned up interface a little (not enough, though).
2003-04-16 12:17:56 +00:00
Jack Jansen 20fa6754d1 Allow switching of install dir after creation of preferences.
Changed some message to be clearer when presented by Package Manager.
2003-04-16 12:15:34 +00:00
Walter Dörwald 5688b7ac3e Add two dictionaries to htmlentitydefs: name2codepoint maps
HTML entity names to Unicode codepoints (as integers).
codepoint2name is the reverse mapping. From SF patch #722017.
2003-04-16 09:46:13 +00:00
Guido van Rossum 19a02ba69d Fix three (!) object leaks in the code for assignment to __bases__. 2003-04-15 22:09:45 +00:00
Jack Jansen 4323090d95 Adapted GUI for per-user install. Doesn't do anything yet, though 2003-04-15 21:59:42 +00:00
Jack Jansen a95eab5920 Test SystemEvents too. 2003-04-15 21:40:30 +00:00
Martin v. Löwis ee24e9cad0 Use object interface for global vars. Fixes #721171.
Also move complete processing of get/set/delvar calls to target thread.
2003-04-15 20:33:20 +00:00
Guido van Rossum 52b2705e9c Ouch, it's Carlo Verre, not Verre Carlo. 2003-04-15 20:05:10 +00:00
Walter Dörwald 357981e99d Add a few errors tests for range(). 2003-04-15 18:59:28 +00:00
Walter Dörwald 64976e74af Fix copy & paste error in comment. 2003-04-15 16:08:01 +00:00
Walter Dörwald 43bc1f18db Fix the test so that it works even when /etc/group has two entries
for the same gid.
2003-04-15 15:59:36 +00:00
Walter Dörwald 66e1e508b9 Fix the test so that it works even when /etc/passwd has two entries
for the same uid.
2003-04-15 15:39:08 +00:00
Guido van Rossum 0fc8f00252 - pythunrun.c, Py_Finalize(): move the call to _Py_PrintReferences()
even farther down, to just before the call to
  _PyObject_DebugMallocStats().  This required the following changes:

- pystate.c, PyThreadState_GetDict(): changed not to raise an
  exception or issue a fatal error when no current thread state is
  available, but simply return NULL without raising an exception
  (ever).

- object.c, Py_ReprEnter(): when PyThreadState_GetDict() returns NULL,
  don't raise an exception but return 0.  This means that when
  printing a container that's recursive, printing will go on and on
  and on.  But that shouldn't happen in the case we care about (see
  first bullet).

- Updated Misc/NEWS and Doc/api/init.tex to reflect changes to
  PyThreadState_GetDict() definition.
2003-04-15 15:12:39 +00:00
Jack Jansen 6fde1cef4a - Use the tarfile module to unpack tarfiles.
- Allow setting the destination install directory. If this is set then
  it is used for the modules, other items (header files, etc) are not
  installed, and warnings are printed if the package would have liked to.

Unfortunaltey binary installs seem broken due to a tarfile bug (#721871)
or my misunderstanding of how tarfile works.
2003-04-15 14:43:05 +00:00
Tim Peters 299b3dffd2 test_range(): The C code changed to raise TypeError in one of these
cases, but the test still expected ValueError.  Repaired that.
2003-04-15 14:40:03 +00:00
Guido van Rossum d922fa46ce Move the call to _Py_PrintReferences() a bit further down. This
prevents it from showing stuff (like codec state) that is cleared when
the interpreter state is cleared.
2003-04-15 14:10:09 +00:00
Guido van Rossum 28e83e3a66 Some errors from range() should be TypeError, not ValueError. 2003-04-15 12:43:26 +00:00
Walter Dörwald b1ded1e508 Port test_pwd.py to PyUnit. Check that getpwall() and
getpwnam()/getpwuid() return consistent data.

Change test_grp to check that getgrall() and
getgrnam()/getgrgid() return consistent data.
Add error checks similar to test_pwd.py.

Port test___all__.py to PyUnit.

From SF patch #662807.
2003-04-15 11:10:33 +00:00
Raymond Hettinger 255a3d08a1 Extend SF patch #707257: Improve code generation
to cover the case for:  "x,y,z=1,2,3".  Gives a 30% speed-up.

Also, added FOR_ITER to the list of opcodes that can jump.
2003-04-15 10:35:07 +00:00
Guido van Rossum 8b7a9a38c6 The date class is now properly subclassable. (SF bug #720908)
(This is only the tip of the iceberg; the time and datetime classes
need the same treatment.)
2003-04-14 22:01:58 +00:00
Guido van Rossum 4dcdb78c6f Close off the "Verre Carlo hack" as discussed on python-dev. 2003-04-14 21:46:03 +00:00
Guido van Rossum 2fd02eb80f super_getattro(): kill some dead code; explain a mystery. 2003-04-14 21:20:26 +00:00
Guido van Rossum 3a3cca5b82 - list.insert(i, x) now interprets negative i as it would be
interpreted by slicing, so negative values count from the end of the
  list.  This was the only place where such an interpretation was not
  placed on a list index.
2003-04-14 20:58:14 +00:00
Andrew M. Kuchling b43f15e1ce Add a name 2003-04-14 18:47:28 +00:00
Guido van Rossum 817d6c9c9e Prompted by Tim's comment, when handle_range_longs() sees an
unexpected type, report the actual type rather than 'float'.  (It's
hard to even reach this code with a float. :-)
2003-04-14 18:25:04 +00:00
Guido van Rossum 41c99e7f96 SF patch #720991 by Gary Herron:
A small fix for bug #545855 and Greg Chapman's
addition of op code SRE_OP_MIN_REPEAT_ONE for
eliminating recursion on simple uses of pattern '*?' on a
long string.
2003-04-14 17:59:34 +00:00
Andrew M. Kuchling 44c62ef5ee Typo fix 2003-04-14 15:32:18 +00:00
Andrew M. Kuchling dff694bb9d Fix docstring typo 2003-04-14 15:31:27 +00:00
Jason Tishler 21664d854f Patch #709178: remove -static option from cygwinccompiler
After some more reflection (and no negative feedback), I am reverting the
original patch and applying my version, cygwinccompiler.py-shared.diff,
instead.

My reasons are the following:

1. support for older toolchains is retained
2. support for new toolchains (i.e., ld -shared) is added

The goal of my approach is to avoid breaking older toolchains while adding
better support for newer ones.
2003-04-14 12:51:26 +00:00
Jeremy Hylton 42a8aedb29 Make readers and writers participate in garbage collection.
Fix memory leak in dialect_init().
2003-04-14 02:20:55 +00:00
Neal Norwitz ae323198e5 Get test working if gzip support is not available 2003-04-14 01:18:32 +00:00
Tim Peters 874e1f7ed3 handle_range_longs(): refcount handling is very delicate here, and
the code erroneously decrefed the istep argument in an error case.  This
caused a co_consts tuple to lose a float constant prematurely, which
eventually caused gc to try executing static data in floatobject.c (don't
ask <wink>).  So reworked this extensively to ensure refcount correctness.
2003-04-13 22:13:08 +00:00
Andrew M. Kuchling d39078ba2d Mention timeit module
Fix error in description of logging package's 'propagate'
Mention default arg to dict.pop()
Link to more module docs
   (I wonder if I should adopt some convention such as linking the first
    mention of all new modules to the LibRef?)
Various text changes
Bump version number and Python version
2003-04-13 21:44:28 +00:00
Andrew M. Kuchling ba887bb04e Use simpler import 2003-04-13 21:13:02 +00:00