Skip to content

Rename STATUS_IGNORED to TASK_STATUS_IGNORED - #353

Merged
njsmith merged 1 commit into
python-trio:masterfrom
njsmith:status-ignored-is-bugging-me
Dec 6, 2017
Merged

njsmith merged 1 commit into
python-trio:masterfrom
njsmith:status-ignored-is-bugging-me

Conversation

@njsmith

@njsmith njsmith commented Nov 28, 2017

Copy link
Copy Markdown
Member

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

njsmith commented Nov 28, 2017

Copy link
Copy Markdown
Member Author

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

@codecov

codecov Bot commented Nov 28, 2017

Copy link
Copy Markdown

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

njsmith commented Nov 28, 2017

Copy link
Copy Markdown
Member Author

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