Skip to content

lint: ErrorWrapper.write: remove assertion #18

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

blueyed
Copy link
Contributor

@blueyed blueyed commented Dec 11, 2018

With webpy non-bytes might arrive here, via:

print(traceback.format_exc(), file=web.debug)
out = ctx.environ['wsgi.errors']
out.write(x)

I think this is legitimate, and paste should not cause more trouble
(i.e. a new exception) in this case.

With webpy non-bytes might arrive here, via:

    print(traceback.format_exc(), file=web.debug)
    out = ctx.environ['wsgi.errors']
    out.write(x)

I think this is legitimate, and paste should not cause more trouble
(i.e. a new exception) in this case.
@codecov-io
Copy link

Codecov Report

Merging #18 into master will decrease coverage by <.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #18      +/-   ##
==========================================
- Coverage   53.52%   53.52%   -0.01%     
==========================================
  Files         125      125              
  Lines       14758    14757       -1     
  Branches     2501     2501              
==========================================
- Hits         7899     7898       -1     
- Misses       6307     6308       +1     
+ Partials      552      551       -1
Flag Coverage Δ
#py27 52.38% <ø> (-0.05%) ⬇️
#py35 51.78% <ø> (-0.05%) ⬇️
#py36 51.78% <ø> (-0.05%) ⬇️
#py37 51.81% <ø> (-0.01%) ⬇️
#pypy 51.64% <ø> (-0.05%) ⬇️
Impacted Files Coverage Δ
paste/lint.py 82.32% <ø> (-0.1%) ⬇️
paste/session.py 75% <0%> (ø) ⬆️

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 5015532...804aeb8. Read the comment docs.

@cdent
Copy link
Collaborator

cdent commented Dec 11, 2018

Have a look at https://bitbucket.org/ianb/paste/commits/ab9e5d22ad48eb70db8ef6cbc726ae809c397118
which appears to have made a bad interpretation of pep 3333:

Search 'wsgi.errors' in https://www.python.org/dev/peps/pep-3333/

Instead of removing the assertion (thus removing any linting), consider putting a version of the old code back: assert type(s) is type("")

@brondsem brondsem mentioned this pull request Oct 9, 2020
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.

3 participants