
I just cvsup'd and now get this traceback when executing setup.py (no matter which command I try): /usr/local/lib/python2.3/pre.py:94: DeprecationWarning: Please use the 're' module, not the 'pre' module DeprecationWarning) Traceback (most recent call last): File "setup.py", line 129, in ? install_package() File "setup.py", line 95, in install_package config.extend([get_package_config(x,parent_package)for x in standard_packages]) File "setup.py", line 45, in get_package_config config = mod.configuration(parent) File "linalg/setup_linalg.py", line 33, in configuration atlas_info = get_info('atlas') File "scipy_distutils/system_info.py", line 127, in get_info return cl().get_info() File "scipy_distutils/system_info.py", line 224, in __init__ assert type(self.search_static_first) is type(0) AssertionError Anyone else seeing this? I'm running on Mandrake 8.1 with Python CVS. Skip

On Mon, 30 Sep 2002, Skip Montanaro wrote:
I just cvsup'd and now get this traceback when executing setup.py (no matter which command I try):
/usr/local/lib/python2.3/pre.py:94: DeprecationWarning: Please use the 're' module, not the 'pre' module DeprecationWarning) Traceback (most recent call last): File "setup.py", line 129, in ? install_package() File "setup.py", line 95, in install_package config.extend([get_package_config(x,parent_package)for x in standard_packages]) File "setup.py", line 45, in get_package_config config = mod.configuration(parent) File "linalg/setup_linalg.py", line 33, in configuration atlas_info = get_info('atlas') File "scipy_distutils/system_info.py", line 127, in get_info return cl().get_info() File "scipy_distutils/system_info.py", line 224, in __init__ assert type(self.search_static_first) is type(0) AssertionError
Anyone else seeing this? I'm running on Mandrake 8.1 with Python CVS.
It must be related to the changes in ConfigParser of Python 2.3 compared to earlier Python versions. Note that it may not be safe to just remove this assertion. It really depends what is the output ConfigParser.getboolean. If it is int or bool, then change the assert statement to assert isinstance(self.search_static_first,int) But if it is a string, for example, '0' or '1', then removing the assert statement will lead to incorrect results because self.search_static_first is later used as if self.search_static_first: #do staff 1 else: #do staff 2 and #do staff 1 is executed even if self.search_static_first=='0'. Hmm, the result of ConfigParser.getboolean could be also None... So, could you check what is the type/value of self.search_static_first in your case? Pearu

Pearu> So, could you check what is the type/value of Pearu> self.search_static_first in your case? Does this tell you what you need to know? % python Python 2.3a0 (#90, Sep 28 2002, 09:08:31) [GCC 2.96 20000731 (Mandrake Linux 8.1 2.96-0.62mdk)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import ConfigParser >>> cp = ConfigParser.ConfigParser() >>> cp.read("dummy.ini") >>> cp.getboolean("Tokenizer", "mine_received_headers") False The file dummy.ini has a section named "Tokenizer" that contains a boolean option named "mine_received_headers". Looks like in 2.3 .getboolean() returns booleans. Also, note that since booleans are a subclass of ints, your assert could be coded as assert isinstance(self.search_static_first, int) Skip
participants (2)
-
Pearu Peterson
-
Skip Montanaro