Re: [Python-Dev] Problems building python2.4 SRPM on RHEL4 x64
Eric B. schrieb: Hi, I appologize if this is not the right place to post this, but searching through the old archives, I ran across the same issue from 3 years ago, but I cannot find the resolution to it. Currently, I am trying to build the python2.4 SRPM from Python.org on a CentOS4.6_x64 platform, but the build is failing with a very non-descript error message. + cd /var/tmp/python2.4-2.4-root/usr/bin + mv -f pydoc pydoc2.4 + cd /var/tmp/python2.4-2.4-root/usr/bin + mv -f idle idle2.4 + echo '#!/bin/bash' + echo 'exec /usr/bin/python2.4 /usr/lib64/python2.4/idlelib/idle.py' + chmod 755 /var/tmp/python2.4-2.4-root/usr/bin/idle2.4 + cp -a Tools /var/tmp/python2.4-2.4-root/usr/lib64/python2.4 + rm -f mainpkg.files + find /var/tmp/python2.4-2.4-root/usr/lib64/python2.4/lib-dynload -type f + sed 's|^/var/tmp/python2.4-2.4-root|/|' + grep -v -e '_tkinter.so$' error: Bad exit status from /var/tmp/rpm-tmp.55639 (%install) The last command executed imediately before the error output seems to be find $RPM_BUILD_ROOT%{__prefix}/%{libdirname}/python%{libvers}/lib-dynload -type f | sed s|^${RPM_BUILD_ROOT}|/| | grep -v -e '_tkinter.so$' mainpkg.files That is not the last command in the %install script (atleast not according to the spec file). So it is not at all clear why the shell should stop executing at that point, and spit out that error message. The only theory I can come up with is that the shell *crashed*. Can you get hold of the rpm-tmp file (e.g. by asking RPM not to delete it)? Then run it independently, perhaps under strace. If it's indeed the case that the shell crashes, something is seriously wrong with your operating system. Regards, Martin ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Complexity documentation request
Hi, I just dug into the source code looking for complexity of set operations. In the wiki page I documented an interesting finding, that it is different to do s-t and s.difference(t). It is also interesting that you can do the first only for sets, but the second for every iterable in t. Are these portable characteristics of the python language or just implementation specific details? In addition, can someone explain me the usefulness of the loop starting with 'if (PyDict_CheckExact(other))' in set_difference()? As I understand it set_difference() is always called with two sets as arguments (set_sub() does the actual call). I'm just trying to figure out the complexity of the other set operations, but things get more complicated. I'd appreciate your help. Thanks, Dimitris ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Complexity documentation request
Correcting myself: Dimitrios Apostolou wrote: Hi, I just dug into the source code looking for complexity of set operations. In the wiki page I documented an interesting finding, that it is different to do s-t and s.difference(t). It is also interesting it is different to do s-t than s.difference_update(t), as fas as complexity is involved. The first one is O(len(s)) while the second is O(len(t)) (I *think so, I may have missed lots of things in the source code). that you can do the first only for sets, but the second for every iterable in t. Are these portable characteristics of the python language or just implementation specific details? In addition, can someone explain me the I just found it documented in the library reference, that s.method() can accept any iterable while s-t can't. So I guess it is a language characteristic. usefulness of the loop starting with 'if (PyDict_CheckExact(other))' in set_difference()? As I understand it set_difference() is always called with two sets as arguments (set_sub() does the actual call). I'm just trying to figure out the complexity of the other set operations, but things get more complicated. I'd appreciate your help. Thanks, Dimitris P.S. Who is the wiki admin? I'm desperately trying to improve the looks of tables (Add border, remove the p element from every cell) but I can't. I think that the page stylesheet needs to be modified, for starters... ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Problems building python2.4 SRPM on RHEL4 x64
Martin v. Lwis [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Eric B. schrieb: Hi, I appologize if this is not the right place to post this, but searching through the old archives, I ran across the same issue from 3 years ago, but I cannot find the resolution to it. Currently, I am trying to build the python2.4 SRPM from Python.org on a CentOS4.6_x64 platform, but the build is failing with a very non-descript error message. + cd /var/tmp/python2.4-2.4-root/usr/bin + mv -f pydoc pydoc2.4 + cd /var/tmp/python2.4-2.4-root/usr/bin + mv -f idle idle2.4 + echo '#!/bin/bash' + echo 'exec /usr/bin/python2.4 /usr/lib64/python2.4/idlelib/idle.py' + chmod 755 /var/tmp/python2.4-2.4-root/usr/bin/idle2.4 + cp -a Tools /var/tmp/python2.4-2.4-root/usr/lib64/python2.4 + rm -f mainpkg.files + find /var/tmp/python2.4-2.4-root/usr/lib64/python2.4/lib-dynload -type f + sed 's|^/var/tmp/python2.4-2.4-root|/|' + grep -v -e '_tkinter.so$' error: Bad exit status from /var/tmp/rpm-tmp.55639 (%install) The last command executed imediately before the error output seems to be find $RPM_BUILD_ROOT%{__prefix}/%{libdirname}/python%{libvers}/lib-dynload -type f | sed s|^${RPM_BUILD_ROOT}|/| | grep -v -e '_tkinter.so$' mainpkg.files That is not the last command in the %install script (atleast not according to the spec file). So it is not at all clear why the shell should stop executing at that point, and spit out that error message. The only theory I can come up with is that the shell *crashed*. Can you get hold of the rpm-tmp file (e.g. by asking RPM not to delete it)? Then run it independently, perhaps under strace. Forgive the newbie-ness to this question, but I'm not quite sure what you mean by the rpm-tmp file; I'm assuming you mean the rpm-temp.45231 shell script that is left in /var/tmp. I tried running that myself from the cmd line using # bash -x rpm-tmp.45231 and it runs properly to completion. If I try running just: # rpmbuild -bi --short-circuit /usr/src/redhat/SPECS/python-2.4.spec it (not surprisingly) exists with the same error message. If I try to run # strace rpmbuild -bi --short-circuit /usr/src/redhat/SPECS/python-2.4.spec I end up with a whole bunch of output I don't understand: . + find /var/tmp/python2.4-2.4-root/usr/lib64/python2.4/lib-dynload -type f + sed 's|^/var/tmp/python2.4-2.4-root|/|' + grep -v -e '_tkinter.so$' [{WIFEXITED(s) WEXITSTATUS(s) == 1}], 0, NULL) = 14779 --- SIGCHLD (Child exited) @ 0 (0) --- write(2, error: , 7error: ) = 7 write(2, Bad exit status from /var/tmp/rp..., 53Bad exit status from /var/tmp/rpm-tmp.156 (%install) ) = 53 write(1, \n\nRPM build errors:\n, 20 RPM build errors: ) = 20 write(2, Bad exit status from /var/tm..., 57Bad exit status from /var/tmp/rpm-tmp.156 (%install) ) = 57 open(/usr/lib/rpm/rpmrc, O_RDONLY)= 3 fcntl(3, F_SETFD, FD_CLOEXEC) = 0 fstat(3, {st_mode=S_IFREG|0644, st_size=11452, ...}) = 0 mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2a983ac000 poll([{fd=3, events=POLLIN, revents=POLLIN}], 1, 1000) = 1 read(3, #/*! \\page config_rpmrc Default ..., 8192) = 8192 poll([{fd=3, events=POLLIN, revents=POLLIN}], 1, 1000) = 1 read(3, t: armv4l: armv3l\narch_compat: a..., 8192) = 3260 poll([{fd=3, events=POLLIN, revents=POLLIN}], 1, 1000) = 1 . If it's indeed the case that the shell crashes, something is seriously wrong with your operating system. I would be surprised if it was something wrong with the OS at is a brand spanking new install. In fact, I installed it specifically in order to build python2.4 on RHEL4 x64 so I can then install the rpm pkg on my production x64 server (I only managed to find precompiled i386 binaries for RHEL4). Is it possible I'm missing some libraries somewhere? I don't know if there is any way I can complete the rpm build manually? I've looked at the SPEC file, but don't see anything particularly special in there, nor am I sure how I can modify this rpm-tmp script that it runs to skip that line and see if it can continue without it. (Am not very well versed with building srpms). Any ideas what I can do/try next? Thanks, Eric ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
[Python-Dev] No __bases__ in dir()
Hi! My head crashed into this: class C(object): ...: pass ...: dir(C) ['__class__', ...] C.__bases__ (type 'object',) Why __bases__ does not appear in dir()? Is there a good reason for this or should I file a bug? Thanks! -- .Facundo Blog: http://www.taniquetil.com.ar/plog/ PyAr: http://www.python.org/ar/ ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] No __bases__ in dir()
Why __bases__ does not appear in dir()? Is there a good reason for this or should I file a bug? __bases__ and several other methods like mro and __subclasses__ are defined on the meta class. dir() doesn't list the attributes of the meta class of a class. class C(object): ... pass ... dir(type(C)) ['__base__', '__bases__', '__basicsize__', '__call__', '__class__', '__cmp__', '__delattr__', '__dict__', '__dictoffset__', '__doc__', '__flags__', '__getattribute__', '__hash__', '__init__', '__itemsize__', '__module__', '__mro__', '__name__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__str__', '__subclasses__', '__weakrefoffset__', 'mro'] Christian ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] No __bases__ in dir()
This is because dir() special-cases classes, isn't it? On Sat, Mar 15, 2008 at 11:09 AM, Christian Heimes [EMAIL PROTECTED] wrote: Why __bases__ does not appear in dir()? Is there a good reason for this or should I file a bug? __bases__ and several other methods like mro and __subclasses__ are defined on the meta class. dir() doesn't list the attributes of the meta class of a class. class C(object): ... pass ... dir(type(C)) ['__base__', '__bases__', '__basicsize__', '__call__', '__class__', '__cmp__', '__delattr__', '__dict__', '__dictoffset__', '__doc__', '__flags__', '__getattribute__', '__hash__', '__init__', '__itemsize__', '__module__', '__mro__', '__name__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__str__', '__subclasses__', '__weakrefoffset__', 'mro'] Christian ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/guido%40python.org -- --Guido van Rossum (home page: http://www.python.org/~guido/) ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Problems building python2.4 SRPM on RHEL4 x64
I appologize if this is not the right place to post this, but searching through the old archives, I ran across the same issue from 3 years ago, but I cannot find the resolution to it. Currently, I am trying to build the python2.4 SRPM from Python.org on a CentOS4.6_x64 platform, but the build is failing with a very non-descript error message. + cd /var/tmp/python2.4-2.4-root/usr/bin + mv -f pydoc pydoc2.4 + cd /var/tmp/python2.4-2.4-root/usr/bin + mv -f idle idle2.4 + echo '#!/bin/bash' + echo 'exec /usr/bin/python2.4 /usr/lib64/python2.4/idlelib/idle.py' + chmod 755 /var/tmp/python2.4-2.4-root/usr/bin/idle2.4 + cp -a Tools /var/tmp/python2.4-2.4-root/usr/lib64/python2.4 + rm -f mainpkg.files + find /var/tmp/python2.4-2.4-root/usr/lib64/python2.4/lib-dynload -type f + sed 's|^/var/tmp/python2.4-2.4-root|/|' + grep -v -e '_tkinter.so$' error: Bad exit status from /var/tmp/rpm-tmp.55639 (%install) The last command executed imediately before the error output seems to be find $RPM_BUILD_ROOT%{__prefix}/%{libdirname}/python%{libvers}/lib-dynload -type f | sed s|^${RPM_BUILD_ROOT}|/| | grep -v -e '_tkinter.so$' mainpkg.files That is not the last command in the %install script (atleast not according to the spec file). So it is not at all clear why the shell should stop executing at that point, and spit out that error message. I've done a little more debugging to try to determine where the problem lies and ran across some interesting things. 1) I first edited the SPECS file and commented out the find $RPM_BUILD_ROOT%{__prefix}/%{libdirname}/python%{libvers}/lib-dynload -type f | sed s|^${RPM_BUILD_ROOT}|/| | grep -v -e '_tkinter.so$' mainpkg.files line. If I remove this line, the rpmbuild no longer crashes, but does still fail, citing missing files in the lib64 directories. + rm -f /tmp/python-rpm-files.4859 + /usr/lib/rpm/brp-compress + /usr/lib/rpm/brp-strip + /usr/lib/rpm/brp-strip-static-archive + /usr/lib/rpm/brp-strip-comment-note Processing files: python2.4-2.4-1pydotorg error: File not found by glob: /var/tmp/python2.4-2.4-root/usr/lib64/python2.4/*.txt error: File not found by glob: /var/tmp/python2.4-2.4-root/usr/lib64/python2.4/*.py* error: File not found: /var/tmp/python2.4-2.4-root/usr/lib64/python2.4/pdb.doc error: File not found: /var/tmp/python2.4-2.4-root/usr/lib64/python2.4/profile.doc error: File not found: /var/tmp/python2.4-2.4-root/usr/lib64/python2.4/curses error: File not found: /var/tmp/python2.4-2.4-root/usr/lib64/python2.4/distutils error: File not found: /var/tmp/python2.4-2.4-root/usr/lib64/python2.4/encodings error: File not found: /var/tmp/python2.4-2.4-root/usr/lib64/python2.4/plat-linux2 error: File not found: /var/tmp/python2.4-2.4-root/usr/lib64/python2.4/site-packages error: File not found: /var/tmp/python2.4-2.4-root/usr/lib64/python2.4/test error: File not found: /var/tmp/python2.4-2.4-root/usr/lib64/python2.4/xml error: File not found: /var/tmp/python2.4-2.4-root/usr/lib64/python2.4/email error: File not found: /var/tmp/python2.4-2.4-root/usr/lib64/python2.4/compiler error: File not found: /var/tmp/python2.4-2.4-root/usr/lib64/python2.4/bsddb error: File not found: /var/tmp/python2.4-2.4-root/usr/lib64/python2.4/hotshot error: File not found: /var/tmp/python2.4-2.4-root/usr/lib64/python2.4/logging error: File not found: /var/tmp/python2.4-2.4-root/usr/lib64/python2.4/lib-old Executing(%doc): /bin/sh -e /var/tmp/rpm-tmp.95118 + umask 022 + cd /usr/src/redhat/BUILD + cd Python-2.4 + DOCDIR=/var/tmp/python2.4-2.4-root/usr/share/doc/python2.4-2.4 + export DOCDIR + rm -rf /var/tmp/python2.4-2.4-root/usr/share/doc/python2.4-2.4 + /bin/mkdir -p /var/tmp/python2.4-2.4-root/usr/share/doc/python2.4-2.4 + cp -pr Misc/README Misc/cheatsheet Misc/Porting /var/tmp/python2.4-2.4-root/usr/share/doc/python2.4-2.4 + cp -pr LICENSE Misc/ACKS Misc/HISTORY Misc/NEWS /var/tmp/python2.4-2.4-root/usr/share/doc/python2.4-2.4 + exit 0 Processing files: python2.4-devel-2.4-1pydotorg error: File not found: /var/tmp/python2.4-2.4-root/usr/lib64/python2.4/config Processing files: python2.4-tools-2.4-1pydotorg Requires(rpmlib): rpmlib(CompressedFileNames) = 3.0.4-1 rpmlib(PayloadFilesHavePrefix) = 4.0-1 rpmlib(VersionedDependencies) = 3.0.3-1 Requires: /bin/bash /bin/sh /usr/bin/env 2) If I run the same find command in the /var/tmp/python2.4-2.4-root/usr/lib/python2.4/lib-dynload (instead of the lib64 directory), then I find a whole bunch of files, whereas the lib64/ directory returns no files. It seems as though the make script is either installing files in the wrong location, or the SPECS is expecting files in the lib64/ directory when instead they are in the lib/ directory. Anyone have any ideas? Thanks, Eric ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe:
Re: [Python-Dev] No __bases__ in dir()
Guido van Rossum wrote: This is because dir() special-cases classes, isn't it? Avoiding infinite recursion in dir(type) might be fun if that special case was removed without due care and attention... Cheers, Nick. -- Nick Coghlan | [EMAIL PROTECTED] | Brisbane, Australia --- http://www.boredomandlaziness.org ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] [Python-checkins] r61403 - python/trunk/Misc/NEWS
skip.montanaro wrote: Author: skip.montanaro Date: Sat Mar 15 17:07:11 2008 New Revision: 61403 Modified: python/trunk/Misc/NEWS Log: . Modified: python/trunk/Misc/NEWS == --- python/trunk/Misc/NEWS(original) +++ python/trunk/Misc/NEWSSat Mar 15 17:07:11 2008 @@ -21,6 +21,10 @@ Library --- +- Issue #1158: add %f format (fractions of a second represented as + microseconds) to datetime objects. Understood by both strptime and + strftime. %f makes me think femtoseconds :) Any particular reason we can't use '%u' to align with the convention of abbreviating microseconds as 'us' when a character encoding doesn't provide convenient access to the Greek letter mu? (e.g. ASCII) Cheers, Nick. -- Nick Coghlan | [EMAIL PROTECTED] | Brisbane, Australia --- http://www.boredomandlaziness.org ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] [Python-checkins] r61403 - python/trunk/Misc/NEWS
Nick %f makes me think femtoseconds :) Not fraction? Nick Any particular reason we can't use '%u' to align with the Nick convention of abbreviating microseconds as 'us' when a character Nick encoding doesn't provide convenient access to the Greek letter mu? Nick (e.g. ASCII) Well, %u is already in use by at least some implementations of strftime. From the Solaris 10 man page: %u Weekday as a decimal number [1,7], with 1 representing Monday. See NOTES below. I see the same on my Mac. I think it's better to use the same format code for both parsing and formatting if possible. Skip ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] No __bases__ in dir()
On Sat, Mar 15, 2008 at 1:11 PM, Nick Coghlan [EMAIL PROTECTED] wrote: Guido van Rossum wrote: This is because dir() special-cases classes, isn't it? Avoiding infinite recursion in dir(type) might be fun if that special case was removed without due care and attention... I wasn't suggeting removing the special-casing -- rather I was explaining the observed behavior. In Py3k, dir() will allow any class to makes its instances special cases by defining __dir__(). -- --Guido van Rossum (home page: http://www.python.org/~guido/) ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
[Python-Dev] difference between diff string implementations
This inconsistency goes back to 2.3 at least and probably to the initial unicode implementation. set(dir(u'')) - set(dir('')) ['isnumeric', 'isdecimal'] UserString contains these two methods even though 8-bit strings do not. I'm not sure what we should do for 2.6 or 3.0. My preference would be to remove these methods on unicode/UserString if they aren't useful to a large audience. However, removing for 2.6 without a deprecation seems bad. Suggestions? n ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] difference between diff string implementations
On Sat, Mar 15, 2008 at 5:54 PM, Neal Norwitz [EMAIL PROTECTED] wrote: This inconsistency goes back to 2.3 at least and probably to the initial unicode implementation. set(dir(u'')) - set(dir('')) ['isnumeric', 'isdecimal'] UserString contains these two methods even though 8-bit strings do not. I'm not sure what we should do for 2.6 or 3.0. My preference would be to remove these methods on unicode/UserString if they aren't useful to a large audience. However, removing for 2.6 without a deprecation seems bad. Suggestions? It looks like they all denote different character classes though. I'd be inclined to keep the status quo in 2.6; the inconsistency will disappear in 3.0 (I don't think we need to add them to bytes). They should be documented though. -- --Guido van Rossum (home page: http://www.python.org/~guido/) ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com