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

inlineCallbacks test fails with contextvars backport installed #9826

Closed
twisted-trac opened this issue May 12, 2020 · 3 comments
Closed

inlineCallbacks test fails with contextvars backport installed #9826

twisted-trac opened this issue May 12, 2020 · 3 comments

Comments

@twisted-trac
Copy link

altendky's avatar @altendky reported
Trac ID trac#9826
Type defect
Created 2020-05-12 15:24:54Z
[FAIL]
Traceback (most recent call last):
  File "/home/altendky/repos/twisted2/build/py36-alldeps-withcov-posix/lib/python3.6/site-packages/twisted/internet/test/test_inlinecb.py", line 124, in test_returnValueNonLocalDeferred
    self.assertMistakenMethodWarning(results)
  File "/home/altendky/repos/twisted2/build/py36-alldeps-withcov-posix/lib/python3.6/site-packages/twisted/internet/test/test_inlinecb.py", line 86, in assertMistakenMethodWarning
    "returnValue() in 'mistakenMethod' causing 'inline' to exit: "
  File "/home/altendky/repos/twisted2/build/py36-alldeps-withcov-posix/lib/python3.6/site-packages/twisted/trial/_synctest.py", line 437, in assertEqual
    super(_Assertions, self).assertEqual(first, second, msg)
  File "/home/altendky/.pyenv/versions/3.6.10/lib/python3.6/unittest/case.py", line 829, in assertEqual
    assertion_func(first, second, msg=msg)
  File "/home/altendky/.pyenv/versions/3.6.10/lib/python3.6/unittest/case.py", line 1203, in assertMultiLineEqual
    self.fail(self._formatMessage(msg, standardMsg))
twisted.trial.unittest.FailTest: "retu[34 chars]ing 'run' to exit: returnValue should only be [47 chars]acks" != "retu[34 chars]ing 'inline' to exit: returnValue should only [50 chars]acks"
- returnValue() in 'mistakenMethod' causing 'run' to exit: returnValue should only be invoked by functions decorated with inlineCallbacks
?                                            ^^
+ returnValue() in 'mistakenMethod' causing 'inline' to exit: returnValue should only be invoked by functions decorated with inlineCallbacks
?                                            ^ ++++


twisted.internet.test.test_inlinecb.NonLocalExitTests.test_returnValueNonLocalDeferred

Noticed while working on #9815 including adding a non-platform extra for sniffio which depends on the contextvars backport. Maybe this should be an enhancement but I'll mark it defect for now since the news fragment at least 'claimed support for' the contextvars backport.

Searchable metadata
trac-id__9826 9826
type__defect defect
reporter__altendky altendky
priority__normal normal
milestone__None None
branch__ 
branch_author__ 
status__closed closed
resolution__fixed fixed
component__core core
keywords__None None
time__1589297094583959 1589297094583959
changetime__1589613039783397 1589613039783397
version__None None
owner__hawkowl hawkowl
cc__altendky
@twisted-trac
Copy link
Author

altendky's avatar @altendky commented

PR: #1270

@twisted-trac
Copy link
Author

hawkowl's avatar @hawkowl set owner to @hawkowl

LGTM!

@twisted-trac
Copy link
Author

altendky's avatar @altendky set status to closed

In changeset 9646db4

#!CommitTicketReference repository="" revision="9646db406454def1d5d5ce0ac89e01941450567f"
Merge altendky:9826-altendky-contextvars_backport_compatibility: Fix contextvars backport compatibility 

Author: altendky
Reviewer: hawkowl
Fixes: ticket:9826

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