Ticket #1121 (assigned defect)

Opened 7 years ago

Last modified 6 years ago

"as" keyword should be blocked in 2.7

Reported by: justinc Owned by: gpress
Priority: minor Milestone:
Component: repyV2 Version: 0.1t
Severity: Low Keywords:
Cc: monzum Blocking:
Blocked By:

Description

If you run Repy in Python 2.7, the "as" keyword in except clauses is allowed. This keyword does not work in Python 2.5 or 2.6.

The change in behavior causes WORA headaches. We should address this issue (probably by blocking the keyword) to avoid confusion.

(Reported by Jay Koven.)

Change History

Changed 7 years ago by justinc

The parse trees (from the compiler module) look identical for code using the "as" syntax vs a comma:

A different strategy will be needed.

Changed 7 years ago by justinc

It looks at a high level, like we could simply allow the "as" syntax by simply including into repy.py:

"""
from future import with_statement
"""

Since the "with" node is a separate node in the compiler parse tree, this change will not allow it to be used.

Changed 6 years ago by justinc

  • owner changed from justinc to gpress
  • status changed from new to assigned

Why don't you take a look and see if we should sunset support for 2.5 and add support for 2.7?

Note: See TracTickets for help on using tickets.