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

Remove deprecated unbounded queue #2925

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

A5rocks
Copy link
Contributor

@A5rocks A5rocks commented Jan 16, 2024

Very much based off of #937; fixes #2922; should be in the next 0.x.0 release so don't merge this yet!

Copy link

codecov bot commented Jan 16, 2024

Codecov Report

Attention: 8 lines in your changes are missing coverage. Please review.

Comparison is base (0204d04) 99.64% compared to head (af71289) 99.61%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2925      +/-   ##
==========================================
- Coverage   99.64%   99.61%   -0.04%     
==========================================
  Files         116      114       -2     
  Lines       17503    17342     -161     
  Branches     3148     3123      -25     
==========================================
- Hits        17441    17275     -166     
- Misses         43       47       +4     
- Partials       19       20       +1     
Files Coverage Δ
src/trio/_core/__init__.py 100.00% <ø> (ø)
src/trio/_core/_io_windows.py 98.82% <100.00%> (+0.01%) ⬆️
src/trio/_core/_parking_lot.py 100.00% <ø> (ø)
src/trio/_core/_tests/test_windows.py 100.00% <100.00%> (ø)
src/trio/_tools/gen_exports.py 99.17% <100.00%> (ø)
src/trio/lowlevel.py 100.00% <ø> (ø)
src/trio/_core/_io_kqueue.py 83.84% <20.00%> (-3.36%) ⬇️

Also make the generation script always use unix newlines, even on
Windows
Comment on lines +27 to +28
# waitqueue), but in the future we ever start support task priorities or fair
# scheduling
Copy link
Contributor

Choose a reason for hiding this comment

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

The grammar here is a bit odd. I would change it to something like
"but in the future if we ever support task priorities or
fair scheduling it should be fairly simple."

@@ -43,7 +43,7 @@ def current_kqueue() -> select.kqueue:

def monitor_kevent(
ident: int, filter: int
) -> ContextManager[_core.UnboundedQueue[select.kevent]]:
) -> ContextManager[MemoryReceiveChannel[select.kevent]]:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Huh actually I'm just realizing this is potentially a compat break. I can work around this using a kwarg but I need to see if this currently warns or not...

Copy link
Member

Choose a reason for hiding this comment

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

Private subclass which adds the unbounded queue methods but warns if you call them?

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.

Remove UnboundedQueue
3 participants