Skip to content

Don't convert bytes headers to str - #1736

Merged
webknjaz merged 1 commit into
cherrypy:masterfrom
tobiashenkel:fix-encoding
Sep 5, 2018
Merged

webknjaz merged 1 commit into
cherrypy:masterfrom
tobiashenkel:fix-encoding

Conversation

@tobiashenkel

Copy link
Copy Markdown
Contributor

Don't convert bytes header values using str() as str(b'foo') becomes
"b'foo'". Instead just leave bytes as is like it was prior to v18.0.0.

  • What kind of change does this PR introduce?
    • bug fix

@webknjaz

webknjaz commented Sep 4, 2018

Copy link
Copy Markdown
Member

Fair enough. Can we have a test for that, please?

@webknjaz

webknjaz commented Sep 4, 2018

Copy link
Copy Markdown
Member

Also, AppVeyor tests failed.

Don't convert bytes header values using str() as str(b'foo') becomes
"b'foo'". Instead just leave bytes as is like it was prior to v18.0.0.
@codecov

codecov Bot commented Sep 4, 2018

Copy link
Copy Markdown

Codecov Report

Merging #1736 into master will decrease coverage by 0.02%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master    #1736      +/-   ##
==========================================
- Coverage   79.86%   79.84%   -0.03%     
==========================================
  Files         104      104              
  Lines       13337    13334       -3     
==========================================
- Hits        10652    10646       -6     
- Misses       2685     2688       +3

@tobiashenkel

Copy link
Copy Markdown
Contributor Author

Sure, I added a test case that fails without the fix.

@tobiashenkel

Copy link
Copy Markdown
Contributor Author

The AppVeyor test seems to fail due to some unrelated installation problem.

openstack-gerrit pushed a commit to openstack-infra/zuul that referenced this pull request Sep 4, 2018
With the latest cherrypy version the tests run into the hard test
timeout. This is caused by a header conversion issue introduced in
cherrypy 18.0.0. There is a pull request [1] that fixes this
issue. Once this is merged and released we can uncap it again.

The newest reno release, 2.10.0, requires a feature of newer sphinx without
specifying that the minimum compatibility has changed. Uncap sphinx here
so at least the doc build is not broken, use Sphinx 1.6.1 since that is
the oldest sphinx version supporting what reno needs.

[1] cherrypy/cherrypy#1736

Change-Id: Ic00e664152062d1fc1677e467b638ac2be99aef1
Co-Authored-By: Andreas Jaeger <jaegerandi@gmail.com>

@webknjaz webknjaz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@webknjaz
webknjaz merged commit 4142bea into cherrypy:master Sep 5, 2018
@tobiashenkel
tobiashenkel deleted the fix-encoding branch September 5, 2018 14:11
@webknjaz webknjaz added the regression Something that worked earlier got broken in new release label Sep 8, 2018
@jaraco

jaraco commented Sep 8, 2018

Copy link
Copy Markdown
Member

This fix is going out as 18.0.1.

openstack-gerrit pushed a commit to openstack-infra/zuul that referenced this pull request Sep 27, 2018
18.0.1 has been released an fixes:

  cherrypy/cherrypy#1736

Change-Id: Iffda4376e1393020d54ba6e25d0dda07616d72c6
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
h3llrais3r added a commit to h3llrais3r/cherrypy that referenced this pull request Nov 4, 2018
@h3llrais3r h3llrais3r mentioned this pull request Nov 4, 2018
1 task done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

regression Something that worked earlier got broken in new release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants