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

Switch to deque LifoQueue #1356

Merged
merged 1 commit into from Apr 3, 2018
Merged

Conversation

sethmlarson
Copy link
Member

Switch to using our own LifoQueue that uses a collections.deque backend which is a lot faster than a list backend. Closes #1087.

@codecov-io
Copy link

codecov-io commented Mar 31, 2018

Codecov Report

Merging #1356 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff           @@
##           master   #1356   +/-   ##
======================================
  Coverage     100%    100%           
======================================
  Files          21      22    +1     
  Lines        2021    2030    +9     
======================================
+ Hits         2021    2030    +9
Impacted Files Coverage Δ
urllib3/connectionpool.py 100% <100%> (ø) ⬆️
urllib3/util/queue.py 100% <100%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d138a23...8e83725. Read the comment docs.

# Queue is imported for side effects on MS Windows
import Queue as _unused_module_Queue # noqa: F401
from .util.queue import LifoQueue
from .packages.six.moves import queue
Copy link
Contributor

Choose a reason for hiding this comment

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

Why did this move down here? The rest of the imports from packages live elsewhere.

Copy link
Member Author

Choose a reason for hiding this comment

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

No reason, I deleted it and upon realizing that queue.Empty was used I put it back but not in the right place. I'll fix it and amend the commit.

from ..packages.six.moves import queue

if six.PY2:
# Queue is imported for side effects on MS Windows
Copy link
Member

Choose a reason for hiding this comment

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

No kidding? Got a link that explains what these side-effects are and why they're useful?

Copy link
Member Author

Choose a reason for hiding this comment

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

Let me find the commit where that was added in the blame.

Copy link
Member Author

Choose a reason for hiding this comment

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

Found the reason and PR where this was added: #229 18e6e46
I'll add a link to it so no one has to go mucking through the enormous history log like I just did again. :)

@sethmlarson
Copy link
Member Author

Ready for re-review. :)

@sethmlarson
Copy link
Member Author

Might need an admin force merge for this one until AppVeyor is back :)

@theacodes
Copy link
Member

Hrm, is appveyor still not reporting? I'll need to look into that a bit more closely on Friday.

@theacodes theacodes merged commit 7bab7ae into urllib3:master Apr 3, 2018
@sethmlarson sethmlarson deleted the fast-queue branch March 11, 2019 23:46
Dobatymo pushed a commit to Dobatymo/urllib3 that referenced this pull request Mar 16, 2022
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.

None yet

4 participants