This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: test_os.TestSendfile.test_keywords() introduced a regression
Type: behavior Stage: resolved
Components: Tests Versions: Python 3.6, Python 3.4, Python 3.5
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: berker.peksag, martin.panter, vstinner
Priority: normal Keywords:

Created on 2015-09-09 06:56 by vstinner, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (4)
msg250292 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2015-09-09 06:56
The change e42e2bd47168 introduced a regression, test_os started to fail on FreeBSD. What is the rationale of the change? For example, test_os pass in the previous build on the same buildbot.

I don't know if it makes sense to pass None to headers and/or trailers.

Please revert the change or fix the test. ((But we must continue to test headers=None and trailers=None, even if these parameters now raise a TypeError).

======================================================================
ERROR: test_keywords (test.test_os.TestSendfile)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/test/test_os.py", line 2334, in test_keywords
    headers=None, trailers=None, flags=0)
TypeError: sendfile() headers must be a sequence or None
msg250294 - (view) Author: Martin Panter (martin.panter) * (Python committer) Date: 2015-09-09 07:07
I believe revision e42e2bd47168 is actually the cure, and test failure is actually caused by a new test I added in revision fdb5d84f9948. So hopefully things are fixed now, but I will keep an eye on the buildbots.

In fdb5d84f9948, I originally added the test_keywords() test to ensure the correct parameter name of “count” to sendfile().

Neither headers=None nor trailers=None were ever supported. It is just that the documentation and error messages which mislead me to write that test.
msg250433 - (view) Author: Martin Panter (martin.panter) * (Python committer) Date: 2015-09-11 01:26
Victor, the BSD and OS X buildbots seem to be passing test_os now. E.g.:

http://buildbot.python.org/all/buildslaves/koobs-freebsd10
http://buildbot.python.org/all/buildslaves/intel-yosemite-icc

Do you agree we can close this?
msg250452 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2015-09-11 05:51
Sure, close the issue if the regression is fixed.
History
Date User Action Args
2022-04-11 14:58:20adminsetgithub: 69226
2015-09-11 09:58:18martin.pantersetstatus: open -> closed
type: behavior
resolution: fixed
components: + Tests
stage: resolved
2015-09-11 05:51:37vstinnersetmessages: + msg250452
2015-09-11 01:26:03martin.pantersetnosy: + berker.peksag
messages: + msg250433
2015-09-09 07:07:05martin.pantersetmessages: + msg250294
2015-09-09 06:56:50vstinnercreate