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

twisted: don't encapsulate failures twice #145

Merged
merged 2 commits into from
Nov 15, 2017

Conversation

vincentbernat
Copy link
Contributor

If a failure is already a Failure instance, don't encapsulate it into
a Failure. Keep it as is.

Fix #144

Note that I have no clue if this is actually correct. This fixes the failing test and it doesn't seem dumb to do that. I didn't investigate what changes triggered this problem. Maybe Failure was not a BaseException in the past.

@codecov
Copy link

codecov bot commented Oct 14, 2017

Codecov Report

Merging #145 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master   #145   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files          13     13           
  Lines         791    791           
  Branches      101    101           
=====================================
  Hits          791    791
Impacted Files Coverage Δ
src/structlog/twisted.py 100% <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 6e319a5...c4e3ecd. Read the comment docs.

@hynek
Copy link
Owner

hynek commented Nov 13, 2017

So yeah looks fair enough, however I think we have to add a tox env for Twisted with the old behavior to ensure we don’t break anything? It should be enough if it runs just the twisted parts of the test suite.

@vincentbernat
Copy link
Contributor Author

Do you want me to do it?

@hynek
Copy link
Owner

hynek commented Nov 13, 2017

Yeah it would be nice if it were part of this PR. Also please remember to adapt .travis.yml.

@vincentbernat
Copy link
Contributor Author

Done. Error seems unrelated to this PR.

@hynek
Copy link
Owner

hynek commented Nov 14, 2017

Thanks, could you add a changelog entry too, please?

If a failure is already a Failure instance, don't encapsulate it into
a Failure. Keep it as is.

Fix hynek#144
In versions < 17, Failure is not a subclass of BaseException, while it
is in versions > 17.
@vincentbernat vincentbernat force-pushed the fix/failure-encapsulation branch from b2c0fc9 to c4e3ecd Compare November 14, 2017 06:17
@vincentbernat
Copy link
Contributor Author

I have modified the first commit to add a changelog entry.

@hynek hynek merged commit 9c6e69a into hynek:master Nov 15, 2017
@hynek
Copy link
Owner

hynek commented Nov 15, 2017

Thanks!

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.

Failure in TestExtractStuffAndWhy with Twisted 17.9
2 participants