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

Rename STATUS_IGNORED to TASK_STATUS_IGNORED #353

Merged
merged 1 commit into from
Dec 6, 2017

Conversation

njsmith
Copy link
Member

@njsmith njsmith commented Nov 28, 2017

The asymmetry in task_status=trio.STATUS_IGNORED is bugging me too much. I
gotta change it.

What to change it to? task_status=trio.TASK_STATUS_IGNORED is kind of
long -- 36 characters -- and likely to make 80-character lines wrap.
But the old one was 31 characters, which is already likely to make
80-character lines wrap, and I haven't had any better ideas.

I don't want to make it status=STATUS_IGNORED, because then we're
claiming the kwarg "status" in every Trio server function, which seems
just a little too generic. task_status is more unique and I think
better for attaching this special convention to.

I thought about task_status=NO_TASK_STATUS, but that feels weird. It's
not that the task has no status, it's that the caller is ignoring that
status. I guess we could switch to something like
status_reporter=trio.NO_STATUS_REPORTER but that's even longer (39
characters), and not really any clearer.

The asymmetry in task_status=trio.STATUS_IGNORED is bugging me too much. I
gotta change it.

What to change it to? task_status=trio.TASK_STATUS_IGNORED is kind of
long -- 36 characters -- and likely to make 80-character lines wrap.
But the old one was 31 characters, which is already likely to make
80-character lines wrap, and I haven't had any better ideas.

I don't want to make it status=STATUS_IGNORED, because then we're
claiming the kwarg "status" in every Trio server function, which seems
just a little too generic. task_status is more unique and I think
better for attaching this special convention to.

I thought about task_status=NO_TASK_STATUS, but that feels weird. It's
not that the task has no status, it's that the caller is ignoring that
status. I guess we could switch to something like
status_reporter=trio.NO_STATUS_REPORTER but that's even *longer* (39
characters), and not really any clearer.
@njsmith
Copy link
Member Author

njsmith commented Nov 28, 2017

I guess I'll leave this open for a little while in case anyone comes up with a better suggestion.

@codecov
Copy link

codecov bot commented Nov 28, 2017

Codecov Report

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

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #353   +/-   ##
=======================================
  Coverage   99.24%   99.24%           
=======================================
  Files          87       87           
  Lines       10436    10436           
  Branches      728      728           
=======================================
  Hits        10357    10357           
  Misses         61       61           
  Partials       18       18
Impacted Files Coverage Δ
trio/_highlevel_open_tcp_listeners.py 100% <ø> (ø) ⬆️
trio/_highlevel_ssl_helpers.py 100% <ø> (ø) ⬆️
trio/_toplevel_core_reexports.py 100% <ø> (ø) ⬆️
trio/__init__.py 100% <ø> (ø) ⬆️
trio/_highlevel_serve_listeners.py 100% <ø> (ø) ⬆️
trio/tests/test_highlevel_serve_listeners.py 100% <100%> (ø) ⬆️
trio/_core/tests/test_run.py 100% <100%> (ø) ⬆️
trio/_core/_run.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 d170e9a...fbb841a. Read the comment docs.

@njsmith
Copy link
Member Author

njsmith commented Nov 28, 2017

There's some more discussion in chat starting here: https://gitter.im/python-trio/general?at=5a1ceed4e5ed52e26c98480f

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.

2 participants