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

Correct RequestSequence response tuple type docs #237

Merged
merged 2 commits into from
Jun 3, 2019

Conversation

twm
Copy link
Contributor

@twm twm commented Mar 6, 2019

The header value is passed to IRequest.setHeader() which accepts strings, not lists of strings.

The header value is passed to IRequest.setHeader() which accepts
strings, not lists of strings.
@codecov
Copy link

codecov bot commented Mar 6, 2019

Codecov Report

Merging #237 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #237   +/-   ##
=======================================
  Coverage   98.86%   98.86%           
=======================================
  Files          26       26           
  Lines        2285     2285           
  Branches      165      165           
=======================================
  Hits         2259     2259           
  Misses         14       14           
  Partials       12       12
Impacted Files Coverage Δ
src/treq/testing.py 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 eeb4d62...84f1c81. Read the comment docs.

@twm twm requested a review from a team March 7, 2019 05:34
@@ -402,7 +402,7 @@ class RequestSequence(object):

- ``code`` is an integer representing the HTTP status code to return.
- ``headers`` is a dictionary mapping :class:`bytes` to :class:`bytes` or
:class:`list` of :class:`bytes`.
:class:`str`. Note that the value is *not* a list.
Copy link
Member

Choose a reason for hiding this comment

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

What is the format for header items with multiple values?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

They cannot be represented in this API. :-/ You could send the semantic equivalent with a comma... *mumble mumble cookies*...

Copy link
Member

Choose a reason for hiding this comment

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

Ouch. Okay.

Copy link
Member

@exarkun exarkun left a comment

Choose a reason for hiding this comment

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

Thanks. I wasn't able to track the usage of headers all the way through the code to verify the type but I'm guessing you did that already. I looked at some other recently accepted PRs to see if there are other contribution requirements to satisfy but I didn't see any. So, approved.

@twm
Copy link
Contributor Author

twm commented Jun 3, 2019

Thank you for the review, @exarkun!

@twm twm merged commit 86cca01 into twisted:master Jun 3, 2019
@twm twm deleted the testing-response-headers-docs branch June 3, 2019 22:51
twm added a commit to twm/treq that referenced this pull request Mar 15, 2020
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

2 participants