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

Drop support for Python 3.3. #1668

Merged
merged 1 commit into from Dec 4, 2017
Merged

Drop support for Python 3.3. #1668

merged 1 commit into from Dec 4, 2017

Conversation

jaraco
Copy link
Member

@jaraco jaraco commented Dec 4, 2017

Fixes #1666.

@jaraco
Copy link
Member Author

jaraco commented Dec 4, 2017

Test is failing with

――――――――――――――――――――――――― ToolTests.testCombinedTools ――――――――――――――――――――――――――

self = <cherrypy.test.test_tools.ToolTests testMethod=testCombinedTools>

    def testCombinedTools(self):

        expectedResult = (ntou('Hello,world') +

                          europoundUnicode).encode('utf-8')

        zbuf = io.BytesIO()

        zfile = gzip.GzipFile(mode='wb', fileobj=zbuf, compresslevel=9)

        zfile.write(expectedResult)

        zfile.close()

    

        self.getPage('/euro',

                     headers=[

                         ('Accept-Encoding', 'gzip'),

                         ('Accept-Charset', 'ISO-8859-1,utf-8;q=0.7,*;q=0.7')])

        self.assertInBody(zbuf.getvalue()[:3])

    

        zbuf = io.BytesIO()

        zfile = gzip.GzipFile(mode='wb', fileobj=zbuf, compresslevel=6)

        zfile.write(expectedResult)

        zfile.close()

    

        self.getPage('/decorated_euro', headers=[('Accept-Encoding', 'gzip')])

        self.assertInBody(zbuf.getvalue()[:3])

    

        # This returns a different value because gzip's priority was

        # lowered in conf, allowing the rotator to run after gzip.

        # Of course, we don't want breakage in production apps,

        # but it proves the priority was changed.

        self.getPage('/decorated_euro/subpath',

                     headers=[('Accept-Encoding', 'gzip')])

        if six.PY3:

>           self.assertInBody(bytes([(x + 3) % 256 for x in zbuf.getvalue()]))

cherrypy/test/test_tools.py:381: 

_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

.tox/cheroot-master/lib/python3.6/site-packages/cheroot/test/webtest.py:454: in assertInBody

    self._handlewebError(msg)

_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <cherrypy.test.test_tools.ToolTests testMethod=testCombinedTools>

msg = 'b\'"\\x8e\\x0b\\x03!\\x95(]\\x05\\x02\\xf6K\\xd0\\xcc\\xcc\\xda,\\xd22\\xcdL<\\xd7sk4\\x03\\xe62\\x9e\\x8e\\x12\\x03\...\x0b\\x03"\\x95(]\\x05\\x02\\xf6K\\xd0\\xcc\\xcc\\xda,\\xd22\\xcdL<\\xd7sk4\\x03\\xe62\\x9e\\x8e\\x12\\x03\\x03\\x03\''

    def _handlewebError(self, msg):

        print('')

        print('    ERROR: %s' % msg)

    

        if not self.interactive:

>           raise self.failureException(msg)

E           AssertionError: b'"\x8e\x0b\x03!\x95(]\x05\x02\xf6K\xd0\xcc\xcc\xda,\xd22\xcdL<\xd7sk4\x03\xe62\x9e\x8e\x12\x03\x03\x03' not in body: b'"\x8e\x0b\x03"\x95(]\x05\x02\xf6K\xd0\xcc\xcc\xda,\xd22\xcdL<\xd7sk4\x03\xe62\x9e\x8e\x12\x03\x03\x03'

.tox/cheroot-master/lib/python3.6/site-packages/cheroot/test/webtest.py:310: AssertionError

That seems like it must be unrelated to the PR, so I'll restart it and see if it's just intermittent.

@jaraco
Copy link
Member Author

jaraco commented Dec 4, 2017

Test passed subsequently.

@jaraco jaraco merged commit 1fd5954 into master Dec 4, 2017
@jaraco jaraco deleted the feature/1666-drop-py33 branch December 4, 2017 18:54
@jaraco
Copy link
Member Author

jaraco commented Dec 4, 2017

released as 13.0.0.

@webknjaz
Copy link
Member

webknjaz commented Jun 18, 2018

@jaraco this test you mentioned in #1668 (comment) is still flakily failing sometimes:

E           AssertionError: b'"\x8e\x0b\x03\x85\x07*^\x05\x02\xf6K\xd0\xcc\xcc\xda,\xd22\xcdL<\xd7sk4\x03\xe62\x9e\x8e\x12\x03\x03\x03' not in body: b'"\x8e\x0b\x03\x86\x07*^\x05\x02\xf6K\xd0\xcc\xcc\xda,\xd22\xcdL<\xd7sk4\x03\xe62\x9e\x8e\x12\x03\x03\x03'

It differs in only one (4th) byte: \x85 vs. \x86. In your example fourth byte is also different (! != ").

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.

None yet

2 participants