Closed GoogleCodeExporter closed 9 years ago
A possible solution to make exaproxy compatible with Python 2.6 would be use of
backported ordereddict implementation:
diff --git a/lib/exaproxy/util/cache.py b/lib/exaproxy/util/cache.py
index 42e8a7a..a2dfc58 100644
--- a/lib/exaproxy/util/cache.py
+++ b/lib/exaproxy/util/cache.py
@@ -1,6 +1,12 @@
# encoding: utf-8
-from collections import OrderedDict
+try:
+ from collections import OrderedDict
+except ImportError:
+ try:
+ from ordereddict import OrderedDict
+ except ImportError:
+
from time import time
class TimeCache (dict):
Tested in the same environment as original issue was reported.
Original comment by luka.fur...@gmail.com
on 14 Aug 2013 at 3:22
Hello Luka,
Thank you for the bug report.
We have committed a patch to support the backported ordereddict module and it
will be included in the next release version of the proxy.
Original comment by iwantmyname
on 14 Aug 2013 at 8:16
reopened - the copy of the ordered dict implementation of Python 2.7 is not
included in ExaBGP therefore this will still fail.
The proposed patch is as well incomplete: application.py needs to be changed to
check for 2.6 and not 2.4 (this code was copied from ExaBGP).
Furthermore, I would argue that we should not support any version under 2.7.5
(as there is some bugs which AFAICR do affect ExaProxy under high load). Sorry
I can not be more specific.
Original comment by thomas.mangin
on 14 Aug 2013 at 10:35
Hi,
The diff pasted was more of a proposed solution than a patch as it leaves
cache.py in a broken state (missing stuff after the final except).
If you decide to support 2.6 I would be more than happy to write a complete
patch (including application.py, exaproxy start script ...).
Cheers,
Luka
Original comment by luka.fur...@gmail.com
on 15 Aug 2013 at 9:02
Please re-open on Github issue tracker if it still matters to you.
Original comment by thomas.mangin
on 11 Oct 2013 at 11:16
Original issue reported on code.google.com by
luka.fur...@gmail.com
on 13 Aug 2013 at 3:38