Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PATCH] msvc9compiler raises IOError when no compiler found instead of DistutilsError #48952

Closed
pjenvey opened this issue Dec 19, 2008 · 3 comments
Assignees
Labels
stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error

Comments

@pjenvey
Copy link
Member

pjenvey commented Dec 19, 2008

BPO 4702
Nosy @amauryfa, @pjenvey, @tarekziade
Files
  • msvc9_ioerror.diff
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = 'https://github.com/tarekziade'
    closed_at = <Date 2008-12-30.23:11:44.828>
    created_at = <Date 2008-12-19.21:33:08.278>
    labels = ['type-bug', 'library']
    title = '[PATCH] msvc9compiler raises IOError when no compiler found instead of DistutilsError'
    updated_at = <Date 2008-12-30.23:11:44.800>
    user = 'https://github.com/pjenvey'

    bugs.python.org fields:

    activity = <Date 2008-12-30.23:11:44.800>
    actor = 'tarek'
    assignee = 'tarek'
    closed = True
    closed_date = <Date 2008-12-30.23:11:44.828>
    closer = 'tarek'
    components = ['Distutils']
    creation = <Date 2008-12-19.21:33:08.278>
    creator = 'pjenvey'
    dependencies = []
    files = ['12404']
    hgrepos = []
    issue_num = 4702
    keywords = ['patch']
    message_count = 3.0
    messages = ['78070', '78075', '78565']
    nosy_count = 3.0
    nosy_names = ['amaury.forgeotdarc', 'pjenvey', 'tarek']
    pr_nums = []
    priority = 'normal'
    resolution = 'accepted'
    stage = 'patch review'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue4702'
    versions = ['Python 2.6', 'Python 3.0', 'Python 3.1', 'Python 2.7']

    @pjenvey
    Copy link
    Member Author

    pjenvey commented Dec 19, 2008

    Python 2.6's new msvc9compiler misbehaves when it can't find a compiler
    (actually a utility of the missing compiler) in its query_vcvarsall() --
    it raises an IOError instead of a typical distutils error

    build tools expect a consistent set of potential exceptions from the
    compiler suites, such as CCompilerError, DistutilsExecError,
    DistutilsPlatformError, etc. Distributions like simplejson, Genshi, etc.
    look for these errors when compiling their optional C extension speedups
    as an indication that there's no compiler, and to fallback to their pure
    python counterparts

    An IOError in this case just doesn't make sense

    This patch changes them to DistutilsExecErrors. Maybe it should be
    DistutilsPlatformError -- whatever, just not IOError

    I think this should be included in 2.6.2

    @pjenvey pjenvey added stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error labels Dec 19, 2008
    @amauryfa
    Copy link
    Member

    I agree with the patch, except that DistutilsPlatformError seems more
    appropriate - this function is called when the compiler object is
    configured, before it is used to actually compile files.

    @tarekziade tarekziade mannequin self-assigned this Dec 30, 2008
    @tarekziade
    Copy link
    Mannequin

    tarekziade mannequin commented Dec 30, 2008

    Fixed, thanks for the patch Philip,

    @tarekziade tarekziade mannequin closed this as completed Dec 30, 2008
    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants