dsa-ou / allowed

Check if a program only uses a subset of the Python language.
https://dsa-ou.github.io/allowed/
BSD 3-Clause "New" or "Revised" License
10 stars 6 forks source link

don't require Python 3.10 #73

Closed mwermelinger closed 1 month ago

mwermelinger commented 1 month ago

A tutor found that allowed crashes on the briefing notebook in a new M269 24J installation in Raspberry Pi. More generally, it crashes with option -m when pytype is installed but Python 3.10 isn't. To recreate on macOS,

  1. do PATH=/usr/bin:/bin so that the Python binary links in /usr/local/bin aren't found
  2. do m269-24j to activate the M269 environment and change to the M269 folder
  3. do allowed -m book-r1/python/m269_test.py

To fix this, need probably to revert to old check of whether allowed is being run under Python 3.10 or 3.11. The comment in PR #57 seems to indicate I hardwired 3.10 to make it work with old pytype versions.