[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: r34359 - trunk/subversion/bindings/swig/python/tests/trac

From: Arfrever Frehtes Taifersar Arahesis <arfrever.fta_at_gmail.com>
Date: Sat, 29 Nov 2008 00:53:16 +0100

2008-11-25 12:40:27 Arfrever Frehtes Taifersar Arahesis napisał(a):
> 2008-11-25 00:59 Jeremy Whitlock <jcscoobyrs_at_gmail.com> napisał(a):
> > On Sun, Nov 23, 2008 at 9:04 AM, <arfrever_at_tigris.org> wrote:
> >> Author: arfrever
> >> Date: Sun Nov 23 08:04:26 2008
> >> New Revision: 34359
> >>
> >> Log:
> >> * subversion/bindings/swig/python/tests/trac/test.py: Fix encoding. Wrong
> >> encoding was causing traceback during running Python-3 version of 2to3.
> >>
> >> Modified:
> >> trunk/subversion/bindings/swig/python/tests/trac/test.py
> >>
> >> Modified: trunk/subversion/bindings/swig/python/tests/trac/test.py
> >> URL: http://svn.collab.net/viewvc/svn/trunk/subversion/bindings/swig/python/tests/trac/test.py?pathrev=34359&r1=34358&r2=34359
> >> ==============================================================================
> >> --- trunk/subversion/bindings/swig/python/tests/trac/test.py Sun Nov 23 07:47:42 2008 (r34358)
> >> +++ trunk/subversion/bindings/swig/python/tests/trac/test.py Sun Nov 23 08:04:26 2008 (r34359)
> >> @@ -1,8 +1,7 @@
> >> #!/usr/bin/env python
> >> -# -*- coding: iso8859-1 -*-
> >> #
> >> # Copyright (C) 2003, 2004, 2005 Edgewall Software
> >> -# Copyright (C) 2003, 2004, 2005 Jonas Borgström <jonas_at_edgewall.com>
> >> +# Copyright (C) 2003, 2004, 2005 Jonas Borgström <jonas_at_edgewall.com>
> >> # Copyright (C) 2005 Christopher Lenz <cmlenz_at_gmx.de>
> >> #
> >> # This software is licensed as described in the file
> >> @@ -12,7 +11,7 @@
> >> # If newer versions of this license are posted there, you may use a
> >> # newer version instead, at your option.
> >> #
> >> -# Author: Jonas Borgström <jonas_at_edgewall.com>
> >> +# Author: Jonas Borgström <jonas_at_edgewall.com>
> >> # Christopher Lenz <cmlenz_at_gmx.de>
> >>
> >> import unittest
> >>
> >
> > Making this changes make running the tests fail with an error message:
> >
> > make check-swig-py
> > cd /Users/jwhitlock/dev/subversion/subversion/bindings/swig/python; \
> > /usr/bin/python
> > /Users/jwhitlock/dev/subversion/subversion/bindings/swig/python/tests/run_all.py
> > Traceback (most recent call last):
> > File "/Users/jwhitlock/dev/subversion/subversion/bindings/swig/python/tests/run_all.py",
> > line 2, in <module>
> > import mergeinfo, core, client, delta, pool, ra, wc, repository, auth, \
> > File "/Users/jwhitlock/dev/subversion/subversion/bindings/swig/python/tests/mergeinfo.py",
> > line 11, in <module>
> > from trac.versioncontrol.tests.svn_fs import REPOS_PATH
> > File "/Users/jwhitlock/dev/subversion/subversion/bindings/swig/python/tests/trac/versioncontrol/tests/__init__.py",
> > line 3, in <module>
> > from trac.versioncontrol.tests import svn_fs
> > File "/Users/jwhitlock/dev/subversion/subversion/bindings/swig/python/tests/trac/versioncontrol/tests/svn_fs.py",
> > line 29, in <module>
> > from trac.test import TestSetup
> > File "/Users/jwhitlock/dev/subversion/subversion/bindings/swig/python/tests/trac/test.py",
> > line 4
> > SyntaxError: Non-ASCII character '\xc3' in file
> > /Users/jwhitlock/dev/subversion/subversion/bindings/swig/python/tests/trac/test.py
> > on line 4, but no encoding declared; see
> > http://www.python.org/peps/pep-0263.html for details
> > make: *** [check-swig-py] Error 1
> >
> > Is there an encoding that supports the characters with an umlat that
> > will work on Python 2 and 3?
>
> I forgot that PEP 3120 [1] doesn't apply to Python 2.*.
> [1] http://python.org/dev/peps/pep-3120/
>
> Please test this patch:
>
> Index: subversion/bindings/swig/python/tests/trac/test.py
> ===================================================================
> --- subversion/bindings/swig/python/tests/trac/test.py (revision 34401)
> +++ subversion/bindings/swig/python/tests/trac/test.py (working copy)
> @@ -1,4 +1,5 @@
> #!/usr/bin/env python
> +# -*- coding: utf-8 -*-
> #
> # Copyright (C) 2003, 2004, 2005 Edgewall Software
> # Copyright (C) 2003, 2004, 2005 Jonas Borgström <jonas_at_edgewall.com>
>

Fixed in r34469.

-- 
Arfrever Frehtes Taifersar Arahesis

Received on 2008-11-29 00:58:29 CET

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.