Support for embedded Python 3 in INN

Julien ÉLIE julien at
Sat Apr 21 20:04:21 UTC 2018

Hi all,

Earlier this week, I committed to CURRENT a patch to add support for 
embedded Python 3.3.0 (or later) interpreter with innd and nnrpd filter 

Latest daily snapshots of CURRENT contain the patch.
If people here are using Python hooks and wish to port them to Python 3, 
feel free to test and report any issue.

I've tested all the features provided by innd and nnrpd filter hooks, 
and believe they work fine with both Python 2 and Python 3.

 From changelog:

When configuring INN with the B-with-python flag, the PYTHON environment 
variable, when set, is used to select the interpreter to embed. 
Otherwise, it is searched in standard paths.

In case you change the Python interpreter to embed, make sure that the 
Python scripts you use are written in the expected syntax for that 
version of the Python interpreter.  Notably, buffer objects have been 
replaced with memoryview objects in Python 3, and UTF-8 encoding
now really matters for string literals (Python 3 uses bytes and Unicode 

INN documentation and samples of Python hooks have been updated to 
provide more examples.

Julien ÉLIE

« – C'est joli cette avenue le long de la mer… Ça s'appelle
     comment ?
   – La promenade des Bretons. » (Astérix)

More information about the inn-workers mailing list