Ah yeah, there is a difference in the way repoze.who creates cookies on Py2
and Py3, so if you switch between the two platforms the cookie becames
invalid.
The same actually happens with Beaker for Sessions if I remember correctly.

I'm aware of the problem but has never been priority as it's actually
really uncommon to switch between python versions the same project.

On Thu, Dec 3, 2015 at 3:55 PM, Luke Tunmer <[email protected]> wrote:

> Ah! Thanks Alessandro - I missed that setting in the ini file. Which is
> now working for me.
>
> Interestingly I hit a second problem because my browser still had me
> logged in as "manager" from the Python 2.7 invocation, and then the
> exception below happened. In a different browser without the auth cookie I
> could get it to work. It seems repoze is trying to decode the identity,
> which is a string already ('manager'). This might make it awkward to switch
> between running the server on a 2.7 and 3.4 environment, but as long as I'm
> aware of it I can clean out cookies.
>
> Regards,
> Luke
>
>
> On Thursday, 3 December 2015 14:37:23 UTC, Alessandro Molina wrote:
>>
>> Until a new Genshi release happens, you must enable an option to use
>> Gensh in Python3.4
>> See
>> http://turbogears.readthedocs.org/en/latest/cookbook/upgrading.html#genshi-work-around-available-for-python3-4
>>
>>
>> On Thu, Dec 3, 2015 at 3:33 PM, Luke Tunmer <[email protected]> wrote:
>>
>>> I’m getting a problem on a clean quickstarted TG project when running
>>> with a Python 3.4 virtualenv running on Windows:
>>>
>>>
>>>
>>> C:\Python34\python -m venv pyenv34
>>>
>>> pyenv34\Scripts\activate
>>>
>>> pip install tg.devtools==2.3.7
>>>
>>> gearbox quickstart cmms
>>>
>>> cd cmms
>>>
>>> python setup.py develop
>>>
>>> gearbox setup-app
>>>
>>> gearbox serve
>>>
>>>
>>>
>>> Then going to localhost:8080 in a browser renders the backtrace shown
>>> below. The problem seems to be in genshi.
>>>
>>>
>>>
>>> Note that doing the exact same steps using Python 2.7 works fine for me.
>>>
>>>
>>>
>>> Is this a recent regression, or am I doing something wrong?
>>>
>>>
>>>
>>> TIA for any help,
>>>
>>> Luke
>>>
>>>
>>>
>>> --
>>>
>>>
>>>
>>> <backtrace pruned>….
>>>
>>>
>>>     File
>>> "c:\uh\HEAD\ColumbusMiddleManServer\pyenv34\lib\site-packages\genshi-0.7-py3.4-win32.egg\genshi\template\base.py",
>>> line 490, in _prepare
>>>
>>>
>>>
>>>     yield kind, (directives, list(substream)), pos
>>>
>>>
>>>
>>>     File
>>> "c:\uh\HEAD\ColumbusMiddleManServer\pyenv34\lib\site-packages\genshi-0.7-py3.4-win32.egg\genshi\template\base.py",
>>> line 485, in _prepare
>>>
>>>
>>>
>>>     namespaces, pos)
>>>
>>>
>>>
>>>     File
>>> "c:\uh\HEAD\ColumbusMiddleManServer\pyenv34\lib\site-packages\genshi-0.7-py3.4-win32.egg\genshi\template\directives.py",
>>> line 397, in attach
>>>
>>>
>>>
>>>     namespaces, pos)
>>>
>>>
>>>
>>>    File
>>> "c:\uh\HEAD\ColumbusMiddleManServer\pyenv34\lib\site-packages\genshi-0.7-py3.4-win32.egg\genshi\template\directives.py",
>>> line 82, in attach
>>>
>>>
>>>
>>>     return cls(value, template, namespaces, *pos[1:]), stream
>>>
>>>
>>>
>>>     File
>>> "c:\uh\HEAD\ColumbusMiddleManServer\pyenv34\lib\site-packages\genshi-0.7-py3.4-win32.egg\genshi\template\directives.py",
>>> line 60, in __init__
>>>
>>>
>>>
>>>     self.expr = self._parse_expr(value, template, lineno, offset)
>>>
>>>
>>>
>>>     File
>>> "c:\uh\HEAD\ColumbusMiddleManServer\pyenv34\lib\site-packages\genshi-0.7-py3.4-win32.egg\genshi\template\directives.py",
>>> line 109, in _parse_expr
>>>
>>>
>>>
>>>     lookup=template.lookup) or None
>>>
>>>
>>>
>>>     File
>>> "c:\uh\HEAD\ColumbusMiddleManServer\pyenv34\lib\site-packages\genshi-0.7-py3.4-win32.egg\genshi\template\eval.py",
>>> line 93, in __init__
>>>
>>>
>>>
>>>     filename=filename, lineno=lineno, xform=xform)
>>>
>>>
>>>
>>>     File
>>> "c:\uh\HEAD\ColumbusMiddleManServer\pyenv34\lib\site-packages\genshi-0.7-py3.4-win32.egg\genshi\template\eval.py",
>>> line 463, in _compile
>>>
>>>
>>>
>>>     new_source = ASTCodeGenerator(tree).code
>>>
>>>
>>>
>>>     File
>>> "c:\uh\HEAD\ColumbusMiddleManServer\pyenv34\lib\site-packages\genshi-0.7-py3.4-win32.egg\genshi\template\astutil.py",
>>> line 43, in __init__
>>>
>>>
>>>
>>>     self.visit(tree)
>>>
>>>
>>>
>>>     File
>>> "c:\uh\HEAD\ColumbusMiddleManServer\pyenv34\lib\site-packages\genshi-0.7-py3.4-win32.egg\genshi\template\astutil.py",
>>> line 91, in visit
>>>
>>>
>>>
>>>     ret = visitor(node)
>>>
>>>
>>>
>>>     File
>>> "c:\uh\HEAD\ColumbusMiddleManServer\pyenv34\lib\site-packages\genshi-0.7-py3.4-win32.egg\genshi\template\astutil.py",
>>> line 104, in visit_Expression
>>>
>>>
>>>
>>>     return self.visit(node.body)
>>>
>>>
>>>
>>>     File
>>> "c:\uh\HEAD\ColumbusMiddleManServer\pyenv34\lib\site-packages\genshi-0.7-py3.4-win32.egg\genshi\template\astutil.py",
>>> line 90, in visit
>>>
>>>
>>>
>>>     raise Exception('Unhandled node type %r' % type(node))
>>>
>>>
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "TurboGears" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to [email protected].
>>> To post to this group, send email to [email protected].
>>> Visit this group at http://groups.google.com/group/turbogears.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>> --
> You received this message because you are subscribed to the Google Groups
> "TurboGears" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/turbogears.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/turbogears.
For more options, visit https://groups.google.com/d/optout.

Reply via email to