From noreply@sourceforge.net Wed Aug 1 00:18:03 2001 From: noreply@sourceforge.net (noreply@sourceforge.net) Date: Tue, 31 Jul 2001 16:18:03 -0700 Subject: [Python-bugs-list] [ python-Bugs-446602 ] Large File Support for Linux Message-ID: Bugs item #446602, was opened at 2001-07-31 16:18 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=105470&aid=446602&group_id=5470 Category: Documentation Group: None Status: Open Resolution: None Priority: 5 Submitted By: Patrick Day (pday) Assigned to: Fred L. Drake, Jr. (fdrake) Summary: Large File Support for Linux Initial Comment: In section 8.1.1 (Large File Support) of the Python Library Reference a method of activating large file support in Linux was described as follows: CC="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64" export CC ./configure This does not work. I think what was meant was something like: CC="gcc -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64" export CC ./configure ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=105470&aid=446602&group_id=5470 From noreply@sourceforge.net Wed Aug 1 00:31:10 2001 From: noreply@sourceforge.net (noreply@sourceforge.net) Date: Tue, 31 Jul 2001 16:31:10 -0700 Subject: [Python-bugs-list] [ python-Bugs-446551 ] profiler invents error in nested scopes Message-ID: Bugs item #446551, was opened at 2001-07-31 13:55 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=105470&aid=446551&group_id=5470 Category: Python Library Group: Python 2.1.1 Status: Open Resolution: None Priority: 5 Submitted By: W. G. Mitchener (caeshmer) >Assigned to: Jeremy Hylton (jhylton) Summary: profiler invents error in nested scopes Initial Comment: I'm trying to use the profiler in the Python 2.1 RPM on Red Hat 7.0. Here's the most reduced form of problem I could come up with. This is the file ProfilerBug.py: from __future__ import nested_scopes class Spam: def __init__(self, x, y, z): eggs = (self, x, y, z) a = 4 b = 5 c = 6 def f(t): return a + b + c + t def _test1(): pr = Spam(1, 2, 3) If I do this: Python 2.1 (#1, Jul 13 2001, 10:27:46) [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-85)] on linux2 Type "copyright", "credits" or "license" for more information. >>> import ProfilerBug >>> ProfilerBug._test1() >>> there's no error. But here's what I get when I run the profiler: Python 2.1 (#1, Jul 13 2001, 10:27:46) [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-85)] on linux2 Type "copyright", "credits" or "license" for more information. >>> import profile >>> import ProfilerBug >>> profile.run('ProfilerBug._test1()') Traceback (most recent call last): File "", line 1, in ? File "/usr/lib/python2.1/profile.py", line 71, in run prof = prof.run(statement) File "/usr/lib/python2.1/profile.py", line 356, in run return self.runctx(cmd, dict, dict) File "/usr/lib/python2.1/profile.py", line 362, in runctx exec cmd in globals, locals File "", line 1, in ? File "ProfilerBug.py", line 15, in _test1 pr = Spam(1, 2, 3) File "ProfilerBug.py", line 6, in __init__ eggs = (self, x, y, z) UnboundLocalError: local variable 'self' referenced before assignment It has something to do with nested scopes, because if I comment out the definition of f, the error goes away. ---------------------------------------------------------------------- >Comment By: Guido van Rossum (gvanrossum) Date: 2001-07-31 16:31 Message: Logged In: YES user_id=6380 Sounds like one for Jeremy. Have you tried this with the bugfix release 2.1.1 yet? ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=105470&aid=446551&group_id=5470 From noreply@sourceforge.net Wed Aug 1 03:21:51 2001 From: noreply@sourceforge.net (noreply@sourceforge.net) Date: Tue, 31 Jul 2001 19:21:51 -0700 Subject: [Python-bugs-list] [ python-Bugs-446645 ] rexec and function attributes Message-ID: Bugs item #446645, was opened at 2001-07-31 19:21 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=105470&aid=446645&group_id=5470 Category: Python Library Group: None Status: Open Resolution: None Priority: 5 Submitted By: Matthew Brecknell (brecknell) Assigned to: Nobody/Anonymous (nobody) Summary: rexec and function attributes Initial Comment: The behaviour of the rexec module seems to be inconsistent with respect to function attributes. The function attribute dictionary is read-only in the restricted environment until you go and write to it outside the restricted environment. After that, the dictionary becomes writable in the restricted environment too. See the following examples: Python 2.1 (#1, Jun 29 2001, 15:51:00) [GCC 2.95.3 19991030 (prerelease)] on openbsd2 Type "copyright", "credits" or "license" for more information. >>> import rexec >>> r = rexec.RExec() >>> def f(): pass ... >>> r.modules['__main__'].f = f >>> r.r_exec('f.__dict__["attr"] = "value"') Traceback (most recent call last): File "", line 1, in ? File "/opt/python/lib/python2.1/rexec.py", line 264, in r_exec exec code in m.__dict__ File "", line 1, in ? TypeError: object does not support item assignment >>> f.attr = "value" >>> r.r_exec('f.__dict__["attr"] = "new value"') >>> f.attr 'new value' >>> Or, looking at it another way: Python 2.1 (#1, Jun 29 2001, 15:51:00) [GCC 2.95.3 19991030 (prerelease)] on openbsd2 Type "copyright", "credits" or "license" for more information. >>> import rexec >>> r = rexec.RExec() >>> r.r_exec("def f(): pass") >>> r.r_exec('f.__dict__["attr"] = "value"') Traceback (most recent call last): File "", line 1, in ? File "/opt/python/lib/python2.1/rexec.py", line 264, in r_exec exec code in m.__dict__ File "", line 1, in ? TypeError: object does not support item assignment >>> f = r.modules['__main__'].f >>> f.attr = "value" >>> r.r_exec('f.__dict__["attr"] = "new value"') >>> f.attr 'new value' >>> Please don't abuse me too much for still being on Python 2.1, since I haven't had time to try 2.1.1 or 2.2a1! If I don't put this in now, I'll forget. I'm guessing that neither rexec nor function attributes are widely used, so not too many people would have come across this. If I get more time down the track, I'll look into it further. Regards, Matt. ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=105470&aid=446645&group_id=5470 From noreply@sourceforge.net Wed Aug 1 07:02:52 2001 From: noreply@sourceforge.net (noreply@sourceforge.net) Date: Tue, 31 Jul 2001 23:02:52 -0700 Subject: [Python-bugs-list] [ python-Bugs-446671 ] configure ignores --mandir Message-ID: Bugs item #446671, was opened at 2001-07-31 23:02 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=105470&aid=446671&group_id=5470 Category: Build Group: Python 2.2 Status: Open Resolution: None Priority: 5 Submitted By: Bill Bumgarner (bbum) Assigned to: Nobody/Anonymous (nobody) Summary: configure ignores --mandir Initial Comment: Actually, Makefile.in (in various places) ignores the --mandir configuration option to configure. As such, man pages are always installed under $(PREFIX)/man regardless of what the user specifies. (I have noticed that an awful lot of GNU packages have a similar bug. Yet, a few BSD derived operating systems like man pages to be installed in /usr/local/share/man/) b.bum ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=105470&aid=446671&group_id=5470 From noreply@sourceforge.net Wed Aug 1 14:30:04 2001 From: noreply@sourceforge.net (noreply@sourceforge.net) Date: Wed, 01 Aug 2001 06:30:04 -0700 Subject: [Python-bugs-list] [ python-Bugs-446671 ] configure ignores --mandir Message-ID: Bugs item #446671, was opened at 2001-07-31 23:02 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=105470&aid=446671&group_id=5470 Category: Build >Group: None Status: Open Resolution: None Priority: 5 Submitted By: Bill Bumgarner (bbum) Assigned to: Nobody/Anonymous (nobody) Summary: configure ignores --mandir Initial Comment: Actually, Makefile.in (in various places) ignores the --mandir configuration option to configure. As such, man pages are always installed under $(PREFIX)/man regardless of what the user specifies. (I have noticed that an awful lot of GNU packages have a similar bug. Yet, a few BSD derived operating systems like man pages to be installed in /usr/local/share/man/) b.bum ---------------------------------------------------------------------- >Comment By: Guido van Rossum (gvanrossum) Date: 2001-08-01 06:30 Message: Logged In: YES user_id=6380 I'm not sure who's to blame. I've never even heard of --mandir. Unclear whether it's a bug. If someone feels like fixing this, let them go ahead, but I don't see this as a priority unless you provide a good motivating example as to why you would need this. ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=105470&aid=446671&group_id=5470 From noreply@sourceforge.net Wed Aug 1 17:21:20 2001 From: noreply@sourceforge.net (noreply@sourceforge.net) Date: Wed, 01 Aug 2001 09:21:20 -0700 Subject: [Python-bugs-list] [ python-Bugs-446671 ] configure ignores --mandir Message-ID: Bugs item #446671, was opened at 2001-07-31 23:02 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=105470&aid=446671&group_id=5470 Category: Build Group: None Status: Open Resolution: None Priority: 5 Submitted By: Bill Bumgarner (bbum) Assigned to: Nobody/Anonymous (nobody) Summary: configure ignores --mandir Initial Comment: Actually, Makefile.in (in various places) ignores the --mandir configuration option to configure. As such, man pages are always installed under $(PREFIX)/man regardless of what the user specifies. (I have noticed that an awful lot of GNU packages have a similar bug. Yet, a few BSD derived operating systems like man pages to be installed in /usr/local/share/man/) b.bum ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2001-08-01 09:21 Message: Logged In: NO The option is in configure within the 2.2 source, is a standard part of autoconf, and is easy to support. A lot of GNU programs are starting to do so. As well, there are a handful of systems that have the man pages split away from the binary/library/includes. I'll try and generate/submit the appropriate patch. [localhost:/tmp/Python-2.2a1] bbum% ./configure --help Usage: configure [options] [host] Options: [defaults in brackets after descriptions] Configuration: --cache-file=FILE cache test results in FILE --help print this message --no-create do not create output files --quiet, --silent do not print `checking...' messages --version print the version of autoconf that created configure Directory and file names: --prefix=PREFIX install architecture-independent files in PREFIX [/usr/local] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [same as prefix] --bindir=DIR user executables in DIR [EPREFIX/ bin] --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] --libexecdir=DIR program executables in DIR [EPREFIX/libexec] --datadir=DIR read-only architecture- independent data in DIR [PREFIX/share] --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] --sharedstatedir=DIR modifiable architecture- independent data in DIR [PREFIX/com] --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] --libdir=DIR object code libraries in DIR [EPREFIX/lib] --includedir=DIR C header files in DIR [PREFIX/ include] --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] --infodir=DIR info documentation in DIR [PREFIX/ info] --mandir=DIR man documentation in DIR [PREFIX/man] --srcdir=DIR find the sources in DIR [configure dir or ..] --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM ---------------------------------------------------------------------- Comment By: Guido van Rossum (gvanrossum) Date: 2001-08-01 06:30 Message: Logged In: YES user_id=6380 I'm not sure who's to blame. I've never even heard of --mandir. Unclear whether it's a bug. If someone feels like fixing this, let them go ahead, but I don't see this as a priority unless you provide a good motivating example as to why you would need this. ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=105470&aid=446671&group_id=5470 From noreply@sourceforge.net Wed Aug 1 17:51:08 2001 From: noreply@sourceforge.net (noreply@sourceforge.net) Date: Wed, 01 Aug 2001 09:51:08 -0700 Subject: [Python-bugs-list] [ python-Bugs-444842 ] array's buffer_info() -> length in bytes Message-ID: Bugs item #444842, was opened at 2001-07-26 08:51 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=105470&aid=444842&group_id=5470 Category: Documentation Group: None >Status: Closed >Resolution: Fixed Priority: 5 Submitted By: Armin Rigo (arigo) Assigned to: Fred L. Drake, Jr. (fdrake) Summary: array's buffer_info() -> length in bytes Initial Comment: In arraymodule.c, the array's method buffer_info() is documented to return (address, length), where 'length' is measured in bytes. Unfortunately, it currently returns the number of items instead. It should be fixed. Changing the return value could potentially break code relying on the actual (undocumented) behavior. On the other hand, merely changing the documentation to 'officialize' the bug would be a departure from buffer_info()'s original goal to provide direct raw memory access. I think the bug should be fixed, with a note about the different behavior of previous versions in the docs -- for maximum portability, users can always compute the length in bytes separately as "len(a)*a.itemsize". Current users of buffer_info() may already have noticed the bug and used the above formula to get the length, so their code won't break. Fix: in arraymodule.c: array_buffer_info: PyTuple_SET_ITEM(retval, 1, PyInt_FromLong((long)(self->ob_size * self->ob_descr->itemsize))); The multiplication should not overflow (care was taken about it at resize time). Armin ---------------------------------------------------------------------- >Comment By: Fred L. Drake, Jr. (fdrake) Date: 2001-08-01 09:51 Message: Logged In: YES user_id=3066 Fixed in Doc/lib/libarray.tex revision 1.30. ---------------------------------------------------------------------- Comment By: Guido van Rossum (gvanrossum) Date: 2001-07-27 09:07 Message: Logged In: YES user_id=6380 Hm, perhaps buffer_info() should be deprecated? ---------------------------------------------------------------------- Comment By: Guido van Rossum (gvanrossum) Date: 2001-07-27 09:03 Message: Logged In: YES user_id=6380 Boy what a mess. There are two possibilities: (a) essentially nobody uses this (b) occasionally someone uses it In case (a), fixing the code won't make a difference, so why bother. In case (b), fixing the code will break somebody's code. So I see no choice but to fix the documentation. Since the item size is readily available through the a.itemsize attribute, the actual buffer size is readily calculated as len(a)*a.itemsize. Reassigned to Fred for doc updates. I'll fix the docstring. ---------------------------------------------------------------------- Comment By: Tim Peters (tim_one) Date: 2001-07-26 15:56 Message: Logged In: YES user_id=31435 Assigned to Guido cuz it's a mess. buffer_info() has worked this way since it was first checked in (about 4 years ago). Armin is right that it doesn't match the manual or the docstring, and the docs make more sense than what it actually does. Dare we "break" this? Does buffer_info() even serve a purpose now given that arrays also support the buffer interface? ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=105470&aid=444842&group_id=5470 From noreply@sourceforge.net Wed Aug 1 17:57:24 2001 From: noreply@sourceforge.net (noreply@sourceforge.net) Date: Wed, 01 Aug 2001 09:57:24 -0700 Subject: [Python-bugs-list] [ python-Bugs-446136 ] regex documentation Message-ID: Bugs item #446136, was opened at 2001-07-30 14:52 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=105470&aid=446136&group_id=5470 Category: Documentation Group: Feature Request >Status: Closed >Resolution: Fixed Priority: 5 Submitted By: Nobody/Anonymous (nobody) Assigned to: Fred L. Drake, Jr. (fdrake) Summary: regex documentation Initial Comment: Python Library Reference: In Contents_of_Module_re.html please add this example. I think a lot of people will benefit: sub(...) # '"foo"' --> 'foo' def remove_quotation_mark(s): return re.sub('^"(.*)"$', "\1", s) ---------------------------------------------------------------------- >Comment By: Fred L. Drake, Jr. (fdrake) Date: 2001-08-01 09:57 Message: Logged In: YES user_id=3066 I don't think the specific example is very helpful, but an example is needed. I've added one and fixed some other re module doc problems in Doc/lib/libre.tex revision 1.65. ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=105470&aid=446136&group_id=5470 From noreply@sourceforge.net Wed Aug 1 18:00:46 2001 From: noreply@sourceforge.net (noreply@sourceforge.net) Date: Wed, 01 Aug 2001 10:00:46 -0700 Subject: [Python-bugs-list] [ python-Bugs-446602 ] Large File Support for Linux Message-ID: Bugs item #446602, was opened at 2001-07-31 16:18 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=105470&aid=446602&group_id=5470 Category: Documentation Group: None >Status: Closed >Resolution: Fixed Priority: 5 Submitted By: Patrick Day (pday) Assigned to: Fred L. Drake, Jr. (fdrake) Summary: Large File Support for Linux Initial Comment: In section 8.1.1 (Large File Support) of the Python Library Reference a method of activating large file support in Linux was described as follows: CC="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64" export CC ./configure This does not work. I think what was meant was something like: CC="gcc -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64" export CC ./configure ---------------------------------------------------------------------- >Comment By: Fred L. Drake, Jr. (fdrake) Date: 2001-08-01 10:00 Message: Logged In: YES user_id=3066 This ias already been fixed. The fix was released as part of the Python 2.1.1 documentation package. ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=105470&aid=446602&group_id=5470 From noreply@sourceforge.net Wed Aug 1 18:17:58 2001 From: noreply@sourceforge.net (noreply@sourceforge.net) Date: Wed, 01 Aug 2001 10:17:58 -0700 Subject: [Python-bugs-list] [ python-Bugs-445749 ] Tutorial (5.6) "Smaller" means "lesser" Message-ID: Bugs item #445749, was opened at 2001-07-29 12:44 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=105470&aid=445749&group_id=5470 Category: Documentation Group: None >Status: Closed >Resolution: Fixed Priority: 5 Submitted By: Nobody/Anonymous (nobody) Assigned to: Fred L. Drake, Jr. (fdrake) >Summary: Tutorial (5.6) "Smaller" means "lesser" Initial Comment: I would propose an addition to section 5.6 of the tutorial, to clarify that "smaller" in comparisons means "lesser". To do so, I might recommend adding "(lesser)" after the precise and mathematically correct adjective "smaller", as in: "If one sequence is an initial sub-sequence of the other, the shorter sequence is the smaller (lesser) one." ---------------------------------------------------------------------- >Comment By: Fred L. Drake, Jr. (fdrake) Date: 2001-08-01 10:17 Message: Logged In: YES user_id=3066 I've made the suggested change. Checked in as Doc/tut/tut.tex revision 1.146. ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=105470&aid=445749&group_id=5470 From noreply@sourceforge.net Wed Aug 1 18:47:36 2001 From: noreply@sourceforge.net (noreply@sourceforge.net) Date: Wed, 01 Aug 2001 10:47:36 -0700 Subject: [Python-bugs-list] [ python-Bugs-446874 ] 2.2a1: constructors have no docstring Message-ID: Bugs item #446874, was opened at 2001-08-01 10:47 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=105470&aid=446874&group_id=5470 Category: type/class unification Group: Python 2.2 Status: Open Resolution: None Priority: 5 Submitted By: Walter Dіrwald (doerwalter) Assigned to: Guido van Rossum (gvanrossum) Summary: 2.2a1: constructors have no docstring Initial Comment: In 2.2a1 the constructors of the builtin types don't have docstrings: >>> list.__init__ >>> list.__init__.__doc__ Traceback (most recent call last): File "", line 1, in ? AttributeError: 'wrapper_descriptor' object has no attribute '__doc__' If this can't be fixed, the documentation for the constructor arguments should be part of the docstring for the type object as it's done for list, but not for dictionary: >>> print list.__doc__ list() -> new list list(sequence) -> new list initialized from sequence's items >>> print dictionary.__doc__ dictionary type ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=105470&aid=446874&group_id=5470 From noreply@sourceforge.net Wed Aug 1 19:34:17 2001 From: noreply@sourceforge.net (noreply@sourceforge.net) Date: Wed, 01 Aug 2001 11:34:17 -0700 Subject: [Python-bugs-list] [ python-Bugs-442791 ] 2.2a1: New style classes and __delitem__ Message-ID: Bugs item #442791, was opened at 2001-07-19 08:44 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=105470&aid=442791&group_id=5470 Category: type/class unification Group: Python 2.2 Status: Closed Resolution: Fixed Priority: 5 Submitted By: Walter Dіrwald (doerwalter) Assigned to: Guido van Rossum (gvanrossum) Summary: 2.2a1: New style classes and __delitem__ Initial Comment: And another one: New style class don't seem to support __delitem__: ---- class Foo(object): def __delitem__(self, key): print "__delitem__" del Foo()[42] ---- This results in: Traceback (most recent call last): File "test.py", line 5, in ? del Foo()[42] TypeError: object doesn't support item deletion ---- Changing the base class to dictionary results in: ---- Traceback (most recent call last): File "test.py", line 5, in ? del Foo()[42] KeyError: 42 ---- but Foo.__delitem__ doesn't seem to be called. ---------------------------------------------------------------------- >Comment By: Walter Dіrwald (doerwalter) Date: 2001-08-01 11:34 Message: Logged In: YES user_id=89016 I checked out the descr-branch and it seems that dictionary still doesn't support __delitem__: >>> x = {} >>> dictionary.__setitem__(x, 1, 1) >>> x {1: 1} >>> dictionary.__delitem__(x, 1) Traceback (most recent call last): File "", line 1, in ? AttributeError: type object 'dictionary' has no attribute '__delitem__' ---------------------------------------------------------------------- Comment By: Guido van Rossum (gvanrossum) Date: 2001-07-19 09:36 Message: Logged In: YES user_id=6380 Whoops, you found a whole slew of bugs in this area! I've fixed this now in the descr-branch of the CVS tree, in Object/typeobject.c:2.16.8.69. I've also added a bit to the test suite that checks these (and slices). ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=105470&aid=442791&group_id=5470 From noreply@sourceforge.net Wed Aug 1 20:53:30 2001 From: noreply@sourceforge.net (noreply@sourceforge.net) Date: Wed, 01 Aug 2001 12:53:30 -0700 Subject: [Python-bugs-list] [ python-Bugs-446551 ] profiler invents error in nested scopes Message-ID: Bugs item #446551, was opened at 2001-07-31 13:55 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=105470&aid=446551&group_id=5470 Category: Python Library Group: Python 2.1.1 >Status: Closed >Resolution: Fixed Priority: 5 Submitted By: W. G. Mitchener (caeshmer) Assigned to: Jeremy Hylton (jhylton) Summary: profiler invents error in nested scopes Initial Comment: I'm trying to use the profiler in the Python 2.1 RPM on Red Hat 7.0. Here's the most reduced form of problem I could come up with. This is the file ProfilerBug.py: from __future__ import nested_scopes class Spam: def __init__(self, x, y, z): eggs = (self, x, y, z) a = 4 b = 5 c = 6 def f(t): return a + b + c + t def _test1(): pr = Spam(1, 2, 3) If I do this: Python 2.1 (#1, Jul 13 2001, 10:27:46) [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-85)] on linux2 Type "copyright", "credits" or "license" for more information. >>> import ProfilerBug >>> ProfilerBug._test1() >>> there's no error. But here's what I get when I run the profiler: Python 2.1 (#1, Jul 13 2001, 10:27:46) [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-85)] on linux2 Type "copyright", "credits" or "license" for more information. >>> import profile >>> import ProfilerBug >>> profile.run('ProfilerBug._test1()') Traceback (most recent call last): File "", line 1, in ? File "/usr/lib/python2.1/profile.py", line 71, in run prof = prof.run(statement) File "/usr/lib/python2.1/profile.py", line 356, in run return self.runctx(cmd, dict, dict) File "/usr/lib/python2.1/profile.py", line 362, in runctx exec cmd in globals, locals File "", line 1, in ? File "ProfilerBug.py", line 15, in _test1 pr = Spam(1, 2, 3) File "ProfilerBug.py", line 6, in __init__ eggs = (self, x, y, z) UnboundLocalError: local variable 'self' referenced before assignment It has something to do with nested scopes, because if I comment out the definition of f, the error goes away. ---------------------------------------------------------------------- >Comment By: Jeremy Hylton (jhylton) Date: 2001-08-01 12:53 Message: Logged In: YES user_id=31392 This appears to be fixed in 2.1.1. ---------------------------------------------------------------------- Comment By: Guido van Rossum (gvanrossum) Date: 2001-07-31 16:31 Message: Logged In: YES user_id=6380 Sounds like one for Jeremy. Have you tried this with the bugfix release 2.1.1 yet? ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=105470&aid=446551&group_id=5470 From noreply@sourceforge.net Wed Aug 1 21:00:07 2001 From: noreply@sourceforge.net (noreply@sourceforge.net) Date: Wed, 01 Aug 2001 13:00:07 -0700 Subject: [Python-bugs-list] [ python-Bugs-446645 ] rexec and function attributes Message-ID: Bugs item #446645, was opened at 2001-07-31 19:21 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=105470&aid=446645&group_id=5470 >Category: Python Interpreter Core Group: None Status: Open Resolution: None >Priority: 6 Submitted By: Matthew Brecknell (brecknell) >Assigned to: Barry Warsaw (bwarsaw) Summary: rexec and function attributes Initial Comment: The behaviour of the rexec module seems to be inconsistent with respect to function attributes. The function attribute dictionary is read-only in the restricted environment until you go and write to it outside the restricted environment. After that, the dictionary becomes writable in the restricted environment too. See the following examples: Python 2.1 (#1, Jun 29 2001, 15:51:00) [GCC 2.95.3 19991030 (prerelease)] on openbsd2 Type "copyright", "credits" or "license" for more information. >>> import rexec >>> r = rexec.RExec() >>> def f(): pass ... >>> r.modules['__main__'].f = f >>> r.r_exec('f.__dict__["attr"] = "value"') Traceback (most recent call last): File "", line 1, in ? File "/opt/python/lib/python2.1/rexec.py", line 264, in r_exec exec code in m.__dict__ File "", line 1, in ? TypeError: object does not support item assignment >>> f.attr = "value" >>> r.r_exec('f.__dict__["attr"] = "new value"') >>> f.attr 'new value' >>> Or, looking at it another way: Python 2.1 (#1, Jun 29 2001, 15:51:00) [GCC 2.95.3 19991030 (prerelease)] on openbsd2 Type "copyright", "credits" or "license" for more information. >>> import rexec >>> r = rexec.RExec() >>> r.r_exec("def f(): pass") >>> r.r_exec('f.__dict__["attr"] = "value"') Traceback (most recent call last): File "", line 1, in ? File "/opt/python/lib/python2.1/rexec.py", line 264, in r_exec exec code in m.__dict__ File "", line 1, in ? TypeError: object does not support item assignment >>> f = r.modules['__main__'].f >>> f.attr = "value" >>> r.r_exec('f.__dict__["attr"] = "new value"') >>> f.attr 'new value' >>> Please don't abuse me too much for still being on Python 2.1, since I haven't had time to try 2.1.1 or 2.2a1! If I don't put this in now, I'll forget. I'm guessing that neither rexec nor function attributes are widely used, so not too many people would have come across this. If I get more time down the track, I'll look into it further. Regards, Matt. ---------------------------------------------------------------------- >Comment By: Jeremy Hylton (jhylton) Date: 2001-08-01 13:00 Message: Logged In: YES user_id=31392 You can see this behavior without using rexec. The problem you're seeing is that a function's __dict__ is None until you set an attribute on the function. Then the __dict__ slot is created and a new dictionary bound there. The error you see, which you attributed to rexec, is attempting to execute f.__dict__["attr"] => None["attr"]. There are two policy questions here, which Barry can better answer: 1. Should a function's __dict__ be accessible in restricted mode? A class's __dict__ is not, but it's a horse of a different color. 2. Is it okay for __dict__ to occasionally return None? I don't think it is. It's fine to be lazy about the creation of __dict__, but it should be created as soon as it is referenced. Otherwise, any code that wants to use __dict__ should be prepared to deal with None. ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=105470&aid=446645&group_id=5470 From noreply@sourceforge.net Wed Aug 1 21:01:13 2001 From: noreply@sourceforge.net (noreply@sourceforge.net) Date: Wed, 01 Aug 2001 13:01:13 -0700 Subject: [Python-bugs-list] [ python-Bugs-446525 ] python 2.1 debug library missing _sre? Message-ID: Bugs item #446525, was opened at 2001-07-31 12:50 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=105470&aid=446525&group_id=5470 >Category: Windows Group: None Status: Open Resolution: None Priority: 5 Submitted By: Nobody/Anonymous (nobody) >Assigned to: Tim Peters (tim_one) Summary: python 2.1 debug library missing _sre? Initial Comment: I downloaded the most current python 2.1 debug library as follows: Python-2.1-Debug.zip 16-Apr-2001 23:06 1.3M ZIP archive After initialization of the interpreter, a simple call like "PyRun_SimpleString("import re");" will return the following error: Traceback (most recent call last): ... File "c:\python21\lib\sre_compile.py", line 11, in ? import _sre ImportError: No module named _sre By comparision, running the same code using the Python Release library gives no such problem. Is this a bug? Much Thanks, Hugo ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=105470&aid=446525&group_id=5470 From noreply@sourceforge.net Wed Aug 1 21:20:12 2001 From: noreply@sourceforge.net (noreply@sourceforge.net) Date: Wed, 01 Aug 2001 13:20:12 -0700 Subject: [Python-bugs-list] [ python-Bugs-446525 ] python 2.1 debug library missing _sre? Message-ID: Bugs item #446525, was opened at 2001-07-31 12:50 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=105470&aid=446525&group_id=5470 Category: Windows Group: None Status: Open Resolution: None Priority: 5 Submitted By: Nobody/Anonymous (nobody) Assigned to: Tim Peters (tim_one) Summary: python 2.1 debug library missing _sre? Initial Comment: I downloaded the most current python 2.1 debug library as follows: Python-2.1-Debug.zip 16-Apr-2001 23:06 1.3M ZIP archive After initialization of the interpreter, a simple call like "PyRun_SimpleString("import re");" will return the following error: Traceback (most recent call last): ... File "c:\python21\lib\sre_compile.py", line 11, in ? import _sre ImportError: No module named _sre By comparision, running the same code using the Python Release library gives no such problem. Is this a bug? Much Thanks, Hugo ---------------------------------------------------------------------- >Comment By: Tim Peters (tim_one) Date: 2001-08-01 13:20 Message: Logged In: YES user_id=31435 Not enough info. You downloaded the .zip file, and *then* what? Did you unpack it? If so, to where? Note that the zip file is captured from a build tree, not a release tree. Then what? I don't know how you run your app, or how you compile it, or really anything else relevant. Try running python_d with -vv to see *where* it's looking for _sre. Also try getting your own extensions out of the picture. Note that I'm no longer going to ship the ...-Debug.zip file in 2.2, as tracking down misuses of it is a time sink. If you want to build things in debug mode, much better to compile Python yourself from the source release. In the meantime, if you want help with this, I'm afraid you're going to have attach enough files and info to this report so that I can reproduce your problem on my machine. ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=105470&aid=446525&group_id=5470 From noreply@sourceforge.net Wed Aug 1 21:35:30 2001 From: noreply@sourceforge.net (noreply@sourceforge.net) Date: Wed, 01 Aug 2001 13:35:30 -0700 Subject: [Python-bugs-list] [ python-Bugs-446874 ] 2.2a1: constructors have no docstring Message-ID: Bugs item #446874, was opened at 2001-08-01 10:47 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=105470&aid=446874&group_id=5470 Category: type/class unification Group: Python 2.2 Status: Open Resolution: None Priority: 5 Submitted By: Walter Dіrwald (doerwalter) Assigned to: Guido van Rossum (gvanrossum) Summary: 2.2a1: constructors have no docstring Initial Comment: In 2.2a1 the constructors of the builtin types don't have docstrings: >>> list.__init__ >>> list.__init__.__doc__ Traceback (most recent call last): File "", line 1, in ? AttributeError: 'wrapper_descriptor' object has no attribute '__doc__' If this can't be fixed, the documentation for the constructor arguments should be part of the docstring for the type object as it's done for list, but not for dictionary: >>> print list.__doc__ list() -> new list list(sequence) -> new list initialized from sequence's items >>> print dictionary.__doc__ dictionary type ---------------------------------------------------------------------- >Comment By: Guido van Rossum (gvanrossum) Date: 2001-08-01 13:35 Message: Logged In: YES user_id=6380 Good catch! Turns out wrapper descriptors do have docstrings (albeit rather generic ones), but the necessary things to extract these were omitted. I've fixed this in CVS now. I'll fix the dictionary docstring when I've decided on the signature. ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=105470&aid=446874&group_id=5470 From noreply@sourceforge.net Wed Aug 1 21:53:25 2001 From: noreply@sourceforge.net (noreply@sourceforge.net) Date: Wed, 01 Aug 2001 13:53:25 -0700 Subject: [Python-bugs-list] [ python-Bugs-445474 ] warn about import * inside functions Message-ID: Bugs item #445474, was opened at 2001-07-28 06:54 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=105470&aid=445474&group_id=5470 Category: Parser/Compiler Group: Python 2.2 Status: Open Resolution: None Priority: 5 Submitted By: Guido van Rossum (gvanrossum) >Assigned to: Jeremy Hylton (jhylton) Summary: warn about import * inside functions Initial Comment: According to the reference manual, import * is now only allowed at the module level. This is not enforced. We should add a warning for this. ---------------------------------------------------------------------- >Comment By: Jeremy Hylton (jhylton) Date: 2001-08-01 13:53 Message: Logged In: YES user_id=31392 Do you really want to get a warning about this? Last time it came up, we discovered that you were the most common user of this feature in Python. Fredrik also said he used it a lot, not surprising since the most common idiom is: def test(): from Tkinter import * ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=105470&aid=445474&group_id=5470 From noreply@sourceforge.net Wed Aug 1 21:55:00 2001 From: noreply@sourceforge.net (noreply@sourceforge.net) Date: Wed, 01 Aug 2001 13:55:00 -0700 Subject: [Python-bugs-list] [ python-Bugs-446588 ] Python-2.2a1 build dies Message-ID: Bugs item #446588, was opened at 2001-07-31 15:17 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=105470&aid=446588&group_id=5470 Category: Build Group: Python 2.2 Status: Open >Resolution: Works For Me >Priority: 3 Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: Python-2.2a1 build dies Initial Comment: after doing: ./configure --prefix=$HOME/local/STOW make the build bombs in the install phase with: usr/bin/install -c ./install-sh /home/mahler/local/STOW/Python-2.2a1/lib/python2.2/config/install-sh /usr/bin/install -c -m 644 ./Misc/Makefile.pre.in /home/mahler/local/STOW/Python-2.2a1/lib/python2.2/config/Makefile.pre.in PYTHONPATH= ./python ./setup.py install \ --install-platlib=/home/mahler/local/STOW/Python-2.2a1/lib/python2.2/lib-dynload 'import site' failed; use -v for traceback Traceback (most recent call last): File "./setup.py", line 6, in ? import sys, os, getopt ImportError: No module named os make[1]: *** [sharedinstall] Error 1 make[1]: Leaving directory `/mcallister0/home/mahler/local/SRC/Python-2.2a1' make: *** [STOW/Python-2.2a1] Error 2 rm SRC/Python-2.2a1make: unlink: SRC/Python-2.2a1: Is a directory STOW/Python-2.2a1make: unlink: STOW/Python-2.2a1: Is a directory SRC/Python-2.2a1/Makefile ---------------------------------------------------------------------- >Comment By: Guido van Rossum (gvanrossum) Date: 2001-08-01 13:55 Message: Logged In: YES user_id=6380 I can't reproduce this; configuring with a prefix works fine. Your story seems inconsistent: you say you configured with prefix $HOME/local/STOW, but the output you cite looks like it was configured with prefix $HOME/local/STOW/Python-2.2a1. What platform? What's $PYTHONHOME? Try adding -v to the python invocation that fails to see the failure traceback. ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=105470&aid=446588&group_id=5470 From noreply@sourceforge.net Wed Aug 1 21:56:56 2001 From: noreply@sourceforge.net (noreply@sourceforge.net) Date: Wed, 01 Aug 2001 13:56:56 -0700 Subject: [Python-bugs-list] [ python-Bugs-445474 ] warn about import * inside functions Message-ID: Bugs item #445474, was opened at 2001-07-28 06:54 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=105470&aid=445474&group_id=5470 Category: Parser/Compiler Group: Python 2.2 Status: Open Resolution: None Priority: 5 Submitted By: Guido van Rossum (gvanrossum) Assigned to: Jeremy Hylton (jhylton) Summary: warn about import * inside functions Initial Comment: According to the reference manual, import * is now only allowed at the module level. This is not enforced. We should add a warning for this. ---------------------------------------------------------------------- >Comment By: Guido van Rossum (gvanrossum) Date: 2001-08-01 13:56 Message: Logged In: YES user_id=6380 Yes, let's get this over with. If I really hate it I'll rip it out myself, but more likely I'll fix my code. :-) ---------------------------------------------------------------------- Comment By: Jeremy Hylton (jhylton) Date: 2001-08-01 13:53 Message: Logged In: YES user_id=31392 Do you really want to get a warning about this? Last time it came up, we discovered that you were the most common user of this feature in Python. Fredrik also said he used it a lot, not surprising since the most common idiom is: def test(): from Tkinter import * ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=105470&aid=445474&group_id=5470 From noreply@sourceforge.net Wed Aug 1 23:00:08 2001 From: noreply@sourceforge.net (noreply@sourceforge.net) Date: Wed, 01 Aug 2001 15:00:08 -0700 Subject: [Python-bugs-list] [ python-Bugs-446588 ] Python-2.2a1 build dies Message-ID: Bugs item #446588, was opened at 2001-07-31 15:17 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=105470&aid=446588&group_id=5470 Category: Build Group: Python 2.2 Status: Open Resolution: Works For Me Priority: 3 Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: Python-2.2a1 build dies Initial Comment: after doing: ./configure --prefix=$HOME/local/STOW make the build bombs in the install phase with: usr/bin/install -c ./install-sh /home/mahler/local/STOW/Python-2.2a1/lib/python2.2/config/install-sh /usr/bin/install -c -m 644 ./Misc/Makefile.pre.in /home/mahler/local/STOW/Python-2.2a1/lib/python2.2/config/Makefile.pre.in PYTHONPATH= ./python ./setup.py install \ --install-platlib=/home/mahler/local/STOW/Python-2.2a1/lib/python2.2/lib-dynload 'import site' failed; use -v for traceback Traceback (most recent call last): File "./setup.py", line 6, in ? import sys, os, getopt ImportError: No module named os make[1]: *** [sharedinstall] Error 1 make[1]: Leaving directory `/mcallister0/home/mahler/local/SRC/Python-2.2a1' make: *** [STOW/Python-2.2a1] Error 2 rm SRC/Python-2.2a1make: unlink: SRC/Python-2.2a1: Is a directory STOW/Python-2.2a1make: unlink: STOW/Python-2.2a1: Is a directory SRC/Python-2.2a1/Makefile ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2001-08-01 15:00 Message: Logged In: NO Yes, I made a boo boo: --prefix=$HOME/local/STOW/Python-2.2a1 $PYTHONHOME is $HOME/local since I use stow to manage all my dowloaded software in $HOME/local. This has always worked in the past. I have a script which automactes the whole untar, configure,make, install process to stop me making errors like the above. The problem appears to be that last command: PYTHONPATH= ./python ./setup.py install ... sets the $PYTHONPATH to be empty and the newly built image does not know that the libraries are in the Lib directory just below it. doing PYTHONPATH=./Lib ./python ./setup.py install --install-platlib=/home/mahler/local/STOW/Python-2.2a1/lib/python2.2/lib-dynload does not crash but produces a whole bunch of warnings like: building 'zlib' extension skipping /mcallister0/home/mahler/local/SRC/Python-2.2a1/Modules/zlibmodule.c (build/temp.linux-i686-2.2/zlibmodule.o up-to-date) gcc -shared build/temp.linux-i686-2.2/zlibmodule.o -L/usr/local/lib -lz -o build/lib.linux-i686-2.2/zlib.so WARNING: removing "zlib" since importing it failed Daniel ---------------------------------------------------------------------- Comment By: Guido van Rossum (gvanrossum) Date: 2001-08-01 13:55 Message: Logged In: YES user_id=6380 I can't reproduce this; configuring with a prefix works fine. Your story seems inconsistent: you say you configured with prefix $HOME/local/STOW, but the output you cite looks like it was configured with prefix $HOME/local/STOW/Python-2.2a1. What platform? What's $PYTHONHOME? Try adding -v to the python invocation that fails to see the failure traceback. ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=105470&aid=446588&group_id=5470 From noreply@sourceforge.net Wed Aug 1 23:08:58 2001 From: noreply@sourceforge.net (noreply@sourceforge.net) Date: Wed, 01 Aug 2001 15:08:58 -0700 Subject: [Python-bugs-list] [ python-Bugs-446588 ] Python-2.2a1 build dies Message-ID: Bugs item #446588, was opened at 2001-07-31 15:17 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=105470&aid=446588&group_id=5470 Category: Build Group: Python 2.2 Status: Open Resolution: Works For Me Priority: 3 Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: Python-2.2a1 build dies Initial Comment: after doing: ./configure --prefix=$HOME/local/STOW make the build bombs in the install phase with: usr/bin/install -c ./install-sh /home/mahler/local/STOW/Python-2.2a1/lib/python2.2/config/install-sh /usr/bin/install -c -m 644 ./Misc/Makefile.pre.in /home/mahler/local/STOW/Python-2.2a1/lib/python2.2/config/Makefile.pre.in PYTHONPATH= ./python ./setup.py install \ --install-platlib=/home/mahler/local/STOW/Python-2.2a1/lib/python2.2/lib-dynload 'import site' failed; use -v for traceback Traceback (most recent call last): File "./setup.py", line 6, in ? import sys, os, getopt ImportError: No module named os make[1]: *** [sharedinstall] Error 1 make[1]: Leaving directory `/mcallister0/home/mahler/local/SRC/Python-2.2a1' make: *** [STOW/Python-2.2a1] Error 2 rm SRC/Python-2.2a1make: unlink: SRC/Python-2.2a1: Is a directory STOW/Python-2.2a1make: unlink: STOW/Python-2.2a1: Is a directory SRC/Python-2.2a1/Makefile ---------------------------------------------------------------------- >Comment By: Guido van Rossum (gvanrossum) Date: 2001-08-01 15:08 Message: Logged In: YES user_id=6380 Hm. Why does the newly built image not know that ./Lib is the library? This works for me! (Note that PYTHONPATH gets appended to the default sys.path, so setting it empty shouldn't make a difference.) What happens when you execute ./python at the command line? Does "import site" also fail there? Please try to poke around for more evidence. ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2001-08-01 15:00 Message: Logged In: NO Yes, I made a boo boo: --prefix=$HOME/local/STOW/Python-2.2a1 $PYTHONHOME is $HOME/local since I use stow to manage all my dowloaded software in $HOME/local. This has always worked in the past. I have a script which automactes the whole untar, configure,make, install process to stop me making errors like the above. The problem appears to be that last command: PYTHONPATH= ./python ./setup.py install ... sets the $PYTHONPATH to be empty and the newly built image does not know that the libraries are in the Lib directory just below it. doing PYTHONPATH=./Lib ./python ./setup.py install --install-platlib=/home/mahler/local/STOW/Python-2.2a1/lib/python2.2/lib-dynload does not crash but produces a whole bunch of warnings like: building 'zlib' extension skipping /mcallister0/home/mahler/local/SRC/Python-2.2a1/Modules/zlibmodule.c (build/temp.linux-i686-2.2/zlibmodule.o up-to-date) gcc -shared build/temp.linux-i686-2.2/zlibmodule.o -L/usr/local/lib -lz -o build/lib.linux-i686-2.2/zlib.so WARNING: removing "zlib" since importing it failed Daniel ---------------------------------------------------------------------- Comment By: Guido van Rossum (gvanrossum) Date: 2001-08-01 13:55 Message: Logged In: YES user_id=6380 I can't reproduce this; configuring with a prefix works fine. Your story seems inconsistent: you say you configured with prefix $HOME/local/STOW, but the output you cite looks like it was configured with prefix $HOME/local/STOW/Python-2.2a1. What platform? What's $PYTHONHOME? Try adding -v to the python invocation that fails to see the failure traceback. ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=105470&aid=446588&group_id=5470 From noreply@sourceforge.net Wed Aug 1 23:12:18 2001 From: noreply@sourceforge.net (noreply@sourceforge.net) Date: Wed, 01 Aug 2001 15:12:18 -0700 Subject: [Python-bugs-list] [ python-Bugs-445484 ] pickle lacks float('inf') Message-ID: Bugs item #445484, was opened at 2001-07-28 08:21 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=105470&aid=445484&group_id=5470 >Category: Python Library Group: Python 2.1.1 Status: Open Resolution: None Priority: 5 Submitted By: Anthony Doggett (anthonydoggett) >Assigned to: Tim Peters (tim_one) Summary: pickle lacks float('inf') Initial Comment: Support for float('inf') still appears to be missing in Python 2.1.1 (#1, Jul 28 2001, 14:15:01) [GCC egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)] on linux2 >>> cPickle.dumps(float('inf'), 1) Traceback (most recent call last): File "", line 1, in ? SystemError: frexp() result out of range >>> pickle.dumps(float('inf'), 1) Traceback (most recent call last): File "", line 1, in ? File "/var/ajd111/python/lib/python2.1/pickle.py", line 943, in dumps Pickler(file, bin).dump(object) File "/var/ajd111/python/lib/python2.1/pickle.py", line 109, in dump self.save(object) File "/var/ajd111/python/lib/python2.1/pickle.py", line 211, in save f(self, object) File "/var/ajd111/python/lib/python2.1/pickle.py", line 273, in save_float self.write(BINFLOAT + pack('>d', object)) SystemError: frexp() result out of range Both structmodule.c and cPickle.c require changes. Surely something like if (x == HUGE_VAL) { /* Inf */ e = 1024; f = 0.0; } else { f = frexp(x, &e); ... and if (e == 1024) x = HUGE_VAL; /* Inf */ else { is all that is required for all IEEE754 machines? (structmodule.c requires similar changes for Float also) ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=105470&aid=445484&group_id=5470 From noreply@sourceforge.net Wed Aug 1 23:14:06 2001 From: noreply@sourceforge.net (noreply@sourceforge.net) Date: Wed, 01 Aug 2001 15:14:06 -0700 Subject: [Python-bugs-list] [ python-Bugs-445986 ] test_locale fails on IRIX 6.5 Message-ID: Bugs item #445986, was opened at 2001-07-30 08:29 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=105470&aid=445986&group_id=5470 Category: Python Library >Group: Platform-specific Status: Open Resolution: None Priority: 5 Submitted By: Greg Ward (gward) >Assigned to: Greg Ward (gward) Summary: test_locale fails on IRIX 6.5 Initial Comment: Built Python 2.2a1 on a 64-bit SGI box running IRIX 6.5. test_locale fails as follows: $ ./python Lib/test/test_locale.py '%f' % 1024 =? '1,024.000000' ... no '%f' % 1024 == '1024.000000' != '1,024.000000' '%f' % 102 =? '102.000000' ... yes '%f' % -42 =? '-42.000000' ... yes '%+f' % -42 =? '-42.000000' ... yes '%20.f' % -42 =? ' -42' ... yes '%+10.f' % -4200 =? ' -4,200' ... no '%+10.f' % -4200 == ' -4200' != ' -4,200' '%-10.f' % 4200 =? '4,200 ' ... no '%-10.f' % 4200 == '4200 ' != '4,200 ' ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=105470&aid=445986&group_id=5470 From noreply@sourceforge.net Wed Aug 1 23:14:05 2001 From: noreply@sourceforge.net (noreply@sourceforge.net) Date: Wed, 01 Aug 2001 15:14:05 -0700 Subject: [Python-bugs-list] [ python-Bugs-445987 ] test_pty fails on IRIX 6.5 Message-ID: Bugs item #445987, was opened at 2001-07-30 08:32 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=105470&aid=445987&group_id=5470 Category: Python Library >Group: Platform-specific Status: Open Resolution: None Priority: 5 Submitted By: Greg Ward (gward) >Assigned to: Greg Ward (gward) Summary: test_pty fails on IRIX 6.5 Initial Comment: Built 2.2a1 on a 64-bit SGI box running IRIX 6.5. test_pty fails; here's the output from "make test": test_pty The actual stdout doesn't match the expected stdout. This much did match (between asterisk lines): ********************************************************************** test_pty ********************************************************************** Then ... We expected (repr): 'I wish to buy a fish license.\nFor my pet fish, Eric.\n' But instead we got: 'I wish to buy a fish license.\r\nFor my pet fish, Eric.\n' test test_pty failed -- Writing: 'I wish to buy a fish license.\r\nFor my pet fish, Eric.\n', expected: 'I wish to buy a fish license.\nFor my pet fish, Eric.\n' and here's what I get running the test script directly: ./python Lib/test/test_pty.py Calling master_open() Got master_fd '3', slave_name '/dev/ttyq7' Calling slave_open('/dev/ttyq7') Got slave_fd '4' Writing to slave_fd Writing chunked output I wish to buy a fish license. For my pet fish, Eric. calling pty.fork() Waiting for child (193150) to finish. Child (193150) exited with status 4 (1024). $ ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=105470&aid=445987&group_id=5470 From noreply@sourceforge.net Wed Aug 1 23:14:06 2001 From: noreply@sourceforge.net (noreply@sourceforge.net) Date: Wed, 01 Aug 2001 15:14:06 -0700 Subject: [Python-bugs-list] [ python-Bugs-445980 ] _socket fails to build on IRIX 6.5 Message-ID: Bugs item #445980, was opened at 2001-07-30 08:24 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=105470&aid=445980&group_id=5470 Category: Extension Modules >Group: Platform-specific Status: Open Resolution: None Priority: 5 Submitted By: Greg Ward (gward) >Assigned to: Greg Ward (gward) Summary: _socket fails to build on IRIX 6.5 Initial Comment: Building 2.2a1 on a 64-bit SGI box running IRIX 6.5. I used the MIPSPro 7.30 compiler, using the "-n32" flag ("new 32-bit object"). Building the interpreter and most extensions works, but creating _socket.so fails as follows: ld -shared -all build/temp.irix64-6.5-2.2/socketmodule.o -L/usr/local/ssl/lib -L/usr/local/lib -lssl -lcrypto -o build/lib.irix64-6.5-2.2/_socket.so ld32: FATAL 12 : Expecting n32 objects: /usr/local/ssl/lib/libssl.so is o32. WARNING: building of extension "_socket" failed: command 'ld' failed with exit status 4 I think this is a local configuration error, but the build process should probably be more resilient to it. At the very least, there should probably be a --without-ssl configure option so linking against OpenSSL can be disabled on systems with broken OpenSSL installations (like this one). ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=105470&aid=445980&group_id=5470 From noreply@sourceforge.net Wed Aug 1 23:14:05 2001 From: noreply@sourceforge.net (noreply@sourceforge.net) Date: Wed, 01 Aug 2001 15:14:05 -0700 Subject: [Python-bugs-list] [ python-Bugs-445991 ] test_struct dumps core on IRIX 6.5 Message-ID: Bugs item #445991, was opened at 2001-07-30 08:40 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=105470&aid=445991&group_id=5470 Category: Extension Modules >Group: Platform-specific Status: Open Resolution: None Priority: 5 Submitted By: Greg Ward (gward) >Assigned to: Greg Ward (gward) Summary: test_struct dumps core on IRIX 6.5 Initial Comment: Built 2.2a1 on a 64-bit SGI box running IRIX 6.5. test_struct dumps core: $ /python Lib/test/test_struct.py trying: xcbhilfd trying: xcBHILfd trying: @xcbhilfd [...] 'f' 2.0 '@\x00\x00\x00' '\x00\x00\x00@' 'd' 2.0 '@\x00\x00\x00\x00\x00\x00\x00' '\x00\x00\x00\x00\x00\x00\x00@' 'f' -2.0 '\xc0\x00\x00\x00' '\x00\x00\x00\xc0' 'd' -2.0 '\xc0\x00\x00\x00\x00\x00\x00\x00' '\x00\x00\x00\x00\x00\x00\x00\xc0' zsh: 193500 bus error (core dumped) ./python Lib/test/test_struct.py Analyzing the coredump with dbx reveals: $ dbx ./python core dbx version 7.3 MR 55458_Apr30_MR Apr 30 1999 13:44:41 Core from signal SIGBUS: Bus error (dbx) where > 0 np_longlong(0x101aaf8c, 0x1012c354, 0x5fff88fc, 0xc388060, 0x5, 0x5, 0x8, 0x7fff27f7) ["/tmp/Python-2.2a1/Modules/structmodule.c":703, 0x5ffe304c] 1 struct_pack(0x0, 0x1022ce6c, 0x0, 0xc388060, 0x101aaf8c, 0x5, 0x0, 0x1013d015) ["/tmp/Python-2.2a1/Modules/structmodule.c":1362, 0x5ffe50b0] 2 call_cfunction(0x101a75a4, 0x1022ce6c, 0x0, 0xc388060, 0x5, 0x5, 0x8, 0x7fff27f7) ["/tmp/Python-2.2a1/Python/ceval.c":3064, 0x1005d37c] 3 eval_frame(0x101f55fc, 0x101f5748, 0x83, 0x101f5748, 0x10231b98, 0x10230ffa, 0x0, 0x0) ["/tmp/Python-2.2a1/Python/ceval.c":1913, 0x10058dec] 4 PyEval_EvalCodeEx(0x10231b98, 0x10139924, 0x10139924, 0x0, 0x0, 0x0, 0x0, 0x0) ["/tmp/Python-2.2a1/Python/ceval.c":2518, 0x1005b59c] 5 PyEval_EvalCode(0x10231b98, 0x10139924, 0x10139924, 0xc388060, 0x5, 0x5, 0x8, 0x7fff27f7) ["/tmp/Python-2.2a1/Python/ceval.c":491, 0x10053590] 6 run_node(0x1019ac50, 0x7fff3009, 0x10139924, 0x10139924, 0x7fff2df4, 0x5, 0x8, 0x7fff27f7) ["/tmp/Python-2.2a1/Python/pythonrun.c":1057, 0x10062704] 7 run_err_node(0x1019ac50, 0x7fff3009, 0x10139924, 0x10139924, 0x7fff2df4, 0x5, 0x8, 0x7fff27f7) ["/tmp/Python-2.2a1/Python/pythonrun.c":1044, 0x10062660] 8 PyRun_FileExFlags(0xfb4e640, 0x7fff3009, 0x101, 0x10139924, 0x10139924, 0x1, 0x7fff2df4, 0x7fff27f7) ["/tmp/Python-2.2a1/Python/pythonrun.c":1035, 0x100625e4] 9 PyRun_SimpleFileExFlags(0xfb4e640, 0x7fff3009, 0x1, 0x7fff2df4, 0x5, 0x5, 0x0, 0x7fff27f7) ["/tmp/Python-2.2a1/Python/pythonrun.c":672, 0x10060dc4] 10 PyRun_AnyFileExFlags(0xfb4e640, 0x7fff3009, 0x1, 0x7fff2df4, 0x5, 0x5, 0x8, 0x7fff27f7) ["/tmp/Python-2.2a1/Python/pythonrun.c":482, 0x1006037c] 11 Py_Main(0x2, 0x7fff2ea4, 0x0, 0xfb4e640, 0x5, 0x0, 0x0, 0x0) ["/tmp/Python-2.2a1/Modules/main.c":320, 0x1000d378] 12 ::main(0x2, 0x7fff2ea4, 0xfb4e3d8, 0xc388060, 0x5, 0x5, 0x8, 0x7fff27f7) ["/tmp/Python-2.2a1/Modules/ccpython.cc":10, 0x1000c7ec] 13 __start() ["/xlv55/kudzu-apr12/work/irix/lib/libc/libc_n32_M3/csu/crt1text.s":177, 0x1000c788] ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=105470&aid=445991&group_id=5470 From noreply@sourceforge.net Wed Aug 1 23:14:06 2001 From: noreply@sourceforge.net (noreply@sourceforge.net) Date: Wed, 01 Aug 2001 15:14:06 -0700 Subject: [Python-bugs-list] [ python-Bugs-445984 ] test___all__ fails when _socket absent Message-ID: Bugs item #445984, was opened at 2001-07-30 08:28 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=105470&aid=445984&group_id=5470 Category: Python Library >Group: Platform-specific Status: Open Resolution: None Priority: 5 Submitted By: Greg Ward (gward) >Assigned to: Greg Ward (gward) Summary: test___all__ fails when _socket absent Initial Comment: If the _socket extension couldn't be built (see bug #445980), test___all__ fails somewhat mysteriously: $ ./python Lib/test/test___all__.py Traceback (most recent call last): File "Lib/test/test___all__.py", line 42, in ? check_all("CGIHTTPServer") File "Lib/test/test___all__.py", line 10, in check_all exec "import %s" % modname in names File "", line 1, in ? File "/tmp/Python-2.2a1/Lib/CGIHTTPServer.py", line 27, in ? import BaseHTTPServer File "/tmp/Python-2.2a1/Lib/BaseHTTPServer.py", line 72, in ? import SocketServer File "/tmp/Python-2.2a1/Lib/SocketServer.py", line 273, in ? class TCPServer(BaseServer): File "/tmp/Python-2.2a1/Lib/SocketServer.py", line 316, in TCPServer address_family = socket.AF_INET AttributeError: 'module' object has no attribute 'AF_INET' ---------------------------------------------------------------------- Comment By: Guido van Rossum (gvanrossum) Date: 2001-07-30 08:50 Message: Logged In: YES user_id=6380 This can be "fixed" by inserting "import _socket" in front of the check_all("socket") line. ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=105470&aid=445984&group_id=5470 From noreply@sourceforge.net Wed Aug 1 23:14:06 2001 From: noreply@sourceforge.net (noreply@sourceforge.net) Date: Wed, 01 Aug 2001 15:14:06 -0700 Subject: [Python-bugs-list] [ python-Bugs-445960 ] Compiler warnings on IRIX 6.5 Message-ID: Bugs item #445960, was opened at 2001-07-30 07:29 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=105470&aid=445960&group_id=5470 Category: Build >Group: Platform-specific Status: Open Resolution: None Priority: 5 Submitted By: Greg Ward (gward) >Assigned to: Greg Ward (gward) Summary: Compiler warnings on IRIX 6.5 Initial Comment: Building 2.2a1 on IRIX 6.5 with the MIPSPro 7.30 C compiler results in a handful of minor compiler warnings. Some of them are legit, some are compiler stupidity. I've just included the warnings here that look legit to me, ie. it looks like the MIPSPro compiler is catching an error. cc-1552 cc: WARNING File = Python/import.c, Line = 857 The variable "f" is set but never used. struct _frozen *f; ^ cc-1552 cc: WARNING File = Python/import.c, Line = 1379 The variable "mod" is set but never used. PyObject *mod; ^ [GW: both variables are only used in "(f = (...)) != NULL)" constructs, so it looks like the warning is legit and these variables are unneeded] cc-1552 cc: WARNING File = /tmp/Python-2.2a1/Modules/xreadlinesmodule.c, Line = 174 The variable "m" is set but never used. PyObject *m; ^ cc-1552 cc: WARNING File = /tmp/Python-2.2a1/Modules/selectmodule.c, Line = 335 The variable "j" is set but never used. int i, j, pos; ^ ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=105470&aid=445960&group_id=5470 From noreply@sourceforge.net Wed Aug 1 23:15:33 2001 From: noreply@sourceforge.net (noreply@sourceforge.net) Date: Wed, 01 Aug 2001 15:15:33 -0700 Subject: [Python-bugs-list] [ python-Bugs-435455 ] Python 2.0.1c1 fails to build on RH7.1 Message-ID: Bugs item #435455, was opened at 2001-06-22 06:58 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=105470&aid=435455&group_id=5470 Category: Distutils Group: Platform-specific Status: Open Resolution: None Priority: 5 Submitted By: Ole H. Nielsen (ohnielse) >Assigned to: Thomas Wouters (twouters) Summary: Python 2.0.1c1 fails to build on RH7.1 Initial Comment: Building Python 2.0.1c1 on a RedHat 7.1 (2.4.2-2 on i586) fails at this point: cd Modules; make OPT="-g -O2 -Wall -Wstrict-prototypes -fPIC" VERSION="2.0" \ prefix="/usr/local" exec_prefix="/usr/local" \ sharedmods make[1]: Entering directory `/scratch/ohnielse/Python-2.0.1/Modules' gcc -fpic -g -O2 -Wall -Wstrict-prototypes -fPIC -I./../Include -I.. -DHAVE_CONFIG_H -c ./bsddbmodule.c ./bsddbmodule.c: In function `newdbhashobject': ./bsddbmodule.c:55: `HASHINFO' undeclared (first use in this function) ./bsddbmodule.c:55: (Each undeclared identifier is reported only once ./bsddbmodule.c:55: for each function it appears in.) ./bsddbmodule.c:55: parse error before `info' ./bsddbmodule.c:60: `info' undeclared (first use in this function) ./bsddbmodule.c:71: warning: implicit declaration of function `dbopen' ./bsddbmodule.c:71: warning: assignment makes pointer from integer without a cast ./bsddbmodule.c: In function `newdbbtobject': ./bsddbmodule.c:100: `BTREEINFO' undeclared (first use in this function) ./bsddbmodule.c:100: parse error before `info' ./bsddbmodule.c:105: `info' undeclared (first use in this function) ./bsddbmodule.c:118: warning: assignment makes pointer from integer without a cast ./bsddbmodule.c: In function `newdbrnobject': ./bsddbmodule.c:147: `RECNOINFO' undeclared (first use in this function) ./bsddbmodule.c:147: parse error before `info' ./bsddbmodule.c:152: `info' undeclared (first use in this function) ./bsddbmodule.c:164: warning: assignment makes pointer from integer without a cast ./bsddbmodule.c: In function `bsddb_dealloc': ./bsddbmodule.c:202: too few arguments to function ./bsddbmodule.c: In function `bsddb_length': ./bsddbmodule.c:232: structure has no member named `seq' ./bsddbmodule.c:233: `R_FIRST' undeclared (first use in this function) ./bsddbmodule.c:235: structure has no member named `seq' ./bsddbmodule.c:236: `R_NEXT' undeclared (first use in this function) ./bsddbmodule.c:229: warning: `status' might be used uninitialized in this function ./bsddbmodule.c: In function `bsddb_subscript': ./bsddbmodule.c:265: warning: passing arg 2 of pointer to function from incompatible pointer type ./bsddbmodule.c:265: too few arguments to function ./bsddbmodule.c: In function `bsddb_ass_sub': ./bsddbmodule.c:307: warning: passing arg 2 of pointer to function from incompatible pointer type ./bsddbmodule.c:307: too few arguments to function ./bsddbmodule.c:330: warning: passing arg 2 of pointer to function from incompatible pointer type ./bsddbmodule.c:330: too few arguments to function ./bsddbmodule.c: In function `bsddb_close': ./bsddbmodule.c:357: too few arguments to function ./bsddbmodule.c: In function `bsddb_keys': ./bsddbmodule.c:386: structure has no member named `seq' ./bsddbmodule.c:386: `R_FIRST' undeclared (first use in this function) ./bsddbmodule.c:407: structure has no member named `seq' ./bsddbmodule.c:407: `R_NEXT' undeclared (first use in this function) ./bsddbmodule.c:376: warning: `status' might be used uninitialized in this function ./bsddbmodule.c: In function `bsddb_has_key': ./bsddbmodule.c:440: warning: passing arg 2 of pointer to function from incompatible pointer type ./bsddbmodule.c:440: too few arguments to function ./bsddbmodule.c: In function `bsddb_set_location': ./bsddbmodule.c:466: structure has no member named `seq' ./bsddbmodule.c:466: `R_CURSOR' undeclared (first use in this function) ./bsddbmodule.c:453: warning: `status' might be used uninitialized in this function ./bsddbmodule.c: In function `bsddb_seq': ./bsddbmodule.c:503: structure has no member named `seq' ./bsddbmodule.c:489: warning: `status' might be used uninitialized in this function ./bsddbmodule.c: In function `bsddb_next': ./bsddbmodule.c:531: `R_NEXT' undeclared (first use in this function) ./bsddbmodule.c: In function `bsddb_previous': ./bsddbmodule.c:536: `R_PREV' undeclared (first use in this function) ./bsddbmodule.c: In function `bsddb_first': ./bsddbmodule.c:541: `R_FIRST' undeclared (first use in this function) ./bsddbmodule.c: In function `bsddb_last': ./bsddbmodule.c:546: `R_LAST' undeclared (first use in this function) make[1]: *** [bsddbmodule.o] Error 1 ---------------------------------------------------------------------- Comment By: Sjoerd Mullender (sjoerd) Date: 2001-07-10 01:30 Message: Logged In: YES user_id=43607 I have no trouble building the current CVS version on RedHat 7.1. However, when I try the gcc command given in the error message, I get much the same errors. The deciding difference was: setup.py (part of the standard current build process) adds -DHAVE_DB_185_H=1 to the compiler command line. ---------------------------------------------------------------------- Comment By: Ole H. Nielsen (ohnielse) Date: 2001-07-09 07:51 Message: Logged In: YES user_id=27232 twouters wrote: > I suspect the problem here is that you don't have the > appropriate -devel RPM installed. I think you need > 'db3-devel', but 'db2-devel', 'db1-devel' or 'db-devel' > might work too. Sorry, no. These RPMs seem to be installed by default on RedHat 7.1: # rpm -qa | grep devel | grep db db1-devel-1.85-5 db2-devel-2.4.14-5 gdbm-devel-1.8.0-5 db3-devel-3.1.17-7 It would be nice if a Python developer could gain access to a RedHat 7.1 machine to sort this problem out :-) ---------------------------------------------------------------------- Comment By: Thomas Wouters (twouters) Date: 2001-07-09 07:06 Message: Logged In: YES user_id=34209 I suspect the problem here is that you don't have the appropriate -devel RPM installed. I think you need 'db3-devel', but 'db2-devel', 'db1-devel' or 'db-devel' might work too. Can you confirm that you have none of those installed ? I think what happens is that distutils can't find an include header to include, so it assumes the DB implementation is included in libc, instead. (Changing catagory to distutils on that assumption.) ---------------------------------------------------------------------- Comment By: Ole H. Nielsen (ohnielse) Date: 2001-06-26 14:52 Message: Logged In: YES user_id=27232 loewis wrote: > I have asked you to report things, not to change things. > It is not easy to repeat for me, as I don't have Redhat 7.1. Sorry about the confusion. My report is for RedHat 7.1: 1. Untar the distribution 2.0.1c1 2. ./configure 3. make The errors reported occur. I have changed nothing. I don't know what bsddb is, nor why it's getting compiled. Hopefully, someone knowing Python 2.0.1 and having access to a RedHat 7.1 box could look into the problem. At this point Python building seems broken on RH7.1 :-( ---------------------------------------------------------------------- Comment By: Martin v. Lіwis (loewis) Date: 2001-06-26 00:02 Message: Logged In: YES user_id=21627 I have asked you to report things, not to change things. It is not easy to repeat for me, as I don't have Redhat 7.1. ---------------------------------------------------------------------- Comment By: Ole H. Nielsen (ohnielse) Date: 2001-06-25 15:20 Message: Logged In: YES user_id=27232 loewis wrote: > Please report the following things: > - the line in Setup that you activated to enable > compilation of bsddb > - the exact version of the bsddb RPM package that provides > db.h > - whether or not this packages includes a file db_185.h Sorry, I didn't change ANYTHING ! I was trying a vanilla build on RedHat 7.1 ! Should be easy to repeat... Maybe the build scripts make some incorrect choices on RedHat 7.1 ? ---------------------------------------------------------------------- Comment By: Martin v. Lіwis (loewis) Date: 2001-06-23 13:58 Message: Logged In: YES user_id=21627 Please report the following things: - the line in Setup that you activated to enable compilation of bsddb - the exact version of the bsddb RPM package that provides db.h - whether or not this packages includes a file db_185.h ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=105470&aid=435455&group_id=5470 From noreply@sourceforge.net Wed Aug 1 23:17:33 2001 From: noreply@sourceforge.net (noreply@sourceforge.net) Date: Wed, 01 Aug 2001 15:17:33 -0700 Subject: [Python-bugs-list] [ python-Bugs-446971 ] im_func, user-defined method Message-ID: Bugs item #446971, was opened at 2001-08-01 15:17 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=105470&aid=446971&group_id=5470 Category: Documentation Group: Python 2.1.1 Status: Open Resolution: None Priority: 5 Submitted By: Nobody/Anonymous (nobody) Assigned to: Fred L. Drake, Jr. (fdrake) Summary: im_func, user-defined method Initial Comment: >From the language reference: 3.2 The standard type hierarchy User-defined methods: A user-defined method object combines a class, a class instance (or None) and a user-defined function. ... I take issue with 'user-defined function'. In my experiments with Python 2.1.1 on Windows 2000, using the C API, a user-defined method can combine a 'user- defined function' OR a 'builtin function'. I call PyObject_GetAttrString( pPyObject, "im_func" ), and a built-in function type object is returned. Tom. ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=105470&aid=446971&group_id=5470 From noreply@sourceforge.net Wed Aug 1 23:19:49 2001 From: noreply@sourceforge.net (noreply@sourceforge.net) Date: Wed, 01 Aug 2001 15:19:49 -0700 Subject: [Python-bugs-list] [ python-Bugs-446588 ] Python-2.2a1 build dies Message-ID: Bugs item #446588, was opened at 2001-07-31 15:17 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=105470&aid=446588&group_id=5470 Category: Build Group: Python 2.2 Status: Open Resolution: Works For Me Priority: 3 Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: Python-2.2a1 build dies Initial Comment: after doing: ./configure --prefix=$HOME/local/STOW make the build bombs in the install phase with: usr/bin/install -c ./install-sh /home/mahler/local/STOW/Python-2.2a1/lib/python2.2/config/install-sh /usr/bin/install -c -m 644 ./Misc/Makefile.pre.in /home/mahler/local/STOW/Python-2.2a1/lib/python2.2/config/Makefile.pre.in PYTHONPATH= ./python ./setup.py install \ --install-platlib=/home/mahler/local/STOW/Python-2.2a1/lib/python2.2/lib-dynload 'import site' failed; use -v for traceback Traceback (most recent call last): File "./setup.py", line 6, in ? import sys, os, getopt ImportError: No module named os make[1]: *** [sharedinstall] Error 1 make[1]: Leaving directory `/mcallister0/home/mahler/local/SRC/Python-2.2a1' make: *** [STOW/Python-2.2a1] Error 2 rm SRC/Python-2.2a1make: unlink: SRC/Python-2.2a1: Is a directory STOW/Python-2.2a1make: unlink: STOW/Python-2.2a1: Is a directory SRC/Python-2.2a1/Makefile ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2001-08-01 15:19 Message: Logged In: NO python only starts correctly if I give it the Lib path: ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ $ ./python -v 'import site' failed; traceback: ImportError: No module named site Python 2.2a1 (#4, Aug 1 2001, 16:55:28) [GCC egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)] on linux2 Type "copyright", "credits" or "license" for more information. Traceback (most recent call last): File "/home/mahler/.pythonrc.global.py", line 1, in ? import os ImportError: No module named os >>> +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ $ PYTHONPATH=Lib ./python -v # Lib/site.pyc matches Lib/site.py import site # precompiled from Lib/site.pyc # Lib/os.pyc matches Lib/os.py import os # precompiled from Lib/os.pyc import posix # builtin # Lib/posixpath.pyc matches Lib/posixpath.py import posixpath # precompiled from Lib/posixpath.pyc # Lib/stat.pyc matches Lib/stat.py import stat # precompiled from Lib/stat.pyc # Lib/UserDict.pyc matches Lib/UserDict.py import UserDict # precompiled from Lib/UserDict.pyc Python 2.2a1 (#4, Aug 1 2001, 16:55:28) [GCC egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)] on linux2 Type "copyright", "credits" or "license" for more information. # /mcallister0/home/mahler/local/SRC/Python-2.2a1/Lib/string.pyc matches /mcallister0/home/mahler/local/SRC/Python-2.2a1/Lib/string.py import string # precompiled from /mcallister0/home/mahler/local/SRC/Python-2.2a1/Lib/string.pyc >>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Daniel ---------------------------------------------------------------------- Comment By: Guido van Rossum (gvanrossum) Date: 2001-08-01 15:08 Message: Logged In: YES user_id=6380 Hm. Why does the newly built image not know that ./Lib is the library? This works for me! (Note that PYTHONPATH gets appended to the default sys.path, so setting it empty shouldn't make a difference.) What happens when you execute ./python at the command line? Does "import site" also fail there? Please try to poke around for more evidence. ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2001-08-01 15:00 Message: Logged In: NO Yes, I made a boo boo: --prefix=$HOME/local/STOW/Python-2.2a1 $PYTHONHOME is $HOME/local since I use stow to manage all my dowloaded software in $HOME/local. This has always worked in the past. I have a script which automactes the whole untar, configure,make, install process to stop me making errors like the above. The problem appears to be that last command: PYTHONPATH= ./python ./setup.py install ... sets the $PYTHONPATH to be empty and the newly built image does not know that the libraries are in the Lib directory just below it. doing PYTHONPATH=./Lib ./python ./setup.py install --install-platlib=/home/mahler/local/STOW/Python-2.2a1/lib/python2.2/lib-dynload does not crash but produces a whole bunch of warnings like: building 'zlib' extension skipping /mcallister0/home/mahler/local/SRC/Python-2.2a1/Modules/zlibmodule.c (build/temp.linux-i686-2.2/zlibmodule.o up-to-date) gcc -shared build/temp.linux-i686-2.2/zlibmodule.o -L/usr/local/lib -lz -o build/lib.linux-i686-2.2/zlib.so WARNING: removing "zlib" since importing it failed Daniel ---------------------------------------------------------------------- Comment By: Guido van Rossum (gvanrossum) Date: 2001-08-01 13:55 Message: Logged In: YES user_id=6380 I can't reproduce this; configuring with a prefix works fine. Your story seems inconsistent: you say you configured with prefix $HOME/local/STOW, but the output you cite looks like it was configured with prefix $HOME/local/STOW/Python-2.2a1. What platform? What's $PYTHONHOME? Try adding -v to the python invocation that fails to see the failure traceback. ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=105470&aid=446588&group_id=5470 From noreply@sourceforge.net Wed Aug 1 23:34:35 2001 From: noreply@sourceforge.net (noreply@sourceforge.net) Date: Wed, 01 Aug 2001 15:34:35 -0700 Subject: [Python-bugs-list] [ python-Bugs-446588 ] Python-2.2a1 build dies Message-ID: Bugs item #446588, was opened at 2001-07-31 15:17 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=105470&aid=446588&group_id=5470 Category: Build Group: Python 2.2 Status: Open Resolution: Works For Me Priority: 3 Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: Python-2.2a1 build dies Initial Comment: after doing: ./configure --prefix=$HOME/local/STOW make the build bombs in the install phase with: usr/bin/install -c ./install-sh /home/mahler/local/STOW/Python-2.2a1/lib/python2.2/config/install-sh /usr/bin/install -c -m 644 ./Misc/Makefile.pre.in /home/mahler/local/STOW/Python-2.2a1/lib/python2.2/config/Makefile.pre.in PYTHONPATH= ./python ./setup.py install \ --install-platlib=/home/mahler/local/STOW/Python-2.2a1/lib/python2.2/lib-dynload 'import site' failed; use -v for traceback Traceback (most recent call last): File "./setup.py", line 6, in ? import sys, os, getopt ImportError: No module named os make[1]: *** [sharedinstall] Error 1 make[1]: Leaving directory `/mcallister0/home/mahler/local/SRC/Python-2.2a1' make: *** [STOW/Python-2.2a1] Error 2 rm SRC/Python-2.2a1make: unlink: SRC/Python-2.2a1: Is a directory STOW/Python-2.2a1make: unlink: STOW/Python-2.2a1: Is a directory SRC/Python-2.2a1/Makefile ---------------------------------------------------------------------- >Comment By: Guido van Rossum (gvanrossum) Date: 2001-08-01 15:34 Message: Logged In: YES user_id=6380 Need more info. Try this: ./python >>> import sys >>> print sys.path ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2001-08-01 15:19 Message: Logged In: NO python only starts correctly if I give it the Lib path: ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ $ ./python -v 'import site' failed; traceback: ImportError: No module named site Python 2.2a1 (#4, Aug 1 2001, 16:55:28) [GCC egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)] on linux2 Type "copyright", "credits" or "license" for more information. Traceback (most recent call last): File "/home/mahler/.pythonrc.global.py", line 1, in ? import os ImportError: No module named os >>> +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ $ PYTHONPATH=Lib ./python -v # Lib/site.pyc matches Lib/site.py import site # precompiled from Lib/site.pyc # Lib/os.pyc matches Lib/os.py import os # precompiled from Lib/os.pyc import posix # builtin # Lib/posixpath.pyc matches Lib/posixpath.py import posixpath # precompiled from Lib/posixpath.pyc # Lib/stat.pyc matches Lib/stat.py import stat # precompiled from Lib/stat.pyc # Lib/UserDict.pyc matches Lib/UserDict.py import UserDict # precompiled from Lib/UserDict.pyc Python 2.2a1 (#4, Aug 1 2001, 16:55:28) [GCC egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)] on linux2 Type "copyright", "credits" or "license" for more information. # /mcallister0/home/mahler/local/SRC/Python-2.2a1/Lib/string.pyc matches /mcallister0/home/mahler/local/SRC/Python-2.2a1/Lib/string.py import string # precompiled from /mcallister0/home/mahler/local/SRC/Python-2.2a1/Lib/string.pyc >>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Daniel ---------------------------------------------------------------------- Comment By: Guido van Rossum (gvanrossum) Date: 2001-08-01 15:08 Message: Logged In: YES user_id=6380 Hm. Why does the newly built image not know that ./Lib is the library? This works for me! (Note that PYTHONPATH gets appended to the default sys.path, so setting it empty shouldn't make a difference.) What happens when you execute ./python at the command line? Does "import site" also fail there? Please try to poke around for more evidence. ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2001-08-01 15:00 Message: Logged In: NO Yes, I made a boo boo: --prefix=$HOME/local/STOW/Python-2.2a1 $PYTHONHOME is $HOME/local since I use stow to manage all my dowloaded software in $HOME/local. This has always worked in the past. I have a script which automactes the whole untar, configure,make, install process to stop me making errors like the above. The problem appears to be that last command: PYTHONPATH= ./python ./setup.py install ... sets the $PYTHONPATH to be empty and the newly built image does not know that the libraries are in the Lib directory just below it. doing PYTHONPATH=./Lib ./python ./setup.py install --install-platlib=/home/mahler/local/STOW/Python-2.2a1/lib/python2.2/lib-dynload does not crash but produces a whole bunch of warnings like: building 'zlib' extension skipping /mcallister0/home/mahler/local/SRC/Python-2.2a1/Modules/zlibmodule.c (build/temp.linux-i686-2.2/zlibmodule.o up-to-date) gcc -shared build/temp.linux-i686-2.2/zlibmodule.o -L/usr/local/lib -lz -o build/lib.linux-i686-2.2/zlib.so WARNING: removing "zlib" since importing it failed Daniel ---------------------------------------------------------------------- Comment By: Guido van Rossum (gvanrossum) Date: 2001-08-01 13:55 Message: Logged In: YES user_id=6380 I can't reproduce this; configuring with a prefix works fine. Your story seems inconsistent: you say you configured with prefix $HOME/local/STOW, but the output you cite looks like it was configured with prefix $HOME/local/STOW/Python-2.2a1. What platform? What's $PYTHONHOME? Try adding -v to the python invocation that fails to see the failure traceback. ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=105470&aid=446588&group_id=5470 From noreply@sourceforge.net Wed Aug 1 23:39:44 2001 From: noreply@sourceforge.net (noreply@sourceforge.net) Date: Wed, 01 Aug 2001 15:39:44 -0700 Subject: [Python-bugs-list] [ python-Bugs-442791 ] 2.2a1: New style classes and __delitem__ Message-ID: Bugs item #442791, was opened at 2001-07-19 08:44 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=105470&aid=442791&group_id=5470 Category: type/class unification Group: Python 2.2 >Status: Open Resolution: Fixed Priority: 5 Submitted By: Walter Dіrwald (doerwalter) Assigned to: Guido van Rossum (gvanrossum) Summary: 2.2a1: New style classes and __delitem__ Initial Comment: And another one: New style class don't seem to support __delitem__: ---- class Foo(object): def __delitem__(self, key): print "__delitem__" del Foo()[42] ---- This results in: Traceback (most recent call last): File "test.py", line 5, in ? del Foo()[42] TypeError: object doesn't support item deletion ---- Changing the base class to dictionary results in: ---- Traceback (most recent call last): File "test.py", line 5, in ? del Foo()[42] KeyError: 42 ---- but Foo.__delitem__ doesn't seem to be called. ---------------------------------------------------------------------- >Comment By: Guido van Rossum (gvanrossum) Date: 2001-08-01 15:39 Message: Logged In: YES user_id=6380 Reopened. I'll investigate. ---------------------------------------------------------------------- Comment By: Walter Dіrwald (doerwalter) Date: 2001-08-01 11:34 Message: Logged In: YES user_id=89016 I checked out the descr-branch and it seems that dictionary still doesn't support __delitem__: >>> x = {} >>> dictionary.__setitem__(x, 1, 1) >>> x {1: 1} >>> dictionary.__delitem__(x, 1) Traceback (most recent call last): File "", line 1, in ? AttributeError: type object 'dictionary' has no attribute '__delitem__' ---------------------------------------------------------------------- Comment By: Guido van Rossum (gvanrossum) Date: 2001-07-19 09:36 Message: Logged In: YES user_id=6380 Whoops, you found a whole slew of bugs in this area! I've fixed this now in the descr-branch of the CVS tree, in Object/typeobject.c:2.16.8.69. I've also added a bit to the test suite that checks these (and slices). ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=105470&aid=442791&group_id=5470 From noreply@sourceforge.net Wed Aug 1 23:41:09 2001 From: noreply@sourceforge.net (noreply@sourceforge.net) Date: Wed, 01 Aug 2001 15:41:09 -0700 Subject: [Python-bugs-list] [ python-Bugs-445484 ] pickle lacks float('inf') Message-ID: Bugs item #445484, was opened at 2001-07-28 08:21 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=105470&aid=445484&group_id=5470 Category: Python Library Group: Python 2.1.1 Status: Open Resolution: None >Priority: 4 Submitted By: Anthony Doggett (anthonydoggett) Assigned to: Tim Peters (tim_one) Summary: pickle lacks float('inf') Initial Comment: Support for float('inf') still appears to be missing in Python 2.1.1 (#1, Jul 28 2001, 14:15:01) [GCC egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)] on linux2 >>> cPickle.dumps(float('inf'), 1) Traceback (most recent call last): File "", line 1, in ? SystemError: frexp() result out of range >>> pickle.dumps(float('inf'), 1) Traceback (most recent call last): File "", line 1, in ? File "/var/ajd111/python/lib/python2.1/pickle.py", line 943, in dumps Pickler(file, bin).dump(object) File "/var/ajd111/python/lib/python2.1/pickle.py", line 109, in dump self.save(object) File "/var/ajd111/python/lib/python2.1/pickle.py", line 211, in save f(self, object) File "/var/ajd111/python/lib/python2.1/pickle.py", line 273, in save_float self.write(BINFLOAT + pack('>d', object)) SystemError: frexp() result out of range Both structmodule.c and cPickle.c require changes. Surely something like if (x == HUGE_VAL) { /* Inf */ e = 1024; f = 0.0; } else { f = frexp(x, &e); ... and if (e == 1024) x = HUGE_VAL; /* Inf */ else { is all that is required for all IEEE754 machines? (structmodule.c requires similar changes for Float also) ---------------------------------------------------------------------- >Comment By: Tim Peters (tim_one) Date: 2001-08-01 15:41 Message: Logged In: YES user_id=31435 Note that Python has no intentional support for Infs and NaNs anywhere; even that float('inf') doesn't blow up when you do it is a platform accident (it blows up ("invalid literal") on my box). Given that, in the absence of a comprehensive plan for supporting this stuff across the board, and worker bees to implement it, I downgraded the priority. A good plan would refactor the code so that dealing with the platform double and float formats occurs in only one place. ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=105470&aid=445484&group_id=5470 From noreply@sourceforge.net Wed Aug 1 23:57:07 2001 From: noreply@sourceforge.net (noreply@sourceforge.net) Date: Wed, 01 Aug 2001 15:57:07 -0700 Subject: [Python-bugs-list] [ python-Bugs-446588 ] Python-2.2a1 build dies Message-ID: Bugs item #446588, was opened at 2001-07-31 15:17 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=105470&aid=446588&group_id=5470 Category: Build Group: Python 2.2 Status: Open Resolution: Works For Me Priority: 3 Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: Python-2.2a1 build dies Initial Comment: after doing: ./configure --prefix=$HOME/local/STOW make the build bombs in the install phase with: usr/bin/install -c ./install-sh /home/mahler/local/STOW/Python-2.2a1/lib/python2.2/config/install-sh /usr/bin/install -c -m 644 ./Misc/Makefile.pre.in /home/mahler/local/STOW/Python-2.2a1/lib/python2.2/config/Makefile.pre.in PYTHONPATH= ./python ./setup.py install \ --install-platlib=/home/mahler/local/STOW/Python-2.2a1/lib/python2.2/lib-dynload 'import site' failed; use -v for traceback Traceback (most recent call last): File "./setup.py", line 6, in ? import sys, os, getopt ImportError: No module named os make[1]: *** [sharedinstall] Error 1 make[1]: Leaving directory `/mcallister0/home/mahler/local/SRC/Python-2.2a1' make: *** [STOW/Python-2.2a1] Error 2 rm SRC/Python-2.2a1make: unlink: SRC/Python-2.2a1: Is a directory STOW/Python-2.2a1make: unlink: STOW/Python-2.2a1: Is a directory SRC/Python-2.2a1/Makefile ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2001-08-01 15:57 Message: Logged In: NO $ ./python 'import site' failed; use -v for traceback Python 2.2a1 (#4, Aug 1 2001, 16:55:28) [GCC egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)] on linux2 Type "copyright", "credits" or "license" for more information. Traceback (most recent call last): File "/home/mahler/.pythonrc.global.py", line 1, in ? import os ImportError: No module named os >>> import sys >>> sys.path ['', '.', '/home/mahler/local/PYTHON/Meta', '/home/mahler/local/PYTHON/kwP', '/home/mahler/local/lib/python', '/home/mahler/local/lib/python2.1', '/home/mahler/local/APPS/jack-2.2.0', '/home/mahler/local/lib/python2.1', '/home/mahler/local/lib/python2.2/', '/home/mahler/local/lib/python2.2/plat-linux2', '/home/mahler/local/lib/python2.2/lib-tk', '/home/mahler/local/lib/python2.2/lib-dynload'] >>> ---------------------------------------------------------------------- Comment By: Guido van Rossum (gvanrossum) Date: 2001-08-01 15:34 Message: Logged In: YES user_id=6380 Need more info. Try this: ./python >>> import sys >>> print sys.path ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2001-08-01 15:19 Message: Logged In: NO python only starts correctly if I give it the Lib path: ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ $ ./python -v 'import site' failed; traceback: ImportError: No module named site Python 2.2a1 (#4, Aug 1 2001, 16:55:28) [GCC egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)] on linux2 Type "copyright", "credits" or "license" for more information. Traceback (most recent call last): File "/home/mahler/.pythonrc.global.py", line 1, in ? import os ImportError: No module named os >>> +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ $ PYTHONPATH=Lib ./python -v # Lib/site.pyc matches Lib/site.py import site # precompiled from Lib/site.pyc # Lib/os.pyc matches Lib/os.py import os # precompiled from Lib/os.pyc import posix # builtin # Lib/posixpath.pyc matches Lib/posixpath.py import posixpath # precompiled from Lib/posixpath.pyc # Lib/stat.pyc matches Lib/stat.py import stat # precompiled from Lib/stat.pyc # Lib/UserDict.pyc matches Lib/UserDict.py import UserDict # precompiled from Lib/UserDict.pyc Python 2.2a1 (#4, Aug 1 2001, 16:55:28) [GCC egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)] on linux2 Type "copyright", "credits" or "license" for more information. # /mcallister0/home/mahler/local/SRC/Python-2.2a1/Lib/string.pyc matches /mcallister0/home/mahler/local/SRC/Python-2.2a1/Lib/string.py import string # precompiled from /mcallister0/home/mahler/local/SRC/Python-2.2a1/Lib/string.pyc >>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Daniel ---------------------------------------------------------------------- Comment By: Guido van Rossum (gvanrossum) Date: 2001-08-01 15:08 Message: Logged In: YES user_id=6380 Hm. Why does the newly built image not know that ./Lib is the library? This works for me! (Note that PYTHONPATH gets appended to the default sys.path, so setting it empty shouldn't make a difference.) What happens when you execute ./python at the command line? Does "import site" also fail there? Please try to poke around for more evidence. ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2001-08-01 15:00 Message: Logged In: NO Yes, I made a boo boo: --prefix=$HOME/local/STOW/Python-2.2a1 $PYTHONHOME is $HOME/local since I use stow to manage all my dowloaded software in $HOME/local. This has always worked in the past. I have a script which automactes the whole untar, configure,make, install process to stop me making errors like the above. The problem appears to be that last command: PYTHONPATH= ./python ./setup.py install ... sets the $PYTHONPATH to be empty and the newly built image does not know that the libraries are in the Lib directory just below it. doing PYTHONPATH=./Lib ./python ./setup.py install --install-platlib=/home/mahler/local/STOW/Python-2.2a1/lib/python2.2/lib-dynload does not crash but produces a whole bunch of warnings like: building 'zlib' extension skipping /mcallister0/home/mahler/local/SRC/Python-2.2a1/Modules/zlibmodule.c (build/temp.linux-i686-2.2/zlibmodule.o up-to-date) gcc -shared build/temp.linux-i686-2.2/zlibmodule.o -L/usr/local/lib -lz -o build/lib.linux-i686-2.2/zlib.so WARNING: removing "zlib" since importing it failed Daniel ---------------------------------------------------------------------- Comment By: Guido van Rossum (gvanrossum) Date: 2001-08-01 13:55 Message: Logged In: YES user_id=6380 I can't reproduce this; configuring with a prefix works fine. Your story seems inconsistent: you say you configured with prefix $HOME/local/STOW, but the output you cite looks like it was configured with prefix $HOME/local/STOW/Python-2.2a1. What platform? What's $PYTHONHOME? Try adding -v to the python invocation that fails to see the failure traceback. ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=105470&aid=446588&group_id=5470 From noreply@sourceforge.net Thu Aug 2 04:21:05 2001 From: noreply@sourceforge.net (noreply@sourceforge.net) Date: Wed, 01 Aug 2001 20:21:05 -0700 Subject: [Python-bugs-list] [ python-Bugs-416901 ] 2.1 on OpenBSD 2.8: lots of bugs @ build Message-ID: Bugs item #416901, was opened at 2001-04-17 17:42 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=105470&aid=416901&group_id=5470 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Brad Allen (valaulmo) Assigned to: Fred L. Drake, Jr. (fdrake) Summary: 2.1 on OpenBSD 2.8: lots of bugs @ build Initial Comment: I am doing a survey of current distributed information systems, to see if they are close to what they should be (I figured out what they should be in 1984), and am forced to find a Python which Mojo Nation is compatible with. I will probably go back to Python 2.0, but since the latest released version (released today!) was 2.1, I just started there (since the stable one for OpenBSD 2.8 was way back at Python 1.6 and I figured anything past that was experimenting anyway). --- Python 2.1 on OpenBSD 2.8 with Pentium I: I'm getting these warnings while compiling Python 2.1 on OpenBSD 2.8: cc -o python \ Modules/python.o \ libpython2.1.a -lc_r -lutil -L/usr/local/lib -lz -lm ./Modules/posixmodule.c:2995: warning: this program uses setreuid(), which is deprecated. ./Modules/posixmodule.c:3014: warning: this program uses setregid(), which is deprecated. ./Modules/posixmodule.c:4147: warning: tempnam() possibly used unsafely; consider using mkstemp() ./Modules/posixmodule.c:4193: warning: tmpnam() possibly used unsafely; consider using mkstemp() ld: libpython2.1.a(fileobject.o): RRS text relocation at 0x31168 for "_flockfile" ld: libpython2.1.a(fileobject.o): RRS text relocation at 0x311af for "_funlockfile" PYTHONPATH= ./python ./setup.py build running build Please consider fixing those things. --- *** HUNG test_bufio.py When running tests as "MAKE=gmake gmake test", it hung under test_bufio. It required a SIGKILL to stop. I tried two things: * Running test as README says manually with "python ...". python ./Lib/test/test_bufio.py This worked OK and produced no output that I was aware of (unless it was hidden). * Tried defining DONT_USE_FGETS_IN_GETLINE in the file where it was looked at (./Objects/fileobject.c). This did not help; it still hung. Running the test manually again at this point worked also. So, I had to find a way to skip that test (hid it in a subdirectory called HIDE). *** HUNG test_complex.py The same thing happened with test_complex.py: it hung during "...make test", but ran OK manually; then I hid it to skip. For test_dl, I got slightly different results; after the usual hanging, I then manually ran it and got: *** HUNG test_dl.py* Q:/usr/local/src/python/Python-2.1:2148$ python Lib/test/test_dl.py Traceback (most recent call last): File "Lib/test/test_dl.py", line 6, in ? import dl ImportError: No module named dl Q:/usr/local/src/python/Python-2.1:2149$ In each case, lots of CPU by the "python" process was used as its "hung" state. I waited approximately three minutes of CPU. A 133Megahertz Pentium with a CPU cache on a Dell computer is extremely fast, and ought to finish any test within two minutes. Tell me if I just failed to wait long enough for an increadibly inefficiently programmed test to complete, and I'll retry it. The fact that it did not respond to signals except KILL also indicates to me that it was comotose. (This discussion reminds me of a date where the person told me that the commands in Unix are very violent sounding and the names of the principles used by programmers are very anti-social. I'm glad someone thinks that way, since English itself is far, far worse, according to http://www.islandnet.com/~edonon/decoding.htm, and I said to myself "how can anybody use this language?" in disgust. Someday we'll fix that, too (and not just for historical politeness; for pureness of utility and efficiency -- snowballed efficiency!).) --- *** MEMORY FAULT test_fork1.py While the tests were running "test_fork1", I got a Memory Fault. Rerunning it manually worked, though, and I hid it also. (I did not test rerunning it.) While waiting for all these tests to hang, I got tired of it and now I want to request that you have all the tests run in parallel. That way, it is easier to weed out all the hanging ones in one shot. This is easy, right? *** HUNG test_compile.py Next to hang was this one: $ python ./Lib/test/test_compile.py Running tests on argument handling testing complex args 1 2 1 2 3 4 1 2 3 1 2 3 2 3 4 $ As you can see, it ran OK manually, and this time I had some output to look at. While looking at it I realized that I do not know if those are the expected results, and in the house I'm in, I have to listen to too much hollaring to be able to learn Python in a few minutes like I am usually able to do in proper environments. *** HUNG test_doctest.py test_doctest.py passed manually but automatically hung, too. It had too much output to include it all, but the last line said the test passed. *** HUNG & SEGFAULT test_threadedtempfile.py For test_threadedtempfile, I got a bad error: $ python Lib/test/test_threadedtempfile.py Creating Starting Reaping Segmentation fault (core dumped) $ rm *core $ python Lib/test/test_threadedtempfile.py Creating Starting Reaping ^C^C^C^Z ^Z^X^C Killed $ $ jobs [1]- Stopped less README [2]+ Stopped MAKE=gmake gmake test $ sync $ rm Lib/test/test_threadedt So far, a few tests ran better the second time than the first. Is the compiling working better than the interpreting? --- Brad Allen * ---------------------------------------------------------------------- >Comment By: Fred L. Drake, Jr. (fdrake) Date: 2001-08-01 20:21 Message: Logged In: YES user_id=3066 --sigh-- Still having problems getting access on an OpenBSD machine. Appearantly one has been set up at my employers main office, but I can't get to it from the PythonLabs office yet. ;-( No, I'm not ignoring this, but the priority isn't high given that I can't get to a usable installation. (It would be great if SourceForge could provide one on the compile farm, or if their FreeBSD machine actually responded.) ---------------------------------------------------------------------- Comment By: Fred L. Drake, Jr. (fdrake) Date: 2001-07-17 08:22 Message: Logged In: YES user_id=3066 I'm looking into getting access to an OpenBSD machine to test on. The last comment in the bug report makes me wonder a bit, however: did you wait for long to see if the tests terminated? Many of the tests will appear to run faster during the second phase of the test since the test modules will have already been byte-compiled, but the byte-code used to execute the tests will be the same during both phases. ---------------------------------------------------------------------- Comment By: Fred L. Drake, Jr. (fdrake) Date: 2001-07-11 11:29 Message: Logged In: YES user_id=3066 The warnings are irrelevant -- any package that wraps those functions to make them available to applications will cause those warnings on OpenBSD, even if they are never used. The other issues require more attention than I can spare this week, so I'll leave this open. ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=105470&aid=416901&group_id=5470 From noreply@sourceforge.net Thu Aug 2 07:21:03 2001 From: noreply@sourceforge.net (noreply@sourceforge.net) Date: Wed, 01 Aug 2001 23:21:03 -0700 Subject: [Python-bugs-list] [ python-Bugs-446671 ] configure ignores --mandir Message-ID: Bugs item #446671, was opened at 2001-07-31 23:02 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=105470&aid=446671&group_id=5470 Category: Build Group: None >Status: Closed >Resolution: Fixed Priority: 5 Submitted By: Bill Bumgarner (bbum) Assigned to: Nobody/Anonymous (nobody) Summary: configure ignores --mandir Initial Comment: Actually, Makefile.in (in various places) ignores the --mandir configuration option to configure. As such, man pages are always installed under $(PREFIX)/man regardless of what the user specifies. (I have noticed that an awful lot of GNU packages have a similar bug. Yet, a few BSD derived operating systems like man pages to be installed in /usr/local/share/man/) b.bum ---------------------------------------------------------------------- >Comment By: Martin v. Lіwis (loewis) Date: 2001-08-01 23:21 Message: Logged In: YES user_id=21627 Fixed in Makefile.pre.in 1.48. ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2001-08-01 09:21 Message: Logged In: NO The option is in configure within the 2.2 source, is a standard part of autoconf, and is easy to support. A lot of GNU programs are starting to do so. As well, there are a handful of systems that have the man pages split away from the binary/library/includes. I'll try and generate/submit the appropriate patch. [localhost:/tmp/Python-2.2a1] bbum% ./configure --help Usage: configure [options] [host] Options: [defaults in brackets after descriptions] Configuration: --cache-file=FILE cache test results in FILE --help print this message --no-create do not create output files --quiet, --silent do not print `checking...' messages --version print the version of autoconf that created configure Directory and file names: --prefix=PREFIX install architecture-independent files in PREFIX [/usr/local] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [same as prefix] --bindir=DIR user executables in DIR [EPREFIX/ bin] --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] --libexecdir=DIR program executables in DIR [EPREFIX/libexec] --datadir=DIR read-only architecture- independent data in DIR [PREFIX/share] --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] --sharedstatedir=DIR modifiable architecture- independent data in DIR [PREFIX/com] --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] --libdir=DIR object code libraries in DIR [EPREFIX/lib] --includedir=DIR C header files in DIR [PREFIX/ include] --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] --infodir=DIR info documentation in DIR [PREFIX/ info] --mandir=DIR man documentation in DIR [PREFIX/man] --srcdir=DIR find the sources in DIR [configure dir or ..] --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM ---------------------------------------------------------------------- Comment By: Guido van Rossum (gvanrossum) Date: 2001-08-01 06:30 Message: Logged In: YES user_id=6380 I'm not sure who's to blame. I've never even heard of --mandir. Unclear whether it's a bug. If someone feels like fixing this, let them go ahead, but I don't see this as a priority unless you provide a good motivating example as to why you would need this. ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=105470&aid=446671&group_id=5470 From noreply@sourceforge.net Thu Aug 2 11:15:10 2001 From: noreply@sourceforge.net (noreply@sourceforge.net) Date: Thu, 02 Aug 2001 03:15:10 -0700 Subject: [Python-bugs-list] [ python-Bugs-405227 ] sizeof(Py_UNICODE)==2 ???? Message-ID: Bugs item #405227, was opened at 2001-03-01 11:21 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=105470&aid=405227&group_id=5470 Category: Unicode Group: Platform-specific >Status: Closed >Resolution: Fixed Priority: 5 Submitted By: Jon Saenz (jsaenz) Assigned to: M.-A. Lemburg (lemburg) Summary: sizeof(Py_UNICODE)==2 ???? Initial Comment: We are trying to install Python 2.0 in a Cray T3E. After a painful process of removing several modules which produce some errors (mmap, sha, md5), we get core dumps when we run python because under this platform, there does not exist a 16-bit numeric type. Unsigned short is 4 bytes long. We have finally defined unicode objects as unsigned short, despite they are 4 bytes long, and we have changed a sentence in Objects/unicodeobject.c to: if (sizeof(Py_UNICODE)!=sizeof(unsigned short){ It compiles and runs now, but the test on regular expressions crashes and the whole regression test does, too. Support of Unicode for this platform is not correct in version 2.0 of Python. ---------------------------------------------------------------------- >Comment By: M.-A. Lemburg (lemburg) Date: 2001-08-02 03:15 Message: Logged In: YES user_id=38388 This should fixed now; see Fredrik's response. ---------------------------------------------------------------------- Comment By: Tim Peters (tim_one) Date: 2001-06-26 13:05 Message: Logged In: YES user_id=31435 Thank you, /F -- excellent news! ---------------------------------------------------------------------- Comment By: Fredrik Lundh (effbot) Date: 2001-06-26 12:21 Message: Logged In: YES user_id=38376 in the current CVS codebase, there's a new (experimental) define in Include/unicodeobject.h: #undef USE_UCS4_STORAGE if this is defined, Py_UNICODE will be set to the same thing as Py_UCS4 (usually unsigned int or unsigned long). currently, basic unicode functions and SRE works just fine with this setting, but some other modules (including the UTF-16 codec) may not work (yet). ---------------------------------------------------------------------- Comment By: M.-A. Lemburg (lemburg) Date: 2001-06-18 06:17 Message: Logged In: YES user_id=38388 Of course, you could declare Py_UNICODE as "unsigned int" and then store Unicode characters in e.g. 4 bytes each on platforms which don't have a 16-bit integer type. The reason for being picky about the 16 bits is that we chose UTF-16 as internal data storage format and that format defines the byte stream in terms of entities which have 2 bytes for each character. This format provides the best low-level integration with other Unicode storage formats such as wchar_t on Windows. That's why I would like to keep this compatibility if at all possible. I am not sure, but I think that sre also makes the 2-byte assumption internally in some places. A simple test for this would be to define Py_UNICODE as unsigned long and then run the regression suite... ---------------------------------------------------------------------- Comment By: Guido van Rossum (gvanrossum) Date: 2001-06-18 05:38 Message: Logged In: YES user_id=6380 Huh? That depends on how ch is declared, and what kind of data is in the array. If it's an array of Py_UNICODE elements, and ch is declared as "Py_UNICODE *ch;", then ch++ will do the right thing (increment it by one Py_UNICODE unit). Now, the one thing you can NOT assume is that if you read external 16-bit data into a character buffer, that the Unicode characters correspond to Py_UNICODE characters -- perhaps this is what you're after? ---------------------------------------------------------------------- Comment By: M.-A. Lemburg (lemburg) Date: 2001-06-18 01:19 Message: Logged In: YES user_id=38388 Ok, I agree that the math will probably work in most cases due to the fact that UTF-16 will never produce values outside the 16-bit range, but you still have the problem with iterating over Py_UNICODE arrays: the compiler will assume that ch++ means to move the pointer by sizeof(Py_UNICODE) bytes and this breaks in case you use e.g. a 32-bit integer type for Py_UNICODE. ---------------------------------------------------------------------- Comment By: Tim Peters (tim_one) Date: 2001-06-17 14:05 Message: Logged In: YES user_id=31435 The code snippet there will work fine with any integral type >= 2 bytes if you just add the line ch &= 0xffff; between the computation and the "if". It will actually work fine even if you *don't* put in that mask, but deducing that required analysis of the specific operations (you shift 4 bits left 12, 6 bits left 6 so they don't overlap with the first chunk and so the "+" can't cause a carry, and then add another chunk of non- overlapping 6 bits, so again there's no carry, and therefore the infinite-precision result fits in no more than 16 bits, and so there's no need to mask). About pointers, I don't see a problem there either, unless you're casting a Py_UNICODE* to a char* then adding a hardcoded 2. ---------------------------------------------------------------------- Comment By: M.-A. Lemburg (lemburg) Date: 2001-06-17 12:57 Message: Logged In: YES user_id=38388 The codecs are full of things like: ch = ((s[0] & 0x0f) << 12) + ((s[1] & 0x3f) << 6) + (s[2] & 0x3f); if (ch < 0x800 || (ch >= 0xd800 && ch < 0xe000)) { errmsg = "illegal encoding"; goto utf8Error; } where ch is a Py_UNICODE character. The other "problem" is that pointer dereferencing is used a lot in the code (using arrays of Py_UNICODE chars). We could probably shift the calculations to Py_UCS4 integers and then only do the data buffer access with Py_UNICODE which would then be mapped to a a 2-char-array to get the data buffer layout right. Still, I think this is low priority. Patches are welcome of course :-) ---------------------------------------------------------------------- Comment By: Tim Peters (tim_one) Date: 2001-06-17 12:44 Message: Logged In: YES user_id=31435 Point me to one of the calculations that's thought to be a problem, and happy to suggest something (I didn't find one on my own, but I'm not familiar with the details here). BTW, I reopened this because we got another report of T3E woes on c.l.py that day. You certainly need at least 16 bits, but it's hard to see how having more than that could be a genuine problem -- at worst "this kind of thing" usually requires no more than masking with 0xffff at the end. That can be hidden in a macro that's a nop on platforms that don't need it, if micro-efficiency is a concern. Often even that isn't needed. For example, binascii_crc32 absolutely must compute a 32-bit checksum, but works fine on platforms with 8-byte longs. The only "trick" needed to make that work was to compute the complement via crc ^ 0xFFFFFFFFUL instead of via ~crc ---------------------------------------------------------------------- Comment By: M.-A. Lemburg (lemburg) Date: 2001-06-17 11:47 Message: Logged In: YES user_id=38388 It may be a design error, but getting this right for all platforms is hard and by choosing the 16-bit type we managed to handle 95% of all platforms in a fast and reliable way. Any idea how we could "emulate" a 16-bit integer type ? We need the integer type because we do calculcations on the values. ---------------------------------------------------------------------- Comment By: Tim Peters (tim_one) Date: 2001-06-13 22:28 Message: Logged In: YES user_id=31435 I opened this again. It's simply unacceptable to require that the platform have a 2-byte integer type. That doesn't mean it's easy to fix, but it's a design error all the same. ---------------------------------------------------------------------- Comment By: M.-A. Lemburg (lemburg) Date: 2001-03-16 11:27 Message: Logged In: YES user_id=38388 The current Unicode implementation needs Py_UNICODE to be a 16-bit entity and so does SRE. To get this to work on the Cray, you could try to use a 2-char struct which is then cast to a short in all those places which assume a 16-bit number representation. Simply using a 4-byte entity as basis will not work, since the fact that Py_UNICODE fits into 2 bytes is hard-coded into the implementation in a number of places. ---------------------------------------------------------------------- Comment By: Tim Peters (tim_one) Date: 2001-03-01 15:29 Message: Logged In: YES user_id=31435 Notes: + Python was ported to T3E last year, IIRC by Marc Poinot. May want to track him down. + Python's Unicode support doesn't rely on any platform Unicode support. Whether it's "useless" depends on the user, not the platform. + Face it : Crays are the only platforms that don't have a native 16-bit integer type. + Even so, I believe at least SRE is happy to work with 32- bit Unicode (glibc's wchar_t is 4 bytes, IIRC), so that much was likely a shallow problem. ---------------------------------------------------------------------- Comment By: Jon Saenz (jsaenz) Date: 2001-03-01 15:09 Message: Logged In: YES user_id=12122 We have finally given up to install Python in the Cray T3E due to its lack of support of shared objects. This causes difficulties in the loading of different external libraries (Numeric, Lapack, and so on) because of the static linking. In any case, we still think that this "bug" should be repaired. There may be other platforms which: 1) Do not support Unicode, so that the Unicode feature of Python is useless in these cases. 2) The users may be interested in using Python in them (for Numeric applications, for instance) 3) May not have a 16-bit native numerical type. Under these circunstances, the current version of Python can not be used. ---------------------------------------------------------------------- Comment By: Jon Saenz (jsaenz) Date: 2001-03-01 15:08 Message: Logged In: YES user_id=12122 We have finally given up to install Python in the Cray T3E due to its lack of support of shared objects. This causes difficulties in the loading of different external libraries (Numeric, Lapack, and so on) because of the static linking. In any case, we still think that this "bug" should be repaired. There may be other platforms which: 1) Do not support Unicode, so that the Unicode feature of Python is useless in these cases. 2) The users may be interested in using Python in them (for Numeric applications, for instance) 3) May not have a 16-bit native numerical type. Under these circunstances, the current version of Python can not be used. ---------------------------------------------------------------------- Comment By: Jon Saenz (jsaenz) Date: 2001-03-01 15:08 Message: Logged In: YES user_id=12122 We have finally given up to install Python in the Cray T3E due to its lack of support of shared objects. This causes difficulties in the loading of different external libraries (Numeric, Lapack, and so on) because of the static linking. In any case, we still think that this "bug" should be repaired. There may be other platforms which: 1) Do not support Unicode, so that the Unicode feature of Python is useless in these cases. 2) The users may be interested in using Python in them (for Numeric applications, for instance) 3) May not have a 16-bit native numerical type. Under these circunstances, the current version of Python can not be used. ---------------------------------------------------------------------- Comment By: Fred L. Drake, Jr. (fdrake) Date: 2001-03-01 14:05 Message: Logged In: YES user_id=3066 Marc-Andre, can you deal with the general Unicode issues here and then pass this along to Fredrik for SRE updates? (Or better yet, work in parallel?) Thanks! ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=105470&aid=405227&group_id=5470 From noreply@sourceforge.net Thu Aug 2 16:02:45 2001 From: noreply@sourceforge.net (noreply@sourceforge.net) Date: Thu, 02 Aug 2001 08:02:45 -0700 Subject: [Python-bugs-list] [ python-Bugs-446049 ] file type is callable but crashes Message-ID: Bugs item #446049, was opened at 2001-07-30 11:51 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=105470&aid=446049&group_id=5470 Category: type/class unification Group: Python 2.2 Status: Open Resolution: None Priority: 5 Submitted By: Gregory H. Ball (greg_ball) Assigned to: Guido van Rossum (gvanrossum) Summary: file type is callable but crashes Initial Comment: Calling the type of a file object results in a crash. More details to follow. ---------------------------------------------------------------------- >Comment By: Guido van Rossum (gvanrossum) Date: 2001-08-02 08:02 Message: Logged In: YES user_id=6380 The direct cause is that the tp_new slot inherited from 'object' creates a file object that is initialized to all zeros, and the file object's tp_repr slot doesn't anticipate that. I can fix the file object in a number of ways (make it work for uninitialized objects, or add a tp_new slot that initializes it properly). But I expect that file is not the only type that is vulnerable to this kind of attack, especially 3rd party types that adopt PyObject_GenericGetAttr() but don't define their own tp_new are vulnerable. The alternative would be to remove the default tp_new implementation from 'object', and add one to dynamically created types. That would mean you couldn't call object() to get a featureless object, which is currently supported and even tested in test_descr.py. Any preferences? ---------------------------------------------------------------------- Comment By: Gregory H. Ball (greg_ball) Date: 2001-07-30 11:57 Message: Logged In: YES user_id=11365 Python 2.2a1 (#2, Jul 26 2001, 11:50:01) [GCC 2.95.3 19991030 (prerelease)] on linux2 Type "copyright", "credits" or "license" for more information. >>> f = open('README') >>> type(f)() Segmentation fault (core dumped) Seems to me that it would be nice if FileType worked like the 'open' builtin. You could have a 'file' builtin and alias it to open. Wild speculation: I guess open could be eventually deprecated. At which point you could safely do from os import * ;-) ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=105470&aid=446049&group_id=5470 From noreply@sourceforge.net Thu Aug 2 18:19:22 2001 From: noreply@sourceforge.net (noreply@sourceforge.net) Date: Thu, 02 Aug 2001 10:19:22 -0700 Subject: [Python-bugs-list] [ python-Bugs-446588 ] Python-2.2a1 build dies Message-ID: Bugs item #446588, was opened at 2001-07-31 15:17 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=105470&aid=446588&group_id=5470 Category: Build Group: Python 2.2 Status: Open Resolution: Works For Me Priority: 3 Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: Python-2.2a1 build dies Initial Comment: after doing: ./configure --prefix=$HOME/local/STOW make the build bombs in the install phase with: usr/bin/install -c ./install-sh /home/mahler/local/STOW/Python-2.2a1/lib/python2.2/config/install-sh /usr/bin/install -c -m 644 ./Misc/Makefile.pre.in /home/mahler/local/STOW/Python-2.2a1/lib/python2.2/config/Makefile.pre.in PYTHONPATH= ./python ./setup.py install \ --install-platlib=/home/mahler/local/STOW/Python-2.2a1/lib/python2.2/lib-dynload 'import site' failed; use -v for traceback Traceback (most recent call last): File "./setup.py", line 6, in ? import sys, os, getopt ImportError: No module named os make[1]: *** [sharedinstall] Error 1 make[1]: Leaving directory `/mcallister0/home/mahler/local/SRC/Python-2.2a1' make: *** [STOW/Python-2.2a1] Error 2 rm SRC/Python-2.2a1make: unlink: SRC/Python-2.2a1: Is a directory STOW/Python-2.2a1make: unlink: STOW/Python-2.2a1: Is a directory SRC/Python-2.2a1/Makefile ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2001-08-02 10:19 Message: Logged In: NO Guido, Yes, the sys.path does make sense. I use stow to manage my downloaded software. So package X ends up being installed at $HOME/local/STOW/X. Stow then creates symlinks to make it look like it is installed at $HOME/local. This makes it easy to tell which file belongs to which package without having PATH, INCLUDE etc be as long as your arm. I have a make file $HOME/local which when invoked with "make X", untars $HOME/local/TAR/X.tgz into $HOME/local/SRC does $ cd $HOME/local/SRC/X where it then does $ ./configure --prefix=$HOME/local/STOW/X $ make $ make install finally it then does $ cd $HOME/local/STOW $ stow X Therefore, PYTHONPATH is $HOME/local so I do not have to change it between installs. This has worked with versions 1.5.2, 1.6, 2.0, and 2.1, and with all GNU software, and most other autoconfiguring software. Here is the python section of my .bashrc # Python export PYAPPS=$LOCAL/PYTHON alias pyapps='/bin/ls -d $PYAPPS/*' alias pyappspath='jn : `pyapps`' export PYTHONHOME=$LOCAL export PYTHONSTARTUP=~/.pythonrc.global.py export PYTHONSTARTUPPATH=~/.pythonrc.py:./.pythonrc.py export PYTHONPATH=.:`pyappspath`:$LIB/python:$PYTHONPATH export PATH=$PYTHONPATH:$PATH Here is the makefile I use to build GNU style software. +++++++++++++++++++++++++++++++++++++++++++ .SUFFIXES: .jar .tar .tar.bz2 .tar.gz .tgz .Z .zip .build .kill .clean .check .test #ANT_JARS=find $(JAVA_DIR)/SRC/dist -name "*.jar" #ANT_PATH=jn : \ %: STOW/% rm -f $>> import sys >>> sys.path ['', '.', '/home/mahler/local/PYTHON/Meta', '/home/mahler/local/PYTHON/kwP', '/home/mahler/local/lib/python', '/home/mahler/local/lib/python2.1', '/home/mahler/local/APPS/jack-2.2.0', '/home/mahler/local/lib/python2.1', '/home/mahler/local/lib/python2.2/', '/home/mahler/local/lib/python2.2/plat-linux2', '/home/mahler/local/lib/python2.2/lib-tk', '/home/mahler/local/lib/python2.2/lib-dynload'] >>> ---------------------------------------------------------------------- Comment By: Guido van Rossum (gvanrossum) Date: 2001-08-01 15:34 Message: Logged In: YES user_id=6380 Need more info. Try this: ./python >>> import sys >>> print sys.path ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2001-08-01 15:19 Message: Logged In: NO python only starts correctly if I give it the Lib path: ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ $ ./python -v 'import site' failed; traceback: ImportError: No module named site Python 2.2a1 (#4, Aug 1 2001, 16:55:28) [GCC egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)] on linux2 Type "copyright", "credits" or "license" for more information. Traceback (most recent call last): File "/home/mahler/.pythonrc.global.py", line 1, in ? import os ImportError: No module named os >>> +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ $ PYTHONPATH=Lib ./python -v # Lib/site.pyc matches Lib/site.py import site # precompiled from Lib/site.pyc # Lib/os.pyc matches Lib/os.py import os # precompiled from Lib/os.pyc import posix # builtin # Lib/posixpath.pyc matches Lib/posixpath.py import posixpath # precompiled from Lib/posixpath.pyc # Lib/stat.pyc matches Lib/stat.py import stat # precompiled from Lib/stat.pyc # Lib/UserDict.pyc matches Lib/UserDict.py import UserDict # precompiled from Lib/UserDict.pyc Python 2.2a1 (#4, Aug 1 2001, 16:55:28) [GCC egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)] on linux2 Type "copyright", "credits" or "license" for more information. # /mcallister0/home/mahler/local/SRC/Python-2.2a1/Lib/string.pyc matches /mcallister0/home/mahler/local/SRC/Python-2.2a1/Lib/string.py import string # precompiled from /mcallister0/home/mahler/local/SRC/Python-2.2a1/Lib/string.pyc >>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Daniel ---------------------------------------------------------------------- Comment By: Guido van Rossum (gvanrossum) Date: 2001-08-01 15:08 Message: Logged In: YES user_id=6380 Hm. Why does the newly built image not know that ./Lib is the library? This works for me! (Note that PYTHONPATH gets appended to the default sys.path, so setting it empty shouldn't make a difference.) What happens when you execute ./python at the command line? Does "import site" also fail there? Please try to poke around for more evidence. ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2001-08-01 15:00 Message: Logged In: NO Yes, I made a boo boo: --prefix=$HOME/local/STOW/Python-2.2a1 $PYTHONHOME is $HOME/local since I use stow to manage all my dowloaded software in $HOME/local. This has always worked in the past. I have a script which automactes the whole untar, configure,make, install process to stop me making errors like the above. The problem appears to be that last command: PYTHONPATH= ./python ./setup.py install ... sets the $PYTHONPATH to be empty and the newly built image does not know that the libraries are in the Lib directory just below it. doing PYTHONPATH=./Lib ./python ./setup.py install --install-platlib=/home/mahler/local/STOW/Python-2.2a1/lib/python2.2/lib-dynload does not crash but produces a whole bunch of warnings like: building 'zlib' extension skipping /mcallister0/home/mahler/local/SRC/Python-2.2a1/Modules/zlibmodule.c (build/temp.linux-i686-2.2/zlibmodule.o up-to-date) gcc -shared build/temp.linux-i686-2.2/zlibmodule.o -L/usr/local/lib -lz -o build/lib.linux-i686-2.2/zlib.so WARNING: removing "zlib" since importing it failed Daniel ---------------------------------------------------------------------- Comment By: Guido van Rossum (gvanrossum) Date: 2001-08-01 13:55 Message: Logged In: YES user_id=6380 I can't reproduce this; configuring with a prefix works fine. Your story seems inconsistent: you say you configured with prefix $HOME/local/STOW, but the output you cite looks like it was configured with prefix $HOME/local/STOW/Python-2.2a1. What platform? What's $PYTHONHOME? Try adding -v to the python invocation that fails to see the failure traceback. ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=105470&aid=446588&group_id=5470 From noreply@sourceforge.net Thu Aug 2 12:39:42 2001 From: noreply@sourceforge.net (noreply@sourceforge.net) Date: Thu, 02 Aug 2001 04:39:42 -0700 Subject: [Python-bugs-list] [ python-Bugs-405227 ] sizeof(Py_UNICODE)==2 ???? Message-ID: Bugs item #405227, was opened at 2001-03-01 11:21 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=105470&aid=405227&group_id=5470 Category: Unicode Group: Platform-specific Status: Closed Resolution: Fixed Priority: 5 Submitted By: Jon Saenz (jsaenz) Assigned to: M.-A. Lemburg (lemburg) Summary: sizeof(Py_UNICODE)==2 ???? Initial Comment: We are trying to install Python 2.0 in a Cray T3E. After a painful process of removing several modules which produce some errors (mmap, sha, md5), we get core dumps when we run python because under this platform, there does not exist a 16-bit numeric type. Unsigned short is 4 bytes long. We have finally defined unicode objects as unsigned short, despite they are 4 bytes long, and we have changed a sentence in Objects/unicodeobject.c to: if (sizeof(Py_UNICODE)!=sizeof(unsigned short){ It compiles and runs now, but the test on regular expressions crashes and the whole regression test does, too. Support of Unicode for this platform is not correct in version 2.0 of Python. ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2001-08-02 04:39 Message: Logged In: NO has tim's UTF-16 codec patch been checked in yet? ---------------------------------------------------------------------- Comment By: M.-A. Lemburg (lemburg) Date: 2001-08-02 03:15 Message: Logged In: YES user_id=38388 This should fixed now; see Fredrik's response. ---------------------------------------------------------------------- Comment By: Tim Peters (tim_one) Date: 2001-06-26 13:05 Message: Logged In: YES user_id=31435 Thank you, /F -- excellent news! ---------------------------------------------------------------------- Comment By: Fredrik Lundh (effbot) Date: 2001-06-26 12:21 Message: Logged In: YES user_id=38376 in the current CVS codebase, there's a new (experimental) define in Include/unicodeobject.h: #undef USE_UCS4_STORAGE if this is defined, Py_UNICODE will be set to the same thing as Py_UCS4 (usually unsigned int or unsigned long). currently, basic unicode functions and SRE works just fine with this setting, but some other modules (including the UTF-16 codec) may not work (yet). ---------------------------------------------------------------------- Comment By: M.-A. Lemburg (lemburg) Date: 2001-06-18 06:17 Message: Logged In: YES user_id=38388 Of course, you could declare Py_UNICODE as "unsigned int" and then store Unicode characters in e.g. 4 bytes each on platforms which don't have a 16-bit integer type. The reason for being picky about the 16 bits is that we chose UTF-16 as internal data storage format and that format defines the byte stream in terms of entities which have 2 bytes for each character. This format provides the best low-level integration with other Unicode storage formats such as wchar_t on Windows. That's why I would like to keep this compatibility if at all possible. I am not sure, but I think that sre also makes the 2-byte assumption internally in some places. A simple test for this would be to define Py_UNICODE as unsigned long and then run the regression suite... ---------------------------------------------------------------------- Comment By: Guido van Rossum (gvanrossum) Date: 2001-06-18 05:38 Message: Logged In: YES user_id=6380 Huh? That depends on how ch is declared, and what kind of data is in the array. If it's an array of Py_UNICODE elements, and ch is declared as "Py_UNICODE *ch;", then ch++ will do the right thing (increment it by one Py_UNICODE unit). Now, the one thing you can NOT assume is that if you read external 16-bit data into a character buffer, that the Unicode characters correspond to Py_UNICODE characters -- perhaps this is what you're after? ---------------------------------------------------------------------- Comment By: M.-A. Lemburg (lemburg) Date: 2001-06-18 01:19 Message: Logged In: YES user_id=38388 Ok, I agree that the math will probably work in most cases due to the fact that UTF-16 will never produce values outside the 16-bit range, but you still have the problem with iterating over Py_UNICODE arrays: the compiler will assume that ch++ means to move the pointer by sizeof(Py_UNICODE) bytes and this breaks in case you use e.g. a 32-bit integer type for Py_UNICODE. ---------------------------------------------------------------------- Comment By: Tim Peters (tim_one) Date: 2001-06-17 14:05 Message: Logged In: YES user_id=31435 The code snippet there will work fine with any integral type >= 2 bytes if you just add the line ch &= 0xffff; between the computation and the "if". It will actually work fine even if you *don't* put in that mask, but deducing that required analysis of the specific operations (you shift 4 bits left 12, 6 bits left 6 so they don't overlap with the first chunk and so the "+" can't cause a carry, and then add another chunk of non- overlapping 6 bits, so again there's no carry, and therefore the infinite-precision result fits in no more than 16 bits, and so there's no need to mask). About pointers, I don't see a problem there either, unless you're casting a Py_UNICODE* to a char* then adding a hardcoded 2. ---------------------------------------------------------------------- Comment By: M.-A. Lemburg (lemburg) Date: 2001-06-17 12:57 Message: Logged In: YES user_id=38388 The codecs are full of things like: ch = ((s[0] & 0x0f) << 12) + ((s[1] & 0x3f) << 6) + (s[2] & 0x3f); if (ch < 0x800 || (ch >= 0xd800 && ch < 0xe000)) { errmsg = "illegal encoding"; goto utf8Error; } where ch is a Py_UNICODE character. The other "problem" is that pointer dereferencing is used a lot in the code (using arrays of Py_UNICODE chars). We could probably shift the calculations to Py_UCS4 integers and then only do the data buffer access with Py_UNICODE which would then be mapped to a a 2-char-array to get the data buffer layout right. Still, I think this is low priority. Patches are welcome of course :-) ---------------------------------------------------------------------- Comment By: Tim Peters (tim_one) Date: 2001-06-17 12:44 Message: Logged In: YES user_id=31435 Point me to one of the calculations that's thought to be a problem, and happy to suggest something (I didn't find one on my own, but I'm not familiar with the details here). BTW, I reopened this because we got another report of T3E woes on c.l.py that day. You certainly need at least 16 bits, but it's hard to see how having more than that could be a genuine problem -- at worst "this kind of thing" usually requires no more than masking with 0xffff at the end. That can be hidden in a macro that's a nop on platforms that don't need it, if micro-efficiency is a concern. Often even that isn't needed. For example, binascii_crc32 absolutely must compute a 32-bit checksum, but works fine on platforms with 8-byte longs. The only "trick" needed to make that work was to compute the complement via crc ^ 0xFFFFFFFFUL instead of via ~crc ---------------------------------------------------------------------- Comment By: M.-A. Lemburg (lemburg) Date: 2001-06-17 11:47 Message: Logged In: YES user_id=38388 It may be a design error, but getting this right for all platforms is hard and by choosing the 16-bit type we managed to handle 95% of all platforms in a fast and reliable way. Any idea how we could "emulate" a 16-bit integer type ? We need the integer type because we do calculcations on the values. ---------------------------------------------------------------------- Comment By: Tim Peters (tim_one) Date: 2001-06-13 22:28 Message: Logged In: YES user_id=31435 I opened this again. It's simply unacceptable to require that the platform have a 2-byte integer type. That doesn't mean it's easy to fix, but it's a design error all the same. ---------------------------------------------------------------------- Comment By: M.-A. Lemburg (lemburg) Date: 2001-03-16 11:27 Message: Logged In: YES user_id=38388 The current Unicode implementation needs Py_UNICODE to be a 16-bit entity and so does SRE. To get this to work on the Cray, you could try to use a 2-char struct which is then cast to a short in all those places which assume a 16-bit number representation. Simply using a 4-byte entity as basis will not work, since the fact that Py_UNICODE fits into 2 bytes is hard-coded into the implementation in a number of places. ---------------------------------------------------------------------- Comment By: Tim Peters (tim_one) Date: 2001-03-01 15:29 Message: Logged In: YES user_id=31435 Notes: + Python was ported to T3E last year, IIRC by Marc Poinot. May want to track him down. + Python's Unicode support doesn't rely on any platform Unicode support. Whether it's "useless" depends on the user, not the platform. + Face it : Crays are the only platforms that don't have a native 16-bit integer type. + Even so, I believe at least SRE is happy to work with 32- bit Unicode (glibc's wchar_t is 4 bytes, IIRC), so that much was likely a shallow problem. ---------------------------------------------------------------------- Comment By: Jon Saenz (jsaenz) Date: 2001-03-01 15:09 Message: Logged In: YES user_id=12122 We have finally given up to install Python in the Cray T3E due to its lack of support of shared objects. This causes difficulties in the loading of different external libraries (Numeric, Lapack, and so on) because of the static linking. In any case, we still think that this "bug" should be repaired. There may be other platforms which: 1) Do not support Unicode, so that the Unicode feature of Python is useless in these cases. 2) The users may be interested in using Python in them (for Numeric applications, for instance) 3) May not have a 16-bit native numerical type. Under these circunstances, the current version of Python can not be used. ---------------------------------------------------------------------- Comment By: Jon Saenz (jsaenz) Date: 2001-03-01 15:08 Message: Logged In: YES user_id=12122 We have finally given up to install Python in the Cray T3E due to its lack of support of shared objects. This causes difficulties in the loading of different external libraries (Numeric, Lapack, and so on) because of the static linking. In any case, we still think that this "bug" should be repaired. There may be other platforms which: 1) Do not support Unicode, so that the Unicode feature of Python is useless in these cases. 2) The users may be interested in using Python in them (for Numeric applications, for instance) 3) May not have a 16-bit native numerical type. Under these circunstances, the current version of Python can not be used. ---------------------------------------------------------------------- Comment By: Jon Saenz (jsaenz) Date: 2001-03-01 15:08 Message: Logged In: YES user_id=12122 We have finally given up to install Python in the Cray T3E due to its lack of support of shared objects. This causes difficulties in the loading of different external libraries (Numeric, Lapack, and so on) because of the static linking. In any case, we still think that this "bug" should be repaired. There may be other platforms which: 1) Do not support Unicode, so that the Unicode feature of Python is useless in these cases. 2) The users may be interested in using Python in them (for Numeric applications, for instance) 3) May not have a 16-bit native numerical type. Under these circunstances, the current version of Python can not be used. ---------------------------------------------------------------------- Comment By: Fred L. Drake, Jr. (fdrake) Date: 2001-03-01 14:05 Message: Logged In: YES user_id=3066 Marc-Andre, can you deal with the general Unicode issues here and then pass this along to Fredrik for SRE updates? (Or better yet, work in parallel?) Thanks! ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=105470&aid=405227&group_id=5470 From noreply@sourceforge.net Thu Aug 2 11:08:59 2001 From: noreply@sourceforge.net (noreply@sourceforge.net) Date: Thu, 02 Aug 2001 03:08:59 -0700 Subject: [Python-bugs-list] [ python-Bugs-445862 ] bsddb fails for larger amount of data Message-ID: Bugs item #445862, was opened at 2001-07-30 00:21 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=105470&aid=445862&group_id=5470 Category: Extension Modules Group: None Status: Open Resolution: None Priority: 5 Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: bsddb fails for larger amount of data Initial Comment: The attached script fails after approx. 72500 insert operations. If you vary the size of the keys and/or the values, the bug occurs earlier or later, but even with a value size of 1 the bug will occur. Probably, this explains also bug #408271 ("crash in shelve module"). Platform: W2K ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2001-08-02 03:08 Message: Logged In: NO I was getting crashes in shelve module, Using NT4 (Python 2.1 (#15, Apr 16 2001, 18:25:49) [MSC 32 bit (Intel)] on win32). I've changed my program to re-read previously written keys fairly frequently, and I get keyerrors for keys that have definitely been written, and that gave no error a little earlier in the same program. The program doesn't contain any delete statements. The same program works when using dumbdbm instead of bsddb (but produces huge indexes), so there definitely appears to be a problem with bsddbm on windows NT. ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=105470&aid=445862&group_id=5470 From noreply@sourceforge.net Thu Aug 2 11:17:44 2001 From: noreply@sourceforge.net (noreply@sourceforge.net) Date: Thu, 02 Aug 2001 03:17:44 -0700 Subject: [Python-bugs-list] [ python-Bugs-420416 ] Python for BeOS/PPC Unicode Build Prob. Message-ID: Bugs item #420416, was opened at 2001-05-01 03:08 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=105470&aid=420416&group_id=5470 Category: Build Group: Platform-specific Status: Open Resolution: None Priority: 5 Submitted By: Matthew Schinckel (schinckel) >Assigned to: Nobody/Anonymous (nobody) Summary: Python for BeOS/PPC Unicode Build Prob. Initial Comment: When trying to build python(2.1 final) normally under BeOS/PPC 5, Py_UCS4 does not seem to be defined in Includes/unicodeobject.h (This would seem to indicate that uint and ulong are shorter than 4 bits!!!) I'm guessing this is resultant of a problem elsewhere, but I'm too clueless in terms of C(++) to work it out. ---------------------------------------------------------------------- >Comment By: M.-A. Lemburg (lemburg) Date: 2001-08-02 03:17 Message: Logged In: YES user_id=38388 Assigning the bug report back to None -- someone with more knowledge about autoconf should take a look at this one. (It is not Unicode related.) ---------------------------------------------------------------------- Comment By: Matthew Schinckel (schinckel) Date: 2001-05-28 03:59 Message: Logged In: YES user_id=193059 Here is the crux of my recent communications with Marc-Andre: > Okay, I might be guessing a bit here but: > > These programs are supposed to print the sizeof value. > > They are not printing anything. > > The only error being raised is: > > ### mwcc Compiler Warning : > # } > # ^ > # return value expected > #---------------------------------------------------------- > File "configure"; Line 2245 > # while compiling "/boot/var/tmp/conftest.c" > #---------------------------------------------------------- > Interesting: the compiler chokes on the missing return statement in the test program rather than some other error. This is clearly an autoconf bug and I'm not sure whether it can be fixed in Python. ---------------------------------------------------------------------- Comment By: M.-A. Lemburg (lemburg) Date: 2001-05-23 02:20 Message: Logged In: YES user_id=38388 I've uploaded Matthew's config files to SF. Perhaps some Metroworks wizard could also take a look at these ?! ---------------------------------------------------------------------- Comment By: Matthew Schinckel (schinckel) Date: 2001-05-22 03:12 Message: Logged In: YES user_id=193059 Sorry, I've been on holiday:-) Donn Cave gave me a patch that allows BeOS to build it, so I'll send it along with the config.* files... (I've zipped them up, but I fear they will not upload with my browser.) ---------------------------------------------------------------------- Comment By: M.-A. Lemburg (lemburg) Date: 2001-05-21 02:46 Message: Logged In: YES user_id=38388 Matthew, if you can not help us here, we won't be able to resolve the problem. Please send us the config.* files, so that we can check where the problem originates. ---------------------------------------------------------------------- Comment By: M.-A. Lemburg (lemburg) Date: 2001-05-07 04:14 Message: Logged In: YES user_id=38388 Hmm, this seems to indicate that the autoconf generated configure script doesn't work right on BeOS. Could you attach the config.* files to this bug report ? Perhaps we can find the cause of configure failing on BeOS. Thanks. ---------------------------------------------------------------------- Comment By: Matthew Schinckel (schinckel) Date: 2001-05-07 01:20 Message: Logged In: YES user_id=193059 okay, the config.h file is autogenerated - and all of the SIZEOF_xxx constants are set to 0. That's bad, huh? ---------------------------------------------------------------------- Comment By: M.-A. Lemburg (lemburg) Date: 2001-05-02 05:50 Message: Logged In: YES user_id=38388 Looking at unicodeobject.h: /* * Use this typedef when you need to represent a UTF-16 surrogate pair * as single unsigned integer. */ #if SIZEOF_INT >= 4 typedef unsigned int Py_UCS4; #elif SIZEOF_LONG >= 4 typedef unsigned long Py_UCS4; #endif it seems that SIZEOF_LONG and/or SIZEOF_INT are not defined in your config.h file. Does the BeOS-port have its own special config.h file or is the file generated using autoconf ? ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=105470&aid=420416&group_id=5470 From noreply@sourceforge.net Thu Aug 2 11:21:11 2001 From: noreply@sourceforge.net (noreply@sourceforge.net) Date: Thu, 02 Aug 2001 03:21:11 -0700 Subject: [Python-bugs-list] [ python-Bugs-430269 ] python -U breaks import with 2.1 Message-ID: Bugs item #430269, was opened at 2001-06-05 03:56 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=105470&aid=430269&group_id=5470 Category: Unicode Group: Feature Request >Status: Closed Resolution: None Priority: 5 Submitted By: Walter Dіrwald (doerwalter) Assigned to: M.-A. Lemburg (lemburg) Summary: python -U breaks import with 2.1 Initial Comment: python -U under Windows is broken with Python 2.1: D:\>python Python 2.1 (#15, Apr 16 2001, 18:25:49) [MSC 32 bit (Intel)] on win32 Type "copyright", "credits" or "license" for more information. >>> import urllib >>> ^C D:\>python -U Python 2.1 (#15, Apr 16 2001, 18:25:49) [MSC 32 bit (Intel)] on win32 Type "copyright", "credits" or "license" for more information. >>> import urllib Traceback (most recent call last): File "", line 1, in ? ImportError: No module named urllib ---------------------------------------------------------------------- >Comment By: M.-A. Lemburg (lemburg) Date: 2001-08-02 03:21 Message: Logged In: YES user_id=38388 Closing this bug report -- please refile as feature request. Python is still a long way from making the standard lib play nice with Unicode. ---------------------------------------------------------------------- Comment By: Walter Dіrwald (doerwalter) Date: 2001-06-09 11:11 Message: Logged In: YES user_id=89016 To make -U more useful as a testbed for Unicode migration, it might be useful to change str(), repr() and chr(), so that they return Unicode objects when running with python - U. ---------------------------------------------------------------------- Comment By: Tim Peters (tim_one) Date: 2001-06-06 15:51 Message: Logged In: YES user_id=31435 Changed Group from Platform-Specific (since it's got nothing to do with Windows specifically) to Feature Request (since nobody believes it *should* work now). ---------------------------------------------------------------------- Comment By: Tim Peters (tim_one) Date: 2001-06-06 12:28 Message: Logged In: YES user_id=31435 Martin, see email to Python-Dev: best I can tell, nobody expects -U to work yet. ---------------------------------------------------------------------- Comment By: Martin v. Lіwis (loewis) Date: 2001-06-06 00:21 Message: Logged In: YES user_id=21627 The (first) problem appears to be in string.py, which has _idmap = '' for i in range(256): _idmap = _idmap + chr(i) With -U, _idmap is a unicode string, and adding chr(128) to it will give an ASCII decoding error. Therefore, importing string fails. In turn, many other things fail as well. That can be solved by writing _idmap=str('') but then it will still complain that distutils.util cannot be imported in site. One problem may be that site.py changes the strings of sys.path into Unicode strings. In fact, when starting Python with -U -S, it will properly locate urllib. ---------------------------------------------------------------------- Comment By: Tim Peters (tim_one) Date: 2001-06-05 18:04 Message: Logged In: YES user_id=31435 Assigned to Marc-Andre. M-A, do you expect -U to be useful at this point? I thought I saw docs at one point, but can't seem to find them again ... ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=105470&aid=430269&group_id=5470 From noreply@sourceforge.net Thu Aug 2 13:11:53 2001 From: noreply@sourceforge.net (noreply@sourceforge.net) Date: Thu, 02 Aug 2001 05:11:53 -0700 Subject: [Python-bugs-list] [ python-Bugs-447152 ] WeakValueDictionary wrong except. rised Message-ID: Bugs item #447152, was opened at 2001-08-02 05:11 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=105470&aid=447152&group_id=5470 Category: Python Library Group: None Status: Open Resolution: None Priority: 5 Submitted By: Niki Spahiev (nikis) Assigned to: Nobody/Anonymous (nobody) Summary: WeakValueDictionary wrong except. rised Initial Comment: PythonWin 2.1 (#15, Jun 18 2001, 21:42:28) [MSC 32 bit (Intel)] on win32. Portions Copyright 1994-2001 Mark Hammond (MarkH@ActiveState.com) - see 'Help/About PythonWin' for further copyright information. >>> import weakref >>> wd = weakref.WeakValueDictionary() >>> class test: pass ... >>> t = test() >>> wd[1] = t >>> del t >>> wd[1] Traceback (most recent call last): File "", line 1, in ? File "c:\python21\lib\weakref.py", line 35, in __getitem__ o = self.data.get(key)() TypeError: object is not callable: None >>> FIX: change o = self.data.get(key)() to o = self.data[key]() ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=105470&aid=447152&group_id=5470 From noreply@sourceforge.net Thu Aug 2 13:28:00 2001 From: noreply@sourceforge.net (noreply@sourceforge.net) Date: Thu, 02 Aug 2001 05:28:00 -0700 Subject: [Python-bugs-list] [ python-Bugs-446588 ] Python-2.2a1 build dies Message-ID: Bugs item #446588, was opened at 2001-07-31 15:17 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=105470&aid=446588&group_id=5470 Category: Build Group: Python 2.2 Status: Open Resolution: Works For Me Priority: 3 Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: Python-2.2a1 build dies Initial Comment: after doing: ./configure --prefix=$HOME/local/STOW make the build bombs in the install phase with: usr/bin/install -c ./install-sh /home/mahler/local/STOW/Python-2.2a1/lib/python2.2/config/install-sh /usr/bin/install -c -m 644 ./Misc/Makefile.pre.in /home/mahler/local/STOW/Python-2.2a1/lib/python2.2/config/Makefile.pre.in PYTHONPATH= ./python ./setup.py install \ --install-platlib=/home/mahler/local/STOW/Python-2.2a1/lib/python2.2/lib-dynload 'import site' failed; use -v for traceback Traceback (most recent call last): File "./setup.py", line 6, in ? import sys, os, getopt ImportError: No module named os make[1]: *** [sharedinstall] Error 1 make[1]: Leaving directory `/mcallister0/home/mahler/local/SRC/Python-2.2a1' make: *** [STOW/Python-2.2a1] Error 2 rm SRC/Python-2.2a1make: unlink: SRC/Python-2.2a1: Is a directory STOW/Python-2.2a1make: unlink: STOW/Python-2.2a1: Is a directory SRC/Python-2.2a1/Makefile ---------------------------------------------------------------------- >Comment By: Guido van Rossum (gvanrossum) Date: 2001-08-02 05:28 Message: Logged In: YES user_id=6380 You have to do some thinking yourself too, you know. :-) Does that sys.path value make any sense to you? It doesn't match the prefix. Are the missing modules found on any of those? What other env vars do you have set that start with PYTHON? Do you have PYTHONHOME? ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2001-08-01 15:57 Message: Logged In: NO $ ./python 'import site' failed; use -v for traceback Python 2.2a1 (#4, Aug 1 2001, 16:55:28) [GCC egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)] on linux2 Type "copyright", "credits" or "license" for more information. Traceback (most recent call last): File "/home/mahler/.pythonrc.global.py", line 1, in ? import os ImportError: No module named os >>> import sys >>> sys.path ['', '.', '/home/mahler/local/PYTHON/Meta', '/home/mahler/local/PYTHON/kwP', '/home/mahler/local/lib/python', '/home/mahler/local/lib/python2.1', '/home/mahler/local/APPS/jack-2.2.0', '/home/mahler/local/lib/python2.1', '/home/mahler/local/lib/python2.2/', '/home/mahler/local/lib/python2.2/plat-linux2', '/home/mahler/local/lib/python2.2/lib-tk', '/home/mahler/local/lib/python2.2/lib-dynload'] >>> ---------------------------------------------------------------------- Comment By: Guido van Rossum (gvanrossum) Date: 2001-08-01 15:34 Message: Logged In: YES user_id=6380 Need more info. Try this: ./python >>> import sys >>> print sys.path ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2001-08-01 15:19 Message: Logged In: NO python only starts correctly if I give it the Lib path: ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ $ ./python -v 'import site' failed; traceback: ImportError: No module named site Python 2.2a1 (#4, Aug 1 2001, 16:55:28) [GCC egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)] on linux2 Type "copyright", "credits" or "license" for more information. Traceback (most recent call last): File "/home/mahler/.pythonrc.global.py", line 1, in ? import os ImportError: No module named os >>> +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ $ PYTHONPATH=Lib ./python -v # Lib/site.pyc matches Lib/site.py import site # precompiled from Lib/site.pyc # Lib/os.pyc matches Lib/os.py import os # precompiled from Lib/os.pyc import posix # builtin # Lib/posixpath.pyc matches Lib/posixpath.py import posixpath # precompiled from Lib/posixpath.pyc # Lib/stat.pyc matches Lib/stat.py import stat # precompiled from Lib/stat.pyc # Lib/UserDict.pyc matches Lib/UserDict.py import UserDict # precompiled from Lib/UserDict.pyc Python 2.2a1 (#4, Aug 1 2001, 16:55:28) [GCC egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)] on linux2 Type "copyright", "credits" or "license" for more information. # /mcallister0/home/mahler/local/SRC/Python-2.2a1/Lib/string.pyc matches /mcallister0/home/mahler/local/SRC/Python-2.2a1/Lib/string.py import string # precompiled from /mcallister0/home/mahler/local/SRC/Python-2.2a1/Lib/string.pyc >>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Daniel ---------------------------------------------------------------------- Comment By: Guido van Rossum (gvanrossum) Date: 2001-08-01 15:08 Message: Logged In: YES user_id=6380 Hm. Why does the newly built image not know that ./Lib is the library? This works for me! (Note that PYTHONPATH gets appended to the default sys.path, so setting it empty shouldn't make a difference.) What happens when you execute ./python at the command line? Does "import site" also fail there? Please try to poke around for more evidence. ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2001-08-01 15:00 Message: Logged In: NO Yes, I made a boo boo: --prefix=$HOME/local/STOW/Python-2.2a1 $PYTHONHOME is $HOME/local since I use stow to manage all my dowloaded software in $HOME/local. This has always worked in the past. I have a script which automactes the whole untar, configure,make, install process to stop me making errors like the above. The problem appears to be that last command: PYTHONPATH= ./python ./setup.py install ... sets the $PYTHONPATH to be empty and the newly built image does not know that the libraries are in the Lib directory just below it. doing PYTHONPATH=./Lib ./python ./setup.py install --install-platlib=/home/mahler/local/STOW/Python-2.2a1/lib/python2.2/lib-dynload does not crash but produces a whole bunch of warnings like: building 'zlib' extension skipping /mcallister0/home/mahler/local/SRC/Python-2.2a1/Modules/zlibmodule.c (build/temp.linux-i686-2.2/zlibmodule.o up-to-date) gcc -shared build/temp.linux-i686-2.2/zlibmodule.o -L/usr/local/lib -lz -o build/lib.linux-i686-2.2/zlib.so WARNING: removing "zlib" since importing it failed Daniel ---------------------------------------------------------------------- Comment By: Guido van Rossum (gvanrossum) Date: 2001-08-01 13:55 Message: Logged In: YES user_id=6380 I can't reproduce this; configuring with a prefix works fine. Your story seems inconsistent: you say you configured with prefix $HOME/local/STOW, but the output you cite looks like it was configured with prefix $HOME/local/STOW/Python-2.2a1. What platform? What's $PYTHONHOME? Try adding -v to the python invocation that fails to see the failure traceback. ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=105470&aid=446588&group_id=5470 From noreply@sourceforge.net Thu Aug 2 16:32:42 2001 From: noreply@sourceforge.net (noreply@sourceforge.net) Date: Thu, 02 Aug 2001 08:32:42 -0700 Subject: [Python-bugs-list] [ python-Bugs-442791 ] 2.2a1: New style classes and __delitem__ Message-ID: Bugs item #442791, was opened at 2001-07-19 08:44 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=105470&aid=442791&group_id=5470 Category: type/class unification Group: Python 2.2 >Status: Closed Resolution: Fixed Priority: 5 Submitted By: Walter Dіrwald (doerwalter) Assigned to: Guido van Rossum (gvanrossum) Summary: 2.2a1: New style classes and __delitem__ Initial Comment: And another one: New style class don't seem to support __delitem__: ---- class Foo(object): def __delitem__(self, key): print "__delitem__" del Foo()[42] ---- This results in: Traceback (most recent call last): File "test.py", line 5, in ? del Foo()[42] TypeError: object doesn't support item deletion ---- Changing the base class to dictionary results in: ---- Traceback (most recent call last): File "test.py", line 5, in ? del Foo()[42] KeyError: 42 ---- but Foo.__delitem__ doesn't seem to be called. ---------------------------------------------------------------------- >Comment By: Guido van Rossum (gvanrossum) Date: 2001-08-02 08:32 Message: Logged In: YES user_id=6380 There were no __delitem__ wrappers corresponding to the __setitem__ wrappers. Fixed now in the CVS trunk: typeobject.c rev. 2.20. ---------------------------------------------------------------------- Comment By: Guido van Rossum (gvanrossum) Date: 2001-08-01 15:39 Message: Logged In: YES user_id=6380 Reopened. I'll investigate. ---------------------------------------------------------------------- Comment By: Walter Dіrwald (doerwalter) Date: 2001-08-01 11:34 Message: Logged In: YES user_id=89016 I checked out the descr-branch and it seems that dictionary still doesn't support __delitem__: >>> x = {} >>> dictionary.__setitem__(x, 1, 1) >>> x {1: 1} >>> dictionary.__delitem__(x, 1) Traceback (most recent call last): File "", line 1, in ? AttributeError: type object 'dictionary' has no attribute '__delitem__' ---------------------------------------------------------------------- Comment By: Guido van Rossum (gvanrossum) Date: 2001-07-19 09:36 Message: Logged In: YES user_id=6380 Whoops, you found a whole slew of bugs in this area! I've fixed this now in the descr-branch of the CVS tree, in Object/typeobject.c:2.16.8.69. I've also added a bit to the test suite that checks these (and slices). ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=105470&aid=442791&group_id=5470 From noreply@sourceforge.net Thu Aug 2 17:30:59 2001 From: noreply@sourceforge.net (noreply@sourceforge.net) Date: Thu, 02 Aug 2001 09:30:59 -0700 Subject: [Python-bugs-list] [ python-Bugs-442813 ] 2.2a1: list.__getitem__ and index<0 Message-ID: Bugs item #442813, was opened at 2001-07-19 10:31 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=105470&aid=442813&group_id=5470 Category: type/class unification Group: Python 2.2 Status: Open Resolution: None Priority: 5 Submitted By: Walter Dіrwald (doerwalter) Assigned to: Guido van Rossum (gvanrossum) Summary: 2.2a1: list.__getitem__ and index<0 Initial Comment: list.__getitem__ doesn't handle negative indizes when called directly: >>> x = [1] >>> list.__getitem__(x, -1) Traceback (most recent call last): File "", line 1, in ? IndexError: list index out of range ---------------------------------------------------------------------- >Comment By: Walter Dіrwald (doerwalter) Date: 2001-08-02 09:30 Message: Logged In: YES user_id=89016 BTW, __setslice__ has the same problem: >>> x = [1,2,3,4] >>> x.__setslice__(-2,-1, [5]) >>> x [5, 1, 2, 3, 4] ---------------------------------------------------------------------- Comment By: Guido van Rossum (gvanrossum) Date: 2001-07-20 13:33 Message: Logged In: YES user_id=6380 This is deeper than it seems. The list object never interprets negative indices -- that's all done under the covers of the implementation in PySequence_GetItem(). So list.__getitem__(), which is a very thin wrapper around the list object's tp_as_sequence->sq_item function (list_item in listobject.c), also doesn't interpret negative indices. But because __getitem__ is ambiguous (it can be a sequence or a mapping operation, with slightly different semantics), when you define a subclass that implements __getitem__, and you pass an instance of that subclass a negative index, the special handling of negative indices is skipped, so a[-1] ends up calling a.__getitem__(-1). This is not good. I'll have to think about a way out of this dilemma. Moving the negative index handling into the objects is an option, but this might break with 3rd party sequence objects. Doing the negative index handling twice (once in PySequence_GetItem() and again in the object) is bad, because it changes the semantics of very large negative indices. ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=105470&aid=442813&group_id=5470 From noreply@sourceforge.net Thu Aug 2 18:37:07 2001 From: noreply@sourceforge.net (noreply@sourceforge.net) Date: Thu, 02 Aug 2001 10:37:07 -0700 Subject: [Python-bugs-list] [ python-Bugs-446588 ] Python-2.2a1 build dies Message-ID: Bugs item #446588, was opened at 2001-07-31 15:17 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=105470&aid=446588&group_id=5470 Category: Build Group: Python 2.2 Status: Open Resolution: Works For Me Priority: 3 Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: Python-2.2a1 build dies Initial Comment: after doing: ./configure --prefix=$HOME/local/STOW make the build bombs in the install phase with: usr/bin/install -c ./install-sh /home/mahler/local/STOW/Python-2.2a1/lib/python2.2/config/install-sh /usr/bin/install -c -m 644 ./Misc/Makefile.pre.in /home/mahler/local/STOW/Python-2.2a1/lib/python2.2/config/Makefile.pre.in PYTHONPATH= ./python ./setup.py install \ --install-platlib=/home/mahler/local/STOW/Python-2.2a1/lib/python2.2/lib-dynload 'import site' failed; use -v for traceback Traceback (most recent call last): File "./setup.py", line 6, in ? import sys, os, getopt ImportError: No module named os make[1]: *** [sharedinstall] Error 1 make[1]: Leaving directory `/mcallister0/home/mahler/local/SRC/Python-2.2a1' make: *** [STOW/Python-2.2a1] Error 2 rm SRC/Python-2.2a1make: unlink: SRC/Python-2.2a1: Is a directory STOW/Python-2.2a1make: unlink: STOW/Python-2.2a1: Is a directory SRC/Python-2.2a1/Makefile ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2001-08-02 10:37 Message: Logged In: NO Guido, I forgot to mention that the new image would not find any of the standard modules on the sys.path since I unstowed my old instatallation be fore the build and ~/local/SRC/Python2.2a1/Lib is not on sys.path. (You expected it to be there automatically if I remeber) Daniel ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2001-08-02 10:19 Message: Logged In: NO Guido, Yes, the sys.path does make sense. I use stow to manage my downloaded software. So package X ends up being installed at $HOME/local/STOW/X. Stow then creates symlinks to make it look like it is installed at $HOME/local. This makes it easy to tell which file belongs to which package without having PATH, INCLUDE etc be as long as your arm. I have a make file $HOME/local which when invoked with "make X", untars $HOME/local/TAR/X.tgz into $HOME/local/SRC does $ cd $HOME/local/SRC/X where it then does $ ./configure --prefix=$HOME/local/STOW/X $ make $ make install finally it then does $ cd $HOME/local/STOW $ stow X Therefore, PYTHONPATH is $HOME/local so I do not have to change it between installs. This has worked with versions 1.5.2, 1.6, 2.0, and 2.1, and with all GNU software, and most other autoconfiguring software. Here is the python section of my .bashrc # Python export PYAPPS=$LOCAL/PYTHON alias pyapps='/bin/ls -d $PYAPPS/*' alias pyappspath='jn : `pyapps`' export PYTHONHOME=$LOCAL export PYTHONSTARTUP=~/.pythonrc.global.py export PYTHONSTARTUPPATH=~/.pythonrc.py:./.pythonrc.py export PYTHONPATH=.:`pyappspath`:$LIB/python:$PYTHONPATH export PATH=$PYTHONPATH:$PATH Here is the makefile I use to build GNU style software. +++++++++++++++++++++++++++++++++++++++++++ .SUFFIXES: .jar .tar .tar.bz2 .tar.gz .tgz .Z .zip .build .kill .clean .check .test #ANT_JARS=find $(JAVA_DIR)/SRC/dist -name "*.jar" #ANT_PATH=jn : \ %: STOW/% rm -f $>> import sys >>> sys.path ['', '.', '/home/mahler/local/PYTHON/Meta', '/home/mahler/local/PYTHON/kwP', '/home/mahler/local/lib/python', '/home/mahler/local/lib/python2.1', '/home/mahler/local/APPS/jack-2.2.0', '/home/mahler/local/lib/python2.1', '/home/mahler/local/lib/python2.2/', '/home/mahler/local/lib/python2.2/plat-linux2', '/home/mahler/local/lib/python2.2/lib-tk', '/home/mahler/local/lib/python2.2/lib-dynload'] >>> ---------------------------------------------------------------------- Comment By: Guido van Rossum (gvanrossum) Date: 2001-08-01 15:34 Message: Logged In: YES user_id=6380 Need more info. Try this: ./python >>> import sys >>> print sys.path ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2001-08-01 15:19 Message: Logged In: NO python only starts correctly if I give it the Lib path: ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ $ ./python -v 'import site' failed; traceback: ImportError: No module named site Python 2.2a1 (#4, Aug 1 2001, 16:55:28) [GCC egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)] on linux2 Type "copyright", "credits" or "license" for more information. Traceback (most recent call last): File "/home/mahler/.pythonrc.global.py", line 1, in ? import os ImportError: No module named os >>> +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ $ PYTHONPATH=Lib ./python -v # Lib/site.pyc matches Lib/site.py import site # precompiled from Lib/site.pyc # Lib/os.pyc matches Lib/os.py import os # precompiled from Lib/os.pyc import posix # builtin # Lib/posixpath.pyc matches Lib/posixpath.py import posixpath # precompiled from Lib/posixpath.pyc # Lib/stat.pyc matches Lib/stat.py import stat # precompiled from Lib/stat.pyc # Lib/UserDict.pyc matches Lib/UserDict.py import UserDict # precompiled from Lib/UserDict.pyc Python 2.2a1 (#4, Aug 1 2001, 16:55:28) [GCC egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)] on linux2 Type "copyright", "credits" or "license" for more information. # /mcallister0/home/mahler/local/SRC/Python-2.2a1/Lib/string.pyc matches /mcallister0/home/mahler/local/SRC/Python-2.2a1/Lib/string.py import string # precompiled from /mcallister0/home/mahler/local/SRC/Python-2.2a1/Lib/string.pyc >>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Daniel ---------------------------------------------------------------------- Comment By: Guido van Rossum (gvanrossum) Date: 2001-08-01 15:08 Message: Logged In: YES user_id=6380 Hm. Why does the newly built image not know that ./Lib is the library? This works for me! (Note that PYTHONPATH gets appended to the default sys.path, so setting it empty shouldn't make a difference.) What happens when you execute ./python at the command line? Does "import site" also fail there? Please try to poke around for more evidence. ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2001-08-01 15:00 Message: Logged In: NO Yes, I made a boo boo: --prefix=$HOME/local/STOW/Python-2.2a1 $PYTHONHOME is $HOME/local since I use stow to manage all my dowloaded software in $HOME/local. This has always worked in the past. I have a script which automactes the whole untar, configure,make, install process to stop me making errors like the above. The problem appears to be that last command: PYTHONPATH= ./python ./setup.py install ... sets the $PYTHONPATH to be empty and the newly built image does not know that the libraries are in the Lib directory just below it. doing PYTHONPATH=./Lib ./python ./setup.py install --install-platlib=/home/mahler/local/STOW/Python-2.2a1/lib/python2.2/lib-dynload does not crash but produces a whole bunch of warnings like: building 'zlib' extension skipping /mcallister0/home/mahler/local/SRC/Python-2.2a1/Modules/zlibmodule.c (build/temp.linux-i686-2.2/zlibmodule.o up-to-date) gcc -shared build/temp.linux-i686-2.2/zlibmodule.o -L/usr/local/lib -lz -o build/lib.linux-i686-2.2/zlib.so WARNING: removing "zlib" since importing it failed Daniel ---------------------------------------------------------------------- Comment By: Guido van Rossum (gvanrossum) Date: 2001-08-01 13:55 Message: Logged In: YES user_id=6380 I can't reproduce this; configuring with a prefix works fine. Your story seems inconsistent: you say you configured with prefix $HOME/local/STOW, but the output you cite looks like it was configured with prefix $HOME/local/STOW/Python-2.2a1. What platform? What's $PYTHONHOME? Try adding -v to the python invocation that fails to see the failure traceback. ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=105470&aid=446588&group_id=5470 From noreply@sourceforge.net Thu Aug 2 20:34:12 2001 From: noreply@sourceforge.net (noreply@sourceforge.net) Date: Thu, 02 Aug 2001 12:34:12 -0700 Subject: [Python-bugs-list] [ python-Bugs-446588 ] Python-2.2a1 build dies Message-ID: Bugs item #446588, was opened at 2001-07-31 15:17 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=105470&aid=446588&group_id=5470 Category: Build Group: Python 2.2 >Status: Closed >Resolution: Fixed Priority: 3 Submitted By: Nobody/Anonymous (nobody) >Assigned to: Guido van Rossum (gvanrossum) Summary: Python-2.2a1 build dies Initial Comment: after doing: ./configure --prefix=$HOME/local/STOW make the build bombs in the install phase with: usr/bin/install -c ./install-sh /home/mahler/local/STOW/Python-2.2a1/lib/python2.2/config/install-sh /usr/bin/install -c -m 644 ./Misc/Makefile.pre.in /home/mahler/local/STOW/Python-2.2a1/lib/python2.2/config/Makefile.pre.in PYTHONPATH= ./python ./setup.py install \ --install-platlib=/home/mahler/local/STOW/Python-2.2a1/lib/python2.2/lib-dynload 'import site' failed; use -v for traceback Traceback (most recent call last): File "./setup.py", line 6, in ? import sys, os, getopt ImportError: No module named os make[1]: *** [sharedinstall] Error 1 make[1]: Leaving directory `/mcallister0/home/mahler/local/SRC/Python-2.2a1' make: *** [STOW/Python-2.2a1] Error 2 rm SRC/Python-2.2a1make: unlink: SRC/Python-2.2a1: Is a directory STOW/Python-2.2a1make: unlink: STOW/Python-2.2a1: Is a directory SRC/Python-2.2a1/Makefile ---------------------------------------------------------------------- >Comment By: Guido van Rossum (gvanrossum) Date: 2001-08-02 12:34 Message: Logged In: YES user_id=6380 Aha. The .bashrc plus the remark about the unstow solves the mystery. This is fixed in CVS but not yet in the 2.2a1 release. To make it work with this release you have to unset PYTHONHOME. In 2.2a2 and later this is solved by the -E command line option. ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2001-08-02 10:37 Message: Logged In: NO Guido, I forgot to mention that the new image would not find any of the standard modules on the sys.path since I unstowed my old instatallation be fore the build and ~/local/SRC/Python2.2a1/Lib is not on sys.path. (You expected it to be there automatically if I remeber) Daniel ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2001-08-02 10:19 Message: Logged In: NO Guido, Yes, the sys.path does make sense. I use stow to manage my downloaded software. So package X ends up being installed at $HOME/local/STOW/X. Stow then creates symlinks to make it look like it is installed at $HOME/local. This makes it easy to tell which file belongs to which package without having PATH, INCLUDE etc be as long as your arm. I have a make file $HOME/local which when invoked with "make X", untars $HOME/local/TAR/X.tgz into $HOME/local/SRC does $ cd $HOME/local/SRC/X where it then does $ ./configure --prefix=$HOME/local/STOW/X $ make $ make install finally it then does $ cd $HOME/local/STOW $ stow X Therefore, PYTHONPATH is $HOME/local so I do not have to change it between installs. This has worked with versions 1.5.2, 1.6, 2.0, and 2.1, and with all GNU software, and most other autoconfiguring software. Here is the python section of my .bashrc # Python export PYAPPS=$LOCAL/PYTHON alias pyapps='/bin/ls -d $PYAPPS/*' alias pyappspath='jn : `pyapps`' export PYTHONHOME=$LOCAL export PYTHONSTARTUP=~/.pythonrc.global.py export PYTHONSTARTUPPATH=~/.pythonrc.py:./.pythonrc.py export PYTHONPATH=.:`pyappspath`:$LIB/python:$PYTHONPATH export PATH=$PYTHONPATH:$PATH Here is the makefile I use to build GNU style software. +++++++++++++++++++++++++++++++++++++++++++ .SUFFIXES: .jar .tar .tar.bz2 .tar.gz .tgz .Z .zip .build .kill .clean .check .test #ANT_JARS=find $(JAVA_DIR)/SRC/dist -name "*.jar" #ANT_PATH=jn : \ %: STOW/% rm -f $>> import sys >>> sys.path ['', '.', '/home/mahler/local/PYTHON/Meta', '/home/mahler/local/PYTHON/kwP', '/home/mahler/local/lib/python', '/home/mahler/local/lib/python2.1', '/home/mahler/local/APPS/jack-2.2.0', '/home/mahler/local/lib/python2.1', '/home/mahler/local/lib/python2.2/', '/home/mahler/local/lib/python2.2/plat-linux2', '/home/mahler/local/lib/python2.2/lib-tk', '/home/mahler/local/lib/python2.2/lib-dynload'] >>> ---------------------------------------------------------------------- Comment By: Guido van Rossum (gvanrossum) Date: 2001-08-01 15:34 Message: Logged In: YES user_id=6380 Need more info. Try this: ./python >>> import sys >>> print sys.path ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2001-08-01 15:19 Message: Logged In: NO python only starts correctly if I give it the Lib path: ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ $ ./python -v 'import site' failed; traceback: ImportError: No module named site Python 2.2a1 (#4, Aug 1 2001, 16:55:28) [GCC egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)] on linux2 Type "copyright", "credits" or "license" for more information. Traceback (most recent call last): File "/home/mahler/.pythonrc.global.py", line 1, in ? import os ImportError: No module named os >>> +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ $ PYTHONPATH=Lib ./python -v # Lib/site.pyc matches Lib/site.py import site # precompiled from Lib/site.pyc # Lib/os.pyc matches Lib/os.py import os # precompiled from Lib/os.pyc import posix # builtin # Lib/posixpath.pyc matches Lib/posixpath.py import posixpath # precompiled from Lib/posixpath.pyc # Lib/stat.pyc matches Lib/stat.py import stat # precompiled from Lib/stat.pyc # Lib/UserDict.pyc matches Lib/UserDict.py import UserDict # precompiled from Lib/UserDict.pyc Python 2.2a1 (#4, Aug 1 2001, 16:55:28) [GCC egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)] on linux2 Type "copyright", "credits" or "license" for more information. # /mcallister0/home/mahler/local/SRC/Python-2.2a1/Lib/string.pyc matches /mcallister0/home/mahler/local/SRC/Python-2.2a1/Lib/string.py import string # precompiled from /mcallister0/home/mahler/local/SRC/Python-2.2a1/Lib/string.pyc >>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Daniel ---------------------------------------------------------------------- Comment By: Guido van Rossum (gvanrossum) Date: 2001-08-01 15:08 Message: Logged In: YES user_id=6380 Hm. Why does the newly built image not know that ./Lib is the library? This works for me! (Note that PYTHONPATH gets appended to the default sys.path, so setting it empty shouldn't make a difference.) What happens when you execute ./python at the command line? Does "import site" also fail there? Please try to poke around for more evidence. ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2001-08-01 15:00 Message: Logged In: NO Yes, I made a boo boo: --prefix=$HOME/local/STOW/Python-2.2a1 $PYTHONHOME is $HOME/local since I use stow to manage all my dowloaded software in $HOME/local. This has always worked in the past. I have a script which automactes the whole untar, configure,make, install process to stop me making errors like the above. The problem appears to be that last command: PYTHONPATH= ./python ./setup.py install ... sets the $PYTHONPATH to be empty and the newly built image does not know that the libraries are in the Lib directory just below it. doing PYTHONPATH=./Lib ./python ./setup.py install --install-platlib=/home/mahler/local/STOW/Python-2.2a1/lib/python2.2/lib-dynload does not crash but produces a whole bunch of warnings like: building 'zlib' extension skipping /mcallister0/home/mahler/local/SRC/Python-2.2a1/Modules/zlibmodule.c (build/temp.linux-i686-2.2/zlibmodule.o up-to-date) gcc -shared build/temp.linux-i686-2.2/zlibmodule.o -L/usr/local/lib -lz -o build/lib.linux-i686-2.2/zlib.so WARNING: removing "zlib" since importing it failed Daniel ---------------------------------------------------------------------- Comment By: Guido van Rossum (gvanrossum) Date: 2001-08-01 13:55 Message: Logged In: YES user_id=6380 I can't reproduce this; configuring with a prefix works fine. Your story seems inconsistent: you say you configured with prefix $HOME/local/STOW, but the output you cite looks like it was configured with prefix $HOME/local/STOW/Python-2.2a1. What platform? What's $PYTHONHOME? Try adding -v to the python invocation that fails to see the failure traceback. ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=105470&aid=446588&group_id=5470 From noreply@sourceforge.net Thu Aug 2 20:41:37 2001 From: noreply@sourceforge.net (noreply@sourceforge.net) Date: Thu, 02 Aug 2001 12:41:37 -0700 Subject: [Python-bugs-list] [ python-Bugs-445862 ] bsddb fails for larger amount of data Message-ID: Bugs item #445862, was opened at 2001-07-30 00:21 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=105470&aid=445862&group_id=5470 Category: Extension Modules Group: None Status: Open Resolution: None Priority: 5 Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: bsddb fails for larger amount of data Initial Comment: The attached script fails after approx. 72500 insert operations. If you vary the size of the keys and/or the values, the bug occurs earlier or later, but even with a value size of 1 the bug will occur. Probably, this explains also bug #408271 ("crash in shelve module"). Platform: W2K ---------------------------------------------------------------------- >Comment By: Tim Peters (tim_one) Date: 2001-08-02 12:41 Message: Logged In: YES user_id=31435 Alas, there's no script attached -- please attach one, so we have something concrete to investigate. ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2001-08-02 03:08 Message: Logged In: NO I was getting crashes in shelve module, Using NT4 (Python 2.1 (#15, Apr 16 2001, 18:25:49) [MSC 32 bit (Intel)] on win32). I've changed my program to re-read previously written keys fairly frequently, and I get keyerrors for keys that have definitely been written, and that gave no error a little earlier in the same program. The program doesn't contain any delete statements. The same program works when using dumbdbm instead of bsddb (but produces huge indexes), so there definitely appears to be a problem with bsddbm on windows NT. ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=105470&aid=445862&group_id=5470 From noreply@sourceforge.net Thu Aug 2 20:44:28 2001 From: noreply@sourceforge.net (noreply@sourceforge.net) Date: Thu, 02 Aug 2001 12:44:28 -0700 Subject: [Python-bugs-list] [ python-Bugs-420416 ] Python for BeOS/PPC Unicode Build Prob. Message-ID: Bugs item #420416, was opened at 2001-05-01 03:08 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=105470&aid=420416&group_id=5470 Category: Build Group: Platform-specific Status: Open Resolution: None >Priority: 3 Submitted By: Matthew Schinckel (schinckel) Assigned to: Nobody/Anonymous (nobody) Summary: Python for BeOS/PPC Unicode Build Prob. Initial Comment: When trying to build python(2.1 final) normally under BeOS/PPC 5, Py_UCS4 does not seem to be defined in Includes/unicodeobject.h (This would seem to indicate that uint and ulong are shorter than 4 bits!!!) I'm guessing this is resultant of a problem elsewhere, but I'm too clueless in terms of C(++) to work it out. ---------------------------------------------------------------------- >Comment By: Guido van Rossum (gvanrossum) Date: 2001-08-02 12:44 Message: Logged In: YES user_id=6380 I'm afraid it's up to Matthew to figure out why the configure script calculates zero object sizes. Sorry... (At least try Python 2.1.1, although it may not make a difference.) ---------------------------------------------------------------------- Comment By: M.-A. Lemburg (lemburg) Date: 2001-08-02 03:17 Message: Logged In: YES user_id=38388 Assigning the bug report back to None -- someone with more knowledge about autoconf should take a look at this one. (It is not Unicode related.) ---------------------------------------------------------------------- Comment By: Matthew Schinckel (schinckel) Date: 2001-05-28 03:59 Message: Logged In: YES user_id=193059 Here is the crux of my recent communications with Marc-Andre: > Okay, I might be guessing a bit here but: > > These programs are supposed to print the sizeof value. > > They are not printing anything. > > The only error being raised is: > > ### mwcc Compiler Warning : > # } > # ^ > # return value expected > #---------------------------------------------------------- > File "configure"; Line 2245 > # while compiling "/boot/var/tmp/conftest.c" > #---------------------------------------------------------- > Interesting: the compiler chokes on the missing return statement in the test program rather than some other error. This is clearly an autoconf bug and I'm not sure whether it can be fixed in Python. ---------------------------------------------------------------------- Comment By: M.-A. Lemburg (lemburg) Date: 2001-05-23 02:20 Message: Logged In: YES user_id=38388 I've uploaded Matthew's config files to SF. Perhaps some Metroworks wizard could also take a look at these ?! ---------------------------------------------------------------------- Comment By: Matthew Schinckel (schinckel) Date: 2001-05-22 03:12 Message: Logged In: YES user_id=193059 Sorry, I've been on holiday:-) Donn Cave gave me a patch that allows BeOS to build it, so I'll send it along with the config.* files... (I've zipped them up, but I fear they will not upload with my browser.) ---------------------------------------------------------------------- Comment By: M.-A. Lemburg (lemburg) Date: 2001-05-21 02:46 Message: Logged In: YES user_id=38388 Matthew, if you can not help us here, we won't be able to resolve the problem. Please send us the config.* files, so that we can check where the problem originates. ---------------------------------------------------------------------- Comment By: M.-A. Lemburg (lemburg) Date: 2001-05-07 04:14 Message: Logged In: YES user_id=38388 Hmm, this seems to indicate that the autoconf generated configure script doesn't work right on BeOS. Could you attach the config.* files to this bug report ? Perhaps we can find the cause of configure failing on BeOS. Thanks. ---------------------------------------------------------------------- Comment By: Matthew Schinckel (schinckel) Date: 2001-05-07 01:20 Message: Logged In: YES user_id=193059 okay, the config.h file is autogenerated - and all of the SIZEOF_xxx constants are set to 0. That's bad, huh? ---------------------------------------------------------------------- Comment By: M.-A. Lemburg (lemburg) Date: 2001-05-02 05:50 Message: Logged In: YES user_id=38388 Looking at unicodeobject.h: /* * Use this typedef when you need to represent a UTF-16 surrogate pair * as single unsigned integer. */ #if SIZEOF_INT >= 4 typedef unsigned int Py_UCS4; #elif SIZEOF_LONG >= 4 typedef unsigned long Py_UCS4; #endif it seems that SIZEOF_LONG and/or SIZEOF_INT are not defined in your config.h file. Does the BeOS-port have its own special config.h file or is the file generated using autoconf ? ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=105470&aid=420416&group_id=5470 From noreply@sourceforge.net Thu Aug 2 20:47:36 2001 From: noreply@sourceforge.net (noreply@sourceforge.net) Date: Thu, 02 Aug 2001 12:47:36 -0700 Subject: [Python-bugs-list] [ python-Bugs-447152 ] WeakValueDictionary wrong except. rised Message-ID: Bugs item #447152, was opened at 2001-08-02 05:11 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=105470&aid=447152&group_id=5470 Category: Python Library Group: None Status: Open Resolution: None Priority: 5 Submitted By: Niki Spahiev (nikis) >Assigned to: Fred L. Drake, Jr. (fdrake) Summary: WeakValueDictionary wrong except. rised Initial Comment: PythonWin 2.1 (#15, Jun 18 2001, 21:42:28) [MSC 32 bit (Intel)] on win32. Portions Copyright 1994-2001 Mark Hammond (MarkH@ActiveState.com) - see 'Help/About PythonWin' for further copyright information. >>> import weakref >>> wd = weakref.WeakValueDictionary() >>> class test: pass ... >>> t = test() >>> wd[1] = t >>> del t >>> wd[1] Traceback (most recent call last): File "", line 1, in ? File "c:\python21\lib\weakref.py", line 35, in __getitem__ o = self.data.get(key)() TypeError: object is not callable: None >>> FIX: change o = self.data.get(key)() to o = self.data[key]() ---------------------------------------------------------------------- >Comment By: Guido van Rossum (gvanrossum) Date: 2001-08-02 12:47 Message: Logged In: YES user_id=6380 Assigned to Fred. ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=105470&aid=447152&group_id=5470 From noreply@sourceforge.net Thu Aug 2 22:38:27 2001 From: noreply@sourceforge.net (noreply@sourceforge.net) Date: Thu, 02 Aug 2001 14:38:27 -0700 Subject: [Python-bugs-list] [ python-Bugs-446971 ] im_func, user-defined method Message-ID: Bugs item #446971, was opened at 2001-08-01 15:17 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=105470&aid=446971&group_id=5470 Category: Documentation >Group: Python 2.2 >Status: Closed >Resolution: Fixed Priority: 5 Submitted By: Nobody/Anonymous (nobody) Assigned to: Fred L. Drake, Jr. (fdrake) Summary: im_func, user-defined method Initial Comment: >From the language reference: 3.2 The standard type hierarchy User-defined methods: A user-defined method object combines a class, a class instance (or None) and a user-defined function. ... I take issue with 'user-defined function'. In my experiments with Python 2.1.1 on Windows 2000, using the C API, a user-defined method can combine a 'user- defined function' OR a 'builtin function'. I call PyObject_GetAttrString( pPyObject, "im_func" ), and a built-in function type object is returned. Tom. ---------------------------------------------------------------------- >Comment By: Fred L. Drake, Jr. (fdrake) Date: 2001-08-02 14:38 Message: Logged In: YES user_id=3066 Fixed in Doc/ref/ref3.tex revision 1.71. The manual used to be right, but more flexibility was added. Normal usage still only finds user-defined functions there, but the exceptions module uses built-in functions, and the "new" module can be used to construct more interesting objects as well. ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=105470&aid=446971&group_id=5470 From noreply@sourceforge.net Fri Aug 3 01:49:46 2001 From: noreply@sourceforge.net (noreply@sourceforge.net) Date: Thu, 02 Aug 2001 17:49:46 -0700 Subject: [Python-bugs-list] [ python-Bugs-447370 ] typo in urllib2.py Message-ID: Bugs item #447370, was opened at 2001-08-02 17:49 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=105470&aid=447370&group_id=5470 Category: Python Library Group: Python 2.1.1 Status: Open Resolution: None Priority: 5 Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: typo in urllib2.py Initial Comment: in line 662 of urllib2.py the 'o' and 'w' are transposed: passwd = HTTPPassowrdMgr() ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=105470&aid=447370&group_id=5470 From noreply@sourceforge.net Fri Aug 3 02:22:54 2001 From: noreply@sourceforge.net (noreply@sourceforge.net) Date: Thu, 02 Aug 2001 18:22:54 -0700 Subject: [Python-bugs-list] [ python-Bugs-447370 ] typo in urllib2.py Message-ID: Bugs item #447370, was opened at 2001-08-02 17:49 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=105470&aid=447370&group_id=5470 Category: Python Library Group: Python 2.1.1 Status: Open Resolution: None Priority: 5 Submitted By: Nobody/Anonymous (nobody) >Assigned to: Jeremy Hylton (jhylton) Summary: typo in urllib2.py Initial Comment: in line 662 of urllib2.py the 'o' and 'w' are transposed: passwd = HTTPPassowrdMgr() ---------------------------------------------------------------------- >Comment By: Guido van Rossum (gvanrossum) Date: 2001-08-02 18:22 Message: Logged In: YES user_id=6380 Assigned to Jeremy. There are more typos, e.g. OpenerDirectory instead of OpenerDirector. Should I paste the pychecker output here? ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=105470&aid=447370&group_id=5470 From noreply@sourceforge.net Fri Aug 3 05:12:39 2001 From: noreply@sourceforge.net (noreply@sourceforge.net) Date: Thu, 02 Aug 2001 21:12:39 -0700 Subject: [Python-bugs-list] [ python-Bugs-447152 ] WeakValueDictionary wrong except. rised Message-ID: Bugs item #447152, was opened at 2001-08-02 05:11 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=105470&aid=447152&group_id=5470 Category: Python Library Group: None >Status: Closed >Resolution: Fixed Priority: 5 Submitted By: Niki Spahiev (nikis) Assigned to: Fred L. Drake, Jr. (fdrake) Summary: WeakValueDictionary wrong except. rised Initial Comment: PythonWin 2.1 (#15, Jun 18 2001, 21:42:28) [MSC 32 bit (Intel)] on win32. Portions Copyright 1994-2001 Mark Hammond (MarkH@ActiveState.com) - see 'Help/About PythonWin' for further copyright information. >>> import weakref >>> wd = weakref.WeakValueDictionary() >>> class test: pass ... >>> t = test() >>> wd[1] = t >>> del t >>> wd[1] Traceback (most recent call last): File "", line 1, in ? File "c:\python21\lib\weakref.py", line 35, in __getitem__ o = self.data.get(key)() TypeError: object is not callable: None >>> FIX: change o = self.data.get(key)() to o = self.data[key]() ---------------------------------------------------------------------- >Comment By: Fred L. Drake, Jr. (fdrake) Date: 2001-08-02 21:12 Message: Logged In: YES user_id=3066 Fixed in Lib/weakref.py revision 1.11. ---------------------------------------------------------------------- Comment By: Guido van Rossum (gvanrossum) Date: 2001-08-02 12:47 Message: Logged In: YES user_id=6380 Assigned to Fred. ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=105470&aid=447152&group_id=5470 From noreply@sourceforge.net Fri Aug 3 08:50:08 2001 From: noreply@sourceforge.net (noreply@sourceforge.net) Date: Fri, 03 Aug 2001 00:50:08 -0700 Subject: [Python-bugs-list] [ python-Bugs-445862 ] bsddb fails for larger amount of data Message-ID: Bugs item #445862, was opened at 2001-07-30 00:21 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=105470&aid=445862&group_id=5470 Category: Extension Modules Group: None Status: Open Resolution: None Priority: 5 Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: bsddb fails for larger amount of data Initial Comment: The attached script fails after approx. 72500 insert operations. If you vary the size of the keys and/or the values, the bug occurs earlier or later, but even with a value size of 1 the bug will occur. Probably, this explains also bug #408271 ("crash in shelve module"). Platform: W2K ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2001-08-03 00:50 Message: Logged In: NO Here it is: import anydbm import bsddb import random MAX = 1000000 r = random.Random(42) r.seed(1017) db = anydbm.open("test.dbm", "n") #db = bsddb.hashopen("test.dbm", "n") try: for i in xrange(0, MAX): if i % 1000 == 0: print i key = "abcdef" + str(r.uniform(0, 10 * MAX)) val = "a" * 80 + str(i) db[key] = val finally: db.close() print "Last i: %s, last key:%s" % (i,key) ---------------------------------------------------------------------- Comment By: Tim Peters (tim_one) Date: 2001-08-02 12:41 Message: Logged In: YES user_id=31435 Alas, there's no script attached -- please attach one, so we have something concrete to investigate. ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2001-08-02 03:08 Message: Logged In: NO I was getting crashes in shelve module, Using NT4 (Python 2.1 (#15, Apr 16 2001, 18:25:49) [MSC 32 bit (Intel)] on win32). I've changed my program to re-read previously written keys fairly frequently, and I get keyerrors for keys that have definitely been written, and that gave no error a little earlier in the same program. The program doesn't contain any delete statements. The same program works when using dumbdbm instead of bsddb (but produces huge indexes), so there definitely appears to be a problem with bsddbm on windows NT. ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=105470&aid=445862&group_id=5470 From noreply@sourceforge.net Fri Aug 3 20:55:08 2001 From: noreply@sourceforge.net (noreply@sourceforge.net) Date: Fri, 03 Aug 2001 12:55:08 -0700 Subject: [Python-bugs-list] [ python-Bugs-445196 ] Hexadecimal character references break HTMLParser Message-ID: Bugs item #445196, was opened at 2001-07-27 08:19 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=105470&aid=445196&group_id=5470 Category: Python Library Group: None >Status: Closed >Resolution: Fixed Priority: 5 Submitted By: Nobody/Anonymous (nobody) Assigned to: Fred L. Drake, Jr. (fdrake) Summary: Hexadecimal character references break HTMLParser Initial Comment: This bug affects both the Python standard library and Zope TAL. Input such as this: “Backwards substitution” in a Page Template results in this error: