This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: dir(__future__) gives segfault on OS X in 3.2 and 3.3
Type: crash Stage: resolved
Components: macOS Versions: Python 3.2, Python 3.3
process
Status: closed Resolution: duplicate
Dependencies: Superseder: python.org Interactive interpreter linked with libedit can segfault on future OS X
View: 18289
Assigned To: ronaldoussoren Nosy List: christopherthemagnificent, hynek, ned.deily, ronaldoussoren, vstinner
Priority: normal Keywords:

Created on 2014-01-22 15:57 by christopherthemagnificent, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (3)
msg208819 - (view) Author: Christopher the Magnificent (christopherthemagnificent) Date: 2014-01-22 15:57
On OS X 10.9.1
This works:

Python 2.7.5 (default, Aug 25 2013, 00:04:04) 
[GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import __future__
>>> dir(__future__)
['CO_FUTURE_ABSOLUTE_IMPORT', 'CO_FUTURE_DIVISION', 'CO_FUTURE_PRINT_FUNCTION', 'CO_FUTURE_UNICODE_LITERALS', 'CO_FUTURE_WITH_STATEMENT', 'CO_GENERATOR_ALLOWED', 'CO_NESTED', '_Feature', '__all__', '__builtins__', '__doc__', '__file__', '__name__', '__package__', 'absolute_import', 'all_feature_names', 'division', 'generators', 'nested_scopes', 'print_function', 'unicode_literals', 'with_statement']

This also works:

Python 3.1 (r31:73578, Jun 27 2009, 21:49:46) 
[GCC 4.0.1 (Apple Inc. build 5493)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import __future__
>>> dir(__future__)
['CO_FUTURE_ABSOLUTE_IMPORT', 'CO_FUTURE_BARRY_AS_BDFL', 'CO_FUTURE_DIVISION', 'CO_FUTURE_PRINT_FUNCTION', 'CO_FUTURE_UNICODE_LITERALS', 'CO_FUTURE_WITH_STATEMENT', 'CO_GENERATOR_ALLOWED', 'CO_NESTED', '_Feature', '__all__', '__builtins__', '__doc__', '__file__', '__name__', '__package__', 'absolute_import', 'all_feature_names', 'barry_as_FLUFL', 'division', 'generators', 'nested_scopes', 'print_function', 'unicode_literals', 'with_statement']


In Python 3.2 and 3.3 it appears broken.

Python 3.2.2 (v3.2.2:137e45f15c0b, Sep  3 2011, 17:28:59) 
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import __future__
>>> dir(__future__)
Segmentation fault: 11

also

Python 3.3.0 (v3.3.0:bd8afb90ebf2, Sep 29 2012, 01:25:11) 
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import __future__
>>> dir(__future__)
Segmentation fault: 11
msg208820 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2014-01-22 16:00
> Python 2.7.5 (default, Aug 25 2013, 00:04:04) 

You should try the version 2.7.6 which contains a fix for OS X 10.9:
http://www.python.org/download/releases/2.7.6/
msg208822 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2014-01-22 16:30
This is a duplicate of Issue18458. The crash is caused by an incompatible change introduced in OS X 10.9 to the Apple-supplied version of libedit's readline compatibility layer and can affect Python versions that dynamically link with the system libedit (not all do).  Fixes for the problem were released with Python 2.7.6 and 3.3.3, and found in the latest binary installers for OS X on python.org. Bug fixes for Python 3.2.x are no longer being produced, only security fixes.  However, it *might* be possible to workaround the issue for 3.2 by installing the third-party deadline package from PyPI (https://pypi.python.org/pypi/readline).
History
Date User Action Args
2022-04-11 14:57:57adminsetgithub: 64546
2014-01-22 16:30:17ned.deilysetassignee: ronaldoussoren
messages: + msg208822
2014-01-22 16:29:34r.david.murraysetstatus: open -> closed
assignee: ronaldoussoren -> (no value)
superseder: python.org Interactive interpreter linked with libedit can segfault on future OS X
resolution: duplicate
stage: resolved
2014-01-22 16:00:05vstinnersetnosy: + hynek, ned.deily, vstinner
messages: + msg208820
2014-01-22 15:57:30christopherthemagnificentcreate