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

Attempt to implement replacement for using select.poll on macosx #333

Merged
merged 10 commits into from
Sep 3, 2019
Merged

Attempt to implement replacement for using select.poll on macosx #333

merged 10 commits into from
Sep 3, 2019

Conversation

fizyk
Copy link
Member

@fizyk fizyk commented Sep 2, 2019

With using select.select

import re
import select
from typing import Union, List, Any, TypeVar, Tuple, IO

from mirakuru.base import SimpleExecutor


IS_DARWIN = platform.system()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing comparison?

@mmaslowskicc
Copy link
Contributor

Can we reliably detect if poll is available? (I remember experiencing some issues with maybe gevent hiding it.)

@fizyk
Copy link
Member Author

fizyk commented Sep 2, 2019

@mmaslowskicc It appears to be dependand of the compiler used for macos, if it's gcc, then the poll is available, and the simplest test would be to check for the poll function in select module. (we won't be able to test that on travis though - hence I'm looking for the platform name instead)

@coveralls
Copy link

coveralls commented Sep 2, 2019

Coverage Status

Coverage decreased (-1.08%) to 82.878% when pulling 98118b8 on fizyk:issue-331 into 4a503ce on ClearcodeHQ:master.

@mmaslowskicc
Copy link
Contributor

Or we could support choosing any implementation at runtime, and tests would check both. Your approach is ok too, it might fix the problem and keeps the code tested.

@fizyk fizyk merged commit 8c4c5d1 into ClearcodeHQ:master Sep 3, 2019
@fizyk fizyk deleted the issue-331 branch September 3, 2019 14:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants