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

minor grammar and syntax fixes #148

Merged
merged 4 commits into from
Jan 3, 2017
Merged

Conversation

stevepiercy
Copy link
Member

No description provided.

@stevepiercy
Copy link
Member Author

ref: Pylons/pyramid#2889 (review)


Waitress will set a ``Content-Length`` header on the behalf of an application
when a file wrapper with a sufficiently filelike object is used if the
when a file wrapper with a sufficient ``filelike_object`` is used if the
Copy link
Member

Choose a reason for hiding this comment

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

Why did you change it to filelike_object? That's not correct here.

Copy link
Member Author

Choose a reason for hiding this comment

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

I thought it was a typo. I'll change it to "sufficiently file-like object".

application hasn't already set one.

The machinery which handles a file wrapper currently doesn't do anything
particularly special using fancy system calls (it doesn't use ``sendfile``
for example); using it currently just prevents the system from needing to
copy data to a temporary buffer in order to send it to the client. No
copying of data is done when a WSGI app returns a file wrapper that wraps a
sufficiently filelike object. It may do something fancier in the future.
sufficient ``filelike_object``. It may do something fancier in the future.
Copy link
Member

Choose a reason for hiding this comment

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

filelike object here is a general term to describe an object that is file like, filelike_object refers to a single instance of said object.

"wraps a sufficient filelike_object" is wrong, because we are not wrapping a filelike_object, we are wrapping an object that happens to behave and look like a Python file.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ditto.

filelike object using the provided block_size is used (and copying is done,
negating any benefit of the file wrapper). It *should* support a ``close()``
method.
``filelike_object`` using the provided ``block_size`` is used (and copying is
Copy link
Member

Choose a reason for hiding this comment

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

It's fine to keep this filelike_object

Copy link
Member Author

Choose a reason for hiding this comment

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

"filelike object" is wrong. It should be either "file-like object" when used in plain old English or "filelike_object" when referring to programming language.

In this instance, the latter is seems more contextually appropriate to me, since it aligns with block_size

@digitalresistor digitalresistor merged commit 9ecb4b9 into Pylons:master Jan 3, 2017
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