Discussion:
Status of PY3 support
Nicolas Évrard
2011-11-17 14:24:02 UTC
Permalink
Hello,

I am porting my library for odt templating to python 3 and genshi is
one of its dependencies.

Now I am wondering what is the current status of python 3 support for
genshi. I saw here:

http://groups.google.com/group/genshi/browse_thread/thread/57f239b1a6f5c202

that the support was ready for inclusion but it seems to have never
happened. What is the status of this ?
--
(°> Nicolas Évrard
( ) Liège

--
You received this message because you are subscribed to the Google Groups "Genshi" group.
To post to this group, send email to ***@googlegroups.com.
To unsubscribe from this group, send email to genshi+***@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/genshi?hl=en.
Simon Cross
2011-11-17 15:30:50 UTC
Permalink
Hi
Post by Nicolas Évrard
Now I am wondering what is the current status of python 3 support for
 http://groups.google.com/group/genshi/browse_thread/thread/57f239b1a6f5c202
that the support was ready for inclusion but it seems to have never
happened. What is the status of this ?
It was merged into trunk. :)

Genshi trunk supports Python 3 -- if you find any bugs, please report them.

Schiavo
Simon
--
You received this message because you are subscribed to the Google Groups "Genshi" group.
To post to this group, send email to ***@googlegroups.com.
To unsubscribe from this group, send email to genshi+***@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/genshi?hl=en.
Arc Riley
2011-11-17 18:20:40 UTC
Permalink
Has this been released yet? Genshi 0.6 is marked in Gentoo's portage tree
as Py2-only.
Post by Nicolas Évrard
Hi
Post by Nicolas Évrard
Now I am wondering what is the current status of python 3 support for
http://groups.google.com/group/genshi/browse_thread/thread/57f239b1a6f5c202
Post by Nicolas Évrard
that the support was ready for inclusion but it seems to have never
happened. What is the status of this ?
It was merged into trunk. :)
Genshi trunk supports Python 3 -- if you find any bugs, please report them.
Schiavo
Simon
--
You received this message because you are subscribed to the Google Groups "Genshi" group.
To unsubscribe from this group, send email to
For more options, visit this group at
http://groups.google.com/group/genshi?hl=en.
--
You received this message because you are subscribed to the Google Groups "Genshi" group.
To post to this group, send email to ***@googlegroups.com.
To unsubscribe from this group, send email to genshi+***@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/genshi?hl=en.
Simon Cross
2011-11-17 20:28:16 UTC
Permalink
Has this been released yet?  Genshi 0.6 is marked in Gentoo's portage tree
as Py2-only.
Genshi 0.6 is Python 2 only. Genshi 0.7 (yet to be released) will be
the first released version to support Python 3.

Schiavo
Simon
--
You received this message because you are subscribed to the Google Groups "Genshi" group.
To post to this group, send email to ***@googlegroups.com.
To unsubscribe from this group, send email to genshi+***@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/genshi?hl=en.
Arc Riley
2011-11-17 20:35:02 UTC
Permalink
Do we have an ETA on that? Even a beta release?
Post by Simon Cross
Post by Arc Riley
Has this been released yet? Genshi 0.6 is marked in Gentoo's portage
tree
Post by Arc Riley
as Py2-only.
Genshi 0.6 is Python 2 only. Genshi 0.7 (yet to be released) will be
the first released version to support Python 3.
Schiavo
Simon
--
You received this message because you are subscribed to the Google Groups "Genshi" group.
To unsubscribe from this group, send email to
For more options, visit this group at
http://groups.google.com/group/genshi?hl=en.
--
You received this message because you are subscribed to the Google Groups "Genshi" group.
To post to this group, send email to ***@googlegroups.com.
To unsubscribe from this group, send email to genshi+***@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/genshi?hl=en.
Arc Riley
2011-11-18 20:02:30 UTC
Permalink
svn trunk installed on Python 3.2.2 fresh install:

Python 3.2.2 (default, Nov 18 2011, 14:31:30)
[GCC 4.5.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
import genshi
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "genshi/__init__.py", line 25, in <module>
from genshi.core import *
File "genshi/core.py", line 24, in <module>
from genshi.util import plaintext, stripentities, striptags, stringrepr
File "genshi/util.py", line 16, in <module>
import htmlentitydefs as entities
ImportError: No module named htmlentitydefs
--
You received this message because you are subscribed to the Google Groups "Genshi" group.
To post to this group, send email to ***@googlegroups.com.
To unsubscribe from this group, send email to genshi+***@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/genshi?hl=en.
Erik Swanson
2011-11-21 01:50:08 UTC
Permalink
..snipped..
Post by Arc Riley
ImportError: No module named htmlentitydefs
I'm assuming you ran 'setup.py develop', like I did before
encountering the exact same problem.
Unfortunately, Genshi only supports Python 3 via 2to3, and 'setup.py
develop' only places a .egg-link file, it doesn't run 2to3 on the
code.
The solution is to use 'setup.py install' instead, which does cause
2to3 to be run.
--
You received this message because you are subscribed to the Google Groups "Genshi" group.
To post to this group, send email to ***@googlegroups.com.
To unsubscribe from this group, send email to genshi+***@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/genshi?hl=en.
Arc Riley
2011-11-21 22:57:05 UTC
Permalink
Nope. "python3 setup.py build" - and 2to3 did run as part of that.
Post by Erik Swanson
..snipped..
Post by Arc Riley
ImportError: No module named htmlentitydefs
I'm assuming you ran 'setup.py develop', like I did before
encountering the exact same problem.
Unfortunately, Genshi only supports Python 3 via 2to3, and 'setup.py
develop' only places a .egg-link file, it doesn't run 2to3 on the
code.
The solution is to use 'setup.py install' instead, which does cause
2to3 to be run.
--
You received this message because you are subscribed to the Google Groups "Genshi" group.
To unsubscribe from this group, send email to
For more options, visit this group at
http://groups.google.com/group/genshi?hl=en.
--
You received this message because you are subscribed to the Google Groups "Genshi" group.
To post to this group, send email to ***@googlegroups.com.
To unsubscribe from this group, send email to genshi+***@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/genshi?hl=en.
Simon Cross
2011-11-21 23:00:12 UTC
Permalink
Nope.  "python3 setup.py build" - and 2to3 did run as part of that.
Build places the results of 2to3 in the (depths of the) build folder.
Is that in your PYTHONPATH or similar or are you perhaps attempting to
import the Python 2 version of the code that is in the top of your
checkout?

Schiavo
Simon
--
You received this message because you are subscribed to the Google Groups "Genshi" group.
To post to this group, send email to ***@googlegroups.com.
To unsubscribe from this group, send email to genshi+***@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/genshi?hl=en.
Arc Riley
2011-11-21 23:08:00 UTC
Permalink
***@nut ~/work $ svn co http://svn.edgewall.org/repos/genshi/trunk genshi
[...]
Checked out revision 1178.
***@nut ~/work $ cd genshi
***@nut ~/work/genshi $ python3
python3 python3.1 python3.2
***@nut ~/work/genshi $ python3.2 setup.py build
[...]
copying genshi/template/tests/templates/test_no_doctype.html ->
build/li[4/1965]
/template/tests/templates
Fixing build/lib/genshi/input.py build/lib/genshi/compat.py
build/lib/genshi/cor
e.py build/lib/genshi/__init__.py build/lib/genshi/util.py
build/lib/genshi/outp
ut.py build/lib/genshi/builder.py build/lib/genshi/path.py
build/lib/genshi/filt
ers/html.py build/lib/genshi/filters/__init__.py
build/lib/genshi/filters/i18n.p
y build/lib/genshi/filters/transform.py build/lib/genshi/template/eval.py
build/
lib/genshi/template/plugin.py build/lib/genshi/template/base.py
build/lib/genshi
/template/__init__.py build/lib/genshi/template/_ast24.py
build/lib/genshi/templ
ate/loader.py build/lib/genshi/template/astutil.py
build/lib/genshi/template/tex
t.py build/lib/genshi/template/markup.py
build/lib/genshi/template/interpolation
.py build/lib/genshi/template/directives.py
build/lib/genshi/template/ast24.py b
uild/lib/genshi/tests/input.py build/lib/genshi/tests/core.py
build/lib/genshi/t
ests/__init__.py build/lib/genshi/tests/util.py
build/lib/genshi/tests/output.py
build/lib/genshi/tests/builder.py build/lib/genshi/tests/path.py
build/lib/gens
hi/filters/tests/__init__.py build/lib/genshi/filters/tests/i18n.py
build/lib/ge
nshi/filters/tests/test_html.py build/lib/genshi/filters/tests/transform.py
buil
d/lib/genshi/template/tests/eval.py
build/lib/genshi/template/tests/plugin.py bu
ild/lib/genshi/template/tests/base.py
build/lib/genshi/template/tests/__init__.p
y build/lib/genshi/template/tests/loader.py
build/lib/genshi/template/tests/text
.py build/lib/genshi/template/tests/markup.py
build/lib/genshi/template/tests/in
terpolation.py build/lib/genshi/template/tests/directives.py
build/lib/genshi/te
mplate/tests/templates/__init__.py
Skipping implicit fixer: buffer
Skipping implicit fixer: idioms
Skipping implicit fixer: set_literal
Skipping implicit fixer: ws_comma
Fixing build/lib/genshi/input.py build/lib/genshi/compat.py
build/lib/genshi/cor
e.py build/lib/genshi/__init__.py build/lib/genshi/util.py
build/lib/genshi/outp
ut.py build/lib/genshi/builder.py build/lib/genshi/path.py
build/lib/genshi/filt
ers/html.py build/lib/genshi/filters/__init__.py
build/lib/genshi/filters/i18n.p
y build/lib/genshi/filters/transform.py build/lib/genshi/template/eval.py
build/
lib/genshi/template/plugin.py build/lib/genshi/template/base.py
build/lib/genshi
/template/__init__.py build/lib/genshi/template/_ast24.py
build/lib/genshi/templ
ate/loader.py build/lib/genshi/template/astutil.py
build/lib/genshi/template/tex
t.py build/lib/genshi/template/markup.py
build/lib/genshi/template/interpolation
.py build/lib/genshi/template/directives.py
build/lib/genshi/template/ast24.py b
uild/lib/genshi/tests/input.py build/lib/genshi/tests/core.py
build/lib/genshi/t
ests/__init__.py build/lib/genshi/tests/util.py
build/lib/genshi/tests/output.py
build/lib/genshi/tests/builder.py build/lib/genshi/tests/path.py
build/lib/gens
hi/filters/tests/__init__.py build/lib/genshi/filters/tests/i18n.py
build/lib/ge
nshi/filters/tests/test_html.py build/lib/genshi/filters/tests/transform.py
buil
d/lib/genshi/template/tests/eval.py
build/lib/genshi/template/tests/plugin.py bu
ild/lib/genshi/template/tests/base.py
build/lib/genshi/template/tests/__init__.p
y build/lib/genshi/template/tests/loader.py
build/lib/genshi/template/tests/text
.py build/lib/genshi/template/tests/markup.py
build/lib/genshi/template/tests/in
terpolation.py build/lib/genshi/template/tests/directives.py
build/lib/genshi/te
mplate/tests/templates/__init__.py
Skipping implicit fixer: buffer
Skipping implicit fixer: idioms
Skipping implicit fixer: set_literal
Skipping implicit fixer: ws_comma
***@nut ~/work/genshi $ sudo python3.2 setup.py
install
[...]
Finished processing dependencies for Genshi==0.7dev-r1177
***@nut ~/work/genshi $ python3.2
Python 3.2.2 (default, Nov 18 2011, 14:31:30)
[GCC 4.5.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
Post by Simon Cross
Post by Arc Riley
import genshi
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "genshi/__init__.py", line 25, in <module>
from genshi.core import *
File "genshi/core.py", line 24, in <module>
from genshi.util import plaintext, stripentities, striptags, stringrepr
File "genshi/util.py", line 16, in <module>
import htmlentitydefs as entities
ImportError: No module named htmlentitydefs
Post by Simon Cross
Post by Arc Riley
Nope. "python3 setup.py build" - and 2to3 did run as part of that.
Build places the results of 2to3 in the (depths of the) build folder.
Is that in your PYTHONPATH or similar or are you perhaps attempting to
import the Python 2 version of the code that is in the top of your
checkout?
Schiavo
Simon
--
You received this message because you are subscribed to the Google Groups "Genshi" group.
To unsubscribe from this group, send email to
For more options, visit this group at
http://groups.google.com/group/genshi?hl=en.
--
You received this message because you are subscribed to the Google Groups "Genshi" group.
To post to this group, send email to ***@googlegroups.com.
To unsubscribe from this group, send email to genshi+***@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/genshi?hl=en.
Stefano Rivera
2011-11-22 07:04:48 UTC
Permalink
Hi Arc (2011.11.22_01:08:00_+0200)
Post by Arc Riley
Python 3.2.2 (default, Nov 18 2011, 14:31:30)
[GCC 4.5.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
import genshi
File "<stdin>", line 1, in <module>
File "genshi/__init__.py", line 25, in <module>
from genshi.core import *
chdir out of there. It's importing the untranslated genshi, because the
current directory comes first in sys.path.

SR
--
Stefano Rivera
http://tumbleweed.org.za/
H: +27 21 465 6908 C: +27 72 419 8559 UCT: x3127
--
You received this message because you are subscribed to the Google Groups "Genshi" group.
To post to this group, send email to ***@googlegroups.com.
To unsubscribe from this group, send email to genshi+***@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/genshi?hl=en.
Arc Riley
2011-11-22 13:08:25 UTC
Permalink
Ah-ha. Makes sense. Thanks.
Post by Stefano Rivera
Hi Arc (2011.11.22_01:08:00_+0200)
Post by Arc Riley
Python 3.2.2 (default, Nov 18 2011, 14:31:30)
[GCC 4.5.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
import genshi
File "<stdin>", line 1, in <module>
File "genshi/__init__.py", line 25, in <module>
from genshi.core import *
chdir out of there. It's importing the untranslated genshi, because the
current directory comes first in sys.path.
SR
--
Stefano Rivera
http://tumbleweed.org.za/
H: +27 21 465 6908 C: +27 72 419 8559 UCT: x3127
--
You received this message because you are subscribed to the Google Groups "Genshi" group.
To unsubscribe from this group, send email to
For more options, visit this group at
http://groups.google.com/group/genshi?hl=en.
--
You received this message because you are subscribed to the Google Groups "Genshi" group.
To post to this group, send email to ***@googlegroups.com.
To unsubscribe from this group, send email to genshi+***@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/genshi?hl=en.
Simon Cross
2011-11-21 21:39:14 UTC
Permalink
Do we have an ETA on that?  Even a beta release?
I've been meaning to cut a release for some time -- I really just need
to set an evening aside and do it. :?

Schiavo
Simon
--
You received this message because you are subscribed to the Google Groups "Genshi" group.
To post to this group, send email to ***@googlegroups.com.
To unsubscribe from this group, send email to genshi+***@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/genshi?hl=en.
Simon Cross
2011-11-21 21:41:55 UTC
Permalink
Post by Simon Cross
I've been meaning to cut a release for some time -- I really just need
to set an evening aside and do it. :?
I have arbitrarily declared the 28th as Genshi release day.
--
You received this message because you are subscribed to the Google Groups "Genshi" group.
To post to this group, send email to ***@googlegroups.com.
To unsubscribe from this group, send email to genshi+***@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/genshi?hl=en.
Nicolas Évrard
2011-11-17 17:13:06 UTC
Permalink
Post by Simon Cross
Hi
Hello,
Post by Simon Cross
Post by Nicolas Évrard
Now I am wondering what is the current status of python 3 support for
 http://groups.google.com/group/genshi/browse_thread/thread/57f239b1a6f5c202
that the support was ready for inclusion but it seems to have never
happened. What is the status of this ?
It was merged into trunk. :)
I missed the commit in my search, sorry for the noise.
Post by Simon Cross
Genshi trunk supports Python 3 -- if you find any bugs, please report them.
I will thanks.
--
(°> Nicolas Évrard
( ) Liège

--
You received this message because you are subscribed to the Google Groups "Genshi" group.
To post to this group, send email to ***@googlegroups.com.
To unsubscribe from this group, send email to genshi+***@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/genshi?hl=en.
Loading...