Closed srorso closed 4 years ago
Python PEP 479 - "Change StopIteration handling inside generators" proposes that the normal termination of a generator by a StopIteration exception should be changed to a RuntimeError exception. Previous generators did not require the StopIteration exception to be caught by the run-time code. They were consumed by the generator. As of the introduction of this Python change in 3.6.0, all later releases require explicit capture of the StopIteration exception by the generator function, otherwise a RuntimeError is raised. This became explicitly the behavior of Python 3.6 and beyond. Hence the exception described in the previous comment.
There is no work around for this issue. ASMA code will require changes. Interestingly, one of the examples in PEP 479 involves parsing, which is the exact situation within ASMA. The example suggests this will be relatively simple. Experience and backward compatibility will determine if this is the case.
The version of Python on which this issue was found is no longer readily available for the version of Linux used for development. The plan forward is to build the latest version of Python for testing of existing code (verification of the problem) and then corrections and ultimately backward compatibility.
This has been fixed by removal of StopIteration from the code.
asma does not assemble source files when used with Python 3.7.1. The issue does not occur when asma is used with Python 3.6.7, the most recent release before 3.7.1.
The following was generated on Windows 10 update 1809 in a non-elevated command prompt using Python 3.7.1 and the most recent version of SATK.
Assembly using Python 3.6.7 generates the following:
Please let me know if you would like the problem reproduced on Linux, BSD, or macOS platforms.
Many thanks for taking a look at this.