SyntaxErrors with Python 3

Reported by Arfrever Frehtes Taifersar Arahesis on 2012-07-16
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
zope.configuration
Medium
Tres Seaver

Bug Description

zope.configuration 4.0.0 introduced support for Python 3, but it is incomplete:

$ python3.2 -m compileall -f src
Listing 'src'...
Listing 'src/zope'...
Compiling 'src/zope/__init__.py'...
Listing 'src/zope/configuration'...
Compiling 'src/zope/configuration/__init__.py'...
Compiling 'src/zope/configuration/_compat.py'...
Compiling 'src/zope/configuration/config.py'...
Compiling 'src/zope/configuration/docutils.py'...
Compiling 'src/zope/configuration/exceptions.py'...
Compiling 'src/zope/configuration/fields.py'...
Compiling 'src/zope/configuration/interfaces.py'...
Compiling 'src/zope/configuration/name.py'...
Compiling 'src/zope/configuration/stxdocs.py'...
*** File "src/zope/configuration/stxdocs.py", line 142
    except getopt.error, msg:
                       ^
SyntaxError: invalid syntax

Listing 'src/zope/configuration/tests'...
Compiling 'src/zope/configuration/tests/__init__.py'...
Compiling 'src/zope/configuration/tests/bad.py'...
Compiling 'src/zope/configuration/tests/conditions.py'...
*** File "src/zope/configuration/tests/conditions.py", line 24
    title=u"Identifier",
                      ^
SyntaxError: invalid syntax

Compiling 'src/zope/configuration/tests/directives.py'...
Listing 'src/zope/configuration/tests/excludedemo'...
Compiling 'src/zope/configuration/tests/excludedemo/__init__.py'...
Listing 'src/zope/configuration/tests/excludedemo/sub'...
Compiling 'src/zope/configuration/tests/excludedemo/sub/__init__.py'...
Compiling 'src/zope/configuration/tests/nested.py'...
Compiling 'src/zope/configuration/tests/notyet.py'...
Listing 'src/zope/configuration/tests/samplepackage'...
Compiling 'src/zope/configuration/tests/samplepackage/NamedForClass.py'...
Compiling 'src/zope/configuration/tests/samplepackage/__init__.py'...
Compiling 'src/zope/configuration/tests/samplepackage/foo.py'...
Compiling 'src/zope/configuration/tests/simple.py'...
Compiling 'src/zope/configuration/tests/test___init__.py'...
Compiling 'src/zope/configuration/tests/test_config.py'...
Compiling 'src/zope/configuration/tests/test_docutils.py'...
Compiling 'src/zope/configuration/tests/test_fields.py'...
Compiling 'src/zope/configuration/tests/test_name.py'...
Compiling 'src/zope/configuration/tests/test_xmlconfig.py'...
Compiling 'src/zope/configuration/tests/test_zopeconfigure.py'...
Compiling 'src/zope/configuration/tests/victim.py'...
Compiling 'src/zope/configuration/xmlconfig.py'...
Compiling 'src/zope/configuration/zopeconfigure.py'...

Tres Seaver (tseaver) wrote :

Although I don't consider 'compileall' a valid use case, I have addressed
this issue by:

- Removing the long-deprecated 'zope.configuration.stxdocs' script.

- Updating 'zope.configuration.tests.conditions' (used only in running
  Sphinx doctest snippets) to add Py3k compatibility.

Changed in zope.configuration:
assignee: nobody → Tres Seaver (tseaver)
importance: Undecided → Medium
status: New → Fix Committed

Fix was released in zope.configuration-4.0.1.

Changed in zope.configuration:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers