Skip to content
This repository has been archived by the owner on Jan 18, 2021. It is now read-only.

support Python 3 #3

Merged
merged 1 commit into from
Nov 24, 2015
Merged

support Python 3 #3

merged 1 commit into from
Nov 24, 2015

Conversation

rjw57
Copy link
Contributor

@rjw57 rjw57 commented Jul 1, 2015

Add a little try/except block to support Python 3's re-naming of Queue to queue.

We try to import the modern module name first and fall back to Queue on
ImportError. This ordering is chosen a) if a modern queue module is provided as
a backport or monkey patch[1] this ordering will pick it up and b) trying to be
Python 3 "first" makes one feel all moral, etc :).

[1] cf the "future" library

Add a little try/except block to support Python 3's re-naming of Queue to queue.

We try to import the modern module name first and fall back to Queue on
ImportError. This ordering is chosen a) if a modern queue module is provided as
a backport or monkey patch[1] this ordering will pick it up and b) trying to be
Python 3 "first" makes one feel all moral, etc :).

[1] cf the "future" library
@dashawn888 dashawn888 merged commit 72ae3eb into palantir:master Nov 24, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants