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

py3k build fails if configure --without-threads #48062

Closed
ocean-city mannequin opened this issue Sep 9, 2008 · 5 comments
Closed

py3k build fails if configure --without-threads #48062

ocean-city mannequin opened this issue Sep 9, 2008 · 5 comments
Labels
build The build process and cross-build

Comments

@ocean-city
Copy link
Mannequin

ocean-city mannequin commented Sep 9, 2008

BPO 3812
Nosy @amauryfa
Files
  • py3k_remove_itertools_from_traceback.patch
  • 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 = None
    closed_at = <Date 2008-09-09.17:55:35.645>
    created_at = <Date 2008-09-09.06:56:38.229>
    labels = ['build']
    title = 'py3k build fails if configure --without-threads'
    updated_at = <Date 2008-09-09.17:55:35.626>
    user = 'https://bugs.python.org/ocean-city'

    bugs.python.org fields:

    activity = <Date 2008-09-09.17:55:35.626>
    actor = 'ocean-city'
    assignee = 'none'
    closed = True
    closed_date = <Date 2008-09-09.17:55:35.645>
    closer = 'ocean-city'
    components = ['Build']
    creation = <Date 2008-09-09.06:56:38.229>
    creator = 'ocean-city'
    dependencies = []
    files = ['11438']
    hgrepos = []
    issue_num = 3812
    keywords = ['patch']
    message_count = 5.0
    messages = ['72823', '72825', '72856', '72870', '72890']
    nosy_count = 2.0
    nosy_names = ['amaury.forgeotdarc', 'ocean-city']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = None
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue3812'
    versions = ['Python 3.0']

    @ocean-city
    Copy link
    Mannequin Author

    ocean-city mannequin commented Sep 9, 2008

    Hello. I failed to build py3k on cygwin (configure --without-threads).
    It's because io.py imports _dummy_thread, and it imports traceback, and
    it tries to import c-module itertools which is not built yet.

    Attached file is workaround patch.

    /////////////////////////////

    Fatal Python error: Py_Initialize: can't initialize sys standard streams
    Traceback (most recent call last):
      File "/home/WhiteRabbit/python-dev/py3k/Lib/io.py", line 64, in <module>
        from _thread import allocate_lock as Lock
    ImportError: No module named _thread
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/home/WhiteRabbit/python-dev/py3k/Lib/io.py", line 66, in <module>
        from _dummy_thread import allocate_lock as Lock
      File "/home/WhiteRabbit/python-dev/py3k/Lib/_dummy_thread.py", line
    19, in <mo
    dule>
        import traceback as _traceback
      File "/home/WhiteRabbit/python-dev/py3k/Lib/traceback.py", line 6, in
    <module>
        import itertools
    ImportError: No module named itertools
    Aborted (core dumped)

    @ocean-city ocean-city mannequin added the build The build process and cross-build label Sep 9, 2008
    @ocean-city
    Copy link
    Mannequin Author

    ocean-city mannequin commented Sep 9, 2008

    Sorry, I removed workaround patch. It was not simply working.:-(

    @ocean-city
    Copy link
    Mannequin Author

    ocean-city mannequin commented Sep 9, 2008

    Simple workaround is to remove itertools from traceback module and write
    equivalent code to itertools.chain.

    I'm not sure it is acceptable put such limitation to standard library.
    (That is, traceback is used from build process, so should not use C-module)

    @amauryfa
    Copy link
    Member

    amauryfa commented Sep 9, 2008

    Agreed. I suggest that you add a comment like
    "itertools.chain is in an extension module and may be unavailable"
    just above.
    Otherwise, someday one will find that this code should use a function
    from the stdlib, and revert your change...

    Please apply it.

    @ocean-city
    Copy link
    Mannequin Author

    ocean-city mannequin commented Sep 9, 2008

    Thanks, fixed in r66340(py3k).

    @ocean-city ocean-city mannequin closed this as completed Sep 9, 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
    build The build process and cross-build
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant