forked from pool/python-gevent
Accepting request 671192 from home:alarrosa:branches:devel:languages:python
- Add patches to fix building the package:
* remove-testCongestion.patch to remove a test that is failing
due to a timeout
* fix-tests.patch to fix some tests
- ssl.OP_NO_COMPRESSION is set by default by ssl.
- thread_ident can be represented as a negative hex number now,
so replace the negative sign with the regex too, and not just the number.
* use-libev-cffi.patch, libev-cext seems to be broken on i586, so
use libev-cffi by default (also, the gevent documentation mentions
that upstream will make libev-cffi the default soon).
OBS-URL: https://build.opensuse.org/request/show/671192
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-gevent?expand=0&rev=52
This commit is contained in:
41
fix-tests.patch
Normal file
41
fix-tests.patch
Normal file
@@ -0,0 +1,41 @@
|
||||
From: Antonio Larrosa <alarrosa@suse.com>
|
||||
Subject: Fix failing tests
|
||||
|
||||
- ssl.OP_NO_COMPRESSION is set by default by ssl.
|
||||
- thread_ident can be represented as a negative hex number now,
|
||||
so replace the negative sign with the regex too, and not just the number.
|
||||
Index: gevent-1.4.0/src/greentest/2.7/test_ssl.py
|
||||
===================================================================
|
||||
--- gevent-1.4.0.orig/src/greentest/2.7/test_ssl.py
|
||||
+++ gevent-1.4.0/src/greentest/2.7/test_ssl.py
|
||||
@@ -742,14 +742,14 @@ class ContextTests(unittest.TestCase):
|
||||
def test_options(self):
|
||||
ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
|
||||
# OP_ALL | OP_NO_SSLv2 | OP_NO_SSLv3 is the default value
|
||||
- self.assertEqual(ssl.OP_ALL | ssl.OP_NO_SSLv2 | ssl.OP_NO_SSLv3,
|
||||
+ self.assertEqual(ssl.OP_ALL | ssl.OP_NO_SSLv2 | ssl.OP_NO_SSLv3 | ssl.OP_NO_COMPRESSION,
|
||||
ctx.options)
|
||||
ctx.options |= ssl.OP_NO_TLSv1
|
||||
- self.assertEqual(ssl.OP_ALL | ssl.OP_NO_SSLv2 | ssl.OP_NO_SSLv3 | ssl.OP_NO_TLSv1,
|
||||
+ self.assertEqual(ssl.OP_ALL | ssl.OP_NO_SSLv2 | ssl.OP_NO_SSLv3 | ssl.OP_NO_COMPRESSION | ssl.OP_NO_TLSv1,
|
||||
ctx.options)
|
||||
if can_clear_options():
|
||||
ctx.options = (ctx.options & ~ssl.OP_NO_SSLv2) | ssl.OP_NO_TLSv1
|
||||
- self.assertEqual(ssl.OP_ALL | ssl.OP_NO_TLSv1 | ssl.OP_NO_SSLv3,
|
||||
+ self.assertEqual(ssl.OP_ALL | ssl.OP_NO_TLSv1 | ssl.OP_NO_SSLv3 | ssl.OP_NO_COMPRESSION,
|
||||
ctx.options)
|
||||
ctx.options = 0
|
||||
self.assertEqual(0, ctx.options)
|
||||
Index: gevent-1.4.0/src/gevent/tests/test__util.py
|
||||
===================================================================
|
||||
--- gevent-1.4.0.orig/src/gevent/tests/test__util.py
|
||||
+++ gevent-1.4.0/src/gevent/tests/test__util.py
|
||||
@@ -134,7 +134,7 @@ class TestTree(greentest.TestCase):
|
||||
|
||||
def _normalize_tree_format(self, value):
|
||||
import re
|
||||
- hexobj = re.compile('0x[0123456789abcdef]+L?', re.I)
|
||||
+ hexobj = re.compile('-?0x[0123456789abcdef]+L?', re.I)
|
||||
value = hexobj.sub('X', value)
|
||||
value = value.replace('epoll', 'select')
|
||||
value = value.replace('select', 'default')
|
||||
Reference in New Issue
Block a user