Opened 15 years ago
Closed 15 years ago
#379 closed defect (fixed)
Python 2.4 compatibility fixes
Reported by: | mborch@… | Owned by: | cmlenz |
---|---|---|---|
Priority: | major | Milestone: | 0.6 |
Component: | General | Version: | 0.5.1 |
Keywords: | Cc: |
Description
The attached patch fixes various issues.
These were originally found during development of Chameleon.
Attachments (1)
Change History (6)
Changed 15 years ago by mborch@…
comment:1 Changed 15 years ago by cmlenz
- Milestone changed from 0.7 to 0.6
Okay, looks like decorators was renamed to decorator_list in the AST in Python 2.6, right? So this is really a fix for a compatibility problem with Python 2.6 not 2.4?
Just changing decorators to decorator_list in the code will break decorators under Python versions prior to 2.6 AFAICT, so I think the change needs to look at both names. I'm not sure what your other changes in the patch are supposed to do, can you elaborate on them?
comment:2 Changed 15 years ago by cmlenz
- Resolution set to fixed
- Status changed from new to closed
I've checked in a different fix for the decorators problem in r1102. Please let me know whether I'm missing any other compatibility problems. Thanks!
comment:3 follow-up: ↓ 4 Changed 15 years ago by mborch@…
The AST class did not have the standard constructor (which accepts _fields), and there was no except-handler visitor cloner (so the body and else- if those blocks would not be transformed).
comment:4 in reply to: ↑ 3 Changed 15 years ago by cmlenz
- Resolution fixed deleted
- Status changed from closed to reopened
Replying to mborch@…:
The AST class did not have the standard constructor (which accepts _fields),
But AFAICT neither did the AST constructor in Python 2.5, so I can't see how this would lead to compatibility problems in Python 2.4.
and there was no except-handler visitor cloner (so the body and else- if those blocks would not be transformed).
Ah, right.
comment:5 Changed 15 years ago by cmlenz
- Resolution set to fixed
- Status changed from reopened to closed
AFAICT this should be resolved in trunk now.
Diff versus r1096.