Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 108649 - Portions of reportlab 1.18 throw SyntaxError on import in Python 2.4
Summary: Portions of reportlab 1.18 throw SyntaxError on import in Python 2.4
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-10-09 13:03 UTC by Stephan Sokolow
Modified: 2005-10-11 16:32 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stephan Sokolow 2005-10-09 13:03:21 UTC
As of Python 2.4, you can no longer assign to None. This breaks some portions of
reportlab 1.18 which use assignment to None as a method of discarding unneeded
values while unpacking tuples. This problem prevents the modules in question
from being imported.

Reproducible: Always
Steps to Reproduce:
1. Open python 2.4
2. Type "import reportlab.graphics.charts.legends" or "import
reportlab.platypus.doctemplate"


Actual Results:  
>>> import reportlab.graphics.charts.legends
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "/usr/lib/python2.4/site-packages/reportlab/graphics/charts/legends.py",
line 112
    for None, name in colorNamePairs:
SyntaxError: assignment to None

>>> import reportlab.platypus.doctemplate
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "/usr/lib/python2.4/site-packages/reportlab/platypus/__init__.py", line
13, in ?
    from reportlab.platypus.doctemplate import BaseDocTemplate,
NextPageTemplate, PageTemplate, ActionFlowable, \
  File "/usr/lib/python2.4/site-packages/reportlab/platypus/doctemplate.py",
line 108
    t, v, None = sys.exc_info()
SyntaxError: assignment to None


Expected Results:  
It should throw no errors and prompt for the next line.

Simply changing the broken lines to assign to a throwaway variable instead of
None will fix this problem.
Comment 1 Bryan Østergaard (RETIRED) gentoo-dev 2005-10-11 16:32:55 UTC
Stable bumped to 1.20 on x86 which fixes this problem. Thanks for reporting.