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

Add selectors module to gunicorn codebase. #909

Merged
merged 1 commit into from
Oct 16, 2014
Merged

Add selectors module to gunicorn codebase. #909

merged 1 commit into from
Oct 16, 2014

Conversation

berkerpeksag
Copy link
Collaborator

Closes #886.

@benoitc
Copy link
Owner

benoitc commented Oct 9, 2014

Thanks! That will help a lot to solve #792 and #872.

I wonder since the module is only needed on py26 we could make it optional and import it only if it missing. What do you think?

@berkerpeksag
Copy link
Collaborator Author

If I remember correctly, this module is only not needed on Python 3.4+. But, yes we can use it like the following pattern:

try:
    import selectors  # for Python 3.4+
except ImportError:
    import gunicorn.selectors as selectors

@benoitc
Copy link
Owner

benoitc commented Oct 11, 2014

@berkerpeksag yup this wht I meant, though I would also rename _selectors . ANyway +1 for the merge :)

@georgexsh
Copy link
Contributor

@berkerpeksag It would be great if this selector module released as a standalone package.

@benoitc
Copy link
Owner

benoitc commented Oct 16, 2014

LGTM, let's merge it imo. (Quite excited to use it as a base for other features)

About having in another module, I am not sure. We could probably have a gunicorn-selectors module. On the other hand it's really part of our core. IMO that's OK to keep it there.

@berkerpeksag
Copy link
Collaborator Author

Do I need to update NOTICE file before merge?

@berkerpeksag berkerpeksag merged commit bf3ef8f into benoitc:master Oct 16, 2014
@berkerpeksag berkerpeksag deleted the selectors branch October 16, 2014 12:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

import selectors inside Gunicorn
3 participants