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

test for broken poll at runtime #43227

Closed
ronaldoussoren opened this issue Apr 17, 2006 · 6 comments
Closed

test for broken poll at runtime #43227

ronaldoussoren opened this issue Apr 17, 2006 · 6 comments
Assignees
Labels
extension-modules C modules in the Modules dir

Comments

@ronaldoussoren
Copy link
Contributor

BPO 1471761
Nosy @loewis, @ronaldoussoren
Files
  • broken-poll-at-runtime.patch: version 2
  • broken-poll-at-runtime-2.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 = 'https://github.com/ronaldoussoren'
    closed_at = <Date 2006-04-23.12:36:45.000>
    created_at = <Date 2006-04-17.14:25:41.000>
    labels = ['extension-modules']
    title = 'test for broken poll at runtime'
    updated_at = <Date 2006-04-23.12:36:45.000>
    user = 'https://github.com/ronaldoussoren'

    bugs.python.org fields:

    activity = <Date 2006-04-23.12:36:45.000>
    actor = 'ronaldoussoren'
    assignee = 'ronaldoussoren'
    closed = True
    closed_date = None
    closer = None
    components = ['Extension Modules']
    creation = <Date 2006-04-17.14:25:41.000>
    creator = 'ronaldoussoren'
    dependencies = []
    files = ['7168', '7169']
    hgrepos = []
    issue_num = 1471761
    keywords = ['patch']
    message_count = 6.0
    messages = ['50030', '50031', '50032', '50033', '50034', '50035']
    nosy_count = 2.0
    nosy_names = ['loewis', 'ronaldoussoren']
    pr_nums = []
    priority = 'normal'
    resolution = 'accepted'
    stage = None
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue1471761'
    versions = ['Python 2.5']

    @ronaldoussoren
    Copy link
    Contributor Author

    This patch moves the test for a broken poll() implementation from
    configure-time to runtime.

    The reason for creating this patch is that we'd like to have one python
    binary for OSX 10.3 and later. OSX 10.3 has a broken version of poll,
    while 10.4 doesn't. With this patch you'll have select.poll when it is
    available and working indepent of the version of the OS where python was
    build.

    @ronaldoussoren ronaldoussoren self-assigned this Apr 17, 2006
    @ronaldoussoren ronaldoussoren added the extension-modules C modules in the Modules dir label Apr 17, 2006
    @ronaldoussoren ronaldoussoren self-assigned this Apr 17, 2006
    @ronaldoussoren ronaldoussoren added the extension-modules C modules in the Modules dir label Apr 17, 2006
    @ronaldoussoren
    Copy link
    Contributor Author

    Logged In: YES
    user_id=580910

    I've uploaded a new version of the patch, and removed the earlier one, because
    the first version also contained an unrelated patch.

    Also note that this patch updates configure.in, hence autoconf should be run
    before checking it in.

    And finally: the original author of this patch is Bob Ipollito (etrepum), I've
    harvested this from the python24-fat tree.

    @loewis
    Copy link
    Mannequin

    loewis mannequin commented Apr 17, 2006

    Logged In: YES
    user_id=21627

    I'm -1 for this patch in its current form. Python shouldn't
    perform "unnecessary" system calls, even if they are as
    cheap as creating a pipe.

    It's fine that you want to use the same binary across OSX
    releases; please rewrite the patch to be Mac-specific:
    Always run the configure test for a broken poll, but ignore
    its outcome on OSX. The easiest way to achieve this on top
    of your current patch might be the following:

    • #undef HAVE_BROKEN_POLL on OSX in selectmodule.c
    • implement select_have_broken_poll to return 0 (i.e. just
      the last statement) on anything but OSX.

    @ronaldoussoren
    Copy link
    Contributor Author

    Logged In: YES
    user_id=580910

    I don't quite understand why runtime testing is considered bad here, although I
    guess the time used by a lot of runtime tests could add up.

    But anyway, broken-poll-at-runtime-2.patch implements your suggestion.

    @loewis
    Copy link
    Mannequin

    loewis mannequin commented Apr 20, 2006

    Logged In: YES
    user_id=21627

    The patch is fine. Please apply. When done, please leave the
    subversion revision number here, and close the patch.

    @ronaldoussoren
    Copy link
    Contributor Author

    Logged In: YES
    user_id=580910

    Commited as revision 45661

    @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
    extension-modules C modules in the Modules dir
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant