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

Support passing stdin to getProcessOutputAndValue #9607

Closed
twisted-trac opened this issue Apr 1, 2019 · 5 comments
Closed

Support passing stdin to getProcessOutputAndValue #9607

twisted-trac opened this issue Apr 1, 2019 · 5 comments

Comments

@twisted-trac
Copy link

exarkun's avatar @exarkun reported
Trac ID trac#9607
Type enhancement
Created 2019-04-01 13:17:50Z

Sometimes you want to run a program that needs some data on standard in.

Searchable metadata
trac-id__9607 9607
type__enhancement enhancement
reporter__exarkun exarkun
priority__normal normal
milestone__None None
branch__ 
branch_author__ 
status__closed closed
resolution__fixed fixed
component__core core
keywords__None None
time__1554124670647084 1554124670647084
changetime__1554167912454719 1554167912454719
version__None None
owner__exarkun exarkun

@twisted-trac
Copy link
Author

exarkun's avatar @exarkun commented

#1118

@twisted-trac
Copy link
Author

wsanchez's avatar @wsanchez set owner to @exarkun

Reviewed. Diff looks ok to me. There are two test failures that need to get cleared up; they don't appear to be related.

@twisted-trac
Copy link
Author

exarkun's avatar @exarkun commented

Replying to Wilfredo Sánchez Vega:

Reviewed. Diff looks ok to me. There are two test failures that need to get cleared up; they don't appear to be related.

The two tests in question are twisted.test.test_main.MainTests.test_trial and twisted.test.test_main.MainTests.test_twisted. It appears these are now failing in trunk@HEAD as well. I triggered this build - https://circleci.com/gh/twisted/twisted/3303 - and the same failures appear:

===============================================================================
[FAIL]
Traceback (most recent call last):
  File "/Users/distiller/repo/build/py37-alldeps-withcov-posix/lib/python3.7/site-packages/twisted/test/test_main.py", line 61, in processEnded
    self.assertEqual(output, message)
  File "/Users/distiller/repo/build/py37-alldeps-withcov-posix/lib/python3.7/site-packages/twisted/trial/_synctest.py", line 432, in assertEqual
    super(_Assertions, self).assertEqual(first, second, msg)
  File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/unittest/case.py", line 839, in assertEqual
    assertion_func(first, second, msg=msg)
  File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/unittest/case.py", line 832, in _baseAssertEqual
    raise self.failureException(msg)
twisted.trial.unittest.FailTest: b'' != b"python3.7 -m twisted.trial [options] [[f[3525 chars]\n\n"

twisted.test.test_main.MainTests.test_trial
===============================================================================
[FAIL]
Traceback (most recent call last):
  File "/Users/distiller/repo/build/py37-alldeps-withcov-posix/lib/python3.7/site-packages/twisted/test/test_main.py", line 40, in processEnded
    self.assertEqual(output, message)
  File "/Users/distiller/repo/build/py37-alldeps-withcov-posix/lib/python3.7/site-packages/twisted/trial/_synctest.py", line 432, in assertEqual
    super(_Assertions, self).assertEqual(first, second, msg)
  File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/unittest/case.py", line 839, in assertEqual
    assertion_func(first, second, msg=msg)
  File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/unittest/case.py", line 832, in _baseAssertEqual
    raise self.failureException(msg)
twisted.trial.unittest.FailTest: b'' != b'Usage: python3.7 -m twisted [options] plu[1475 chars]\n\n'

twisted.test.test_main.MainTests.test_twisted

Additionally, the documentation job failed - http://buildbot.twistedmatrix.com/builders/documentation/builds/4327 - so I forced a build of that on trunk as well - https://buildbot.twistedmatrix.com/builders/documentation/builds/4328 - and all the same errors appear:

twisted.web._http2.H2Connection._handlePriorityUpdate: invalid ref to 'h2.events.PriorityUpdated' resolved as 'h2.events.PriorityUpdated'
twisted.web._http2.H2Connection._handleWindowUpdate: invalid ref to 'h2.events.WindowUpdated' resolved as 'h2.events.WindowUpdated'
twisted.web._http2.H2Connection._requestAborted: invalid ref to 'h2.events.StreamReset' resolved as 'h2.events.StreamReset'
twisted.web._http2.H2Connection._requestDataReceived: invalid ref to 'h2.events.DataReceived' resolved as 'h2.events.DataReceived'
twisted.web._http2.H2Connection._requestEnded: invalid ref to 'h2.events.StreamEnded' resolved as 'h2.events.StreamEnded'
twisted.web._http2.H2Connection._requestReceived: invalid ref to 'h2.events.RequestReceived' resolved as 'h2.events.RequestReceived'
twisted.web._http2.H2Connection.conn: invalid ref to 'h2.connection.H2Connection' resolved as 'h2.connection.H2Connection'
twisted.web._http2.H2Connection.priority: invalid ref to 'priority.PriorityTree' resolved as 'PriorityTree'
twisted.web._http2.H2Connection: invalid ref to 'h2.connection.H2Connection' resolved as 'h2.connection.H2Connection'
twisted.web._http2.H2Connection: invalid ref to 'priority.PriorityTree' resolved as 'PriorityTree'

So I reckon separate tickets for those and this can be merged.

@twisted-trac
Copy link
Author

exarkun's avatar @exarkun commented

Filed ticket:9608 and ticket:9609

@twisted-trac
Copy link
Author

exarkun's avatar @exarkun set status to closed

In changeset 41a582c

#!CommitTicketReference repository="" revision="41a582ce062845a0454e6b6b4bc09e6ad96793ea"
Merge pull request #1118 from twisted/9607.getprocessoutputandvalue-stdinbytes

Add stdinBytes parameter to getProcessOutputAndValue

Author: exarkun
Reviewer: wsanchez
Fixes: ticket:9607

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants