Skip to content

Commit

Permalink
Lowered the Python version support to 3.8.
Browse files Browse the repository at this point in the history
  • Loading branch information
eriq-augustine committed Dec 18, 2023
1 parent 2b1bc82 commit c316d07
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 3 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ jobs:
shell: bash
run: pip3 install -U -r requirements.txt

- name: Check Python Version Compatibility
shell: bash
run: vermin --no-tips --no-parse-comments --exclude ast.unparse --target=3.8- --violations autograder

- name: Run Tests
shell: bash
run: ./run_tests.py
Expand Down
3 changes: 2 additions & 1 deletion autograder/cli/util/extract-code.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ def run(args):

def _get_parser():
parser = argparse.ArgumentParser(description =
"Pull the code from a file and output the sanitized version as if it was being graded.")
"Pull the code from a file and output the sanitized version as if it was being graded."
+ " Requires Python >= 3.9.")

parser.add_argument('path', metavar = 'PATH',
action = 'store', type = str,
Expand Down
6 changes: 6 additions & 0 deletions autograder/code.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,4 +140,10 @@ def sanitize_code(source_code):
return module_ast

def ast_to_source(module_ast):
"""
Get code from an AST.
Note that this function requires Python 3.9 (greater than our declared Python version,
and should not be used in any core functionality.
"""

return ast.unparse(module_ast)
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ platformdirs>=3.10.0
build
twine
packaging>=21.3
vermin
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def get_description():
classifiers = [
'Intended Audience :: Education',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.8',
],

packages = setuptools.find_packages(
Expand All @@ -47,5 +47,5 @@ def get_description():

license_files = (LICENSE_PATH, ),

python_requires = '>=3.10'
python_requires = '>=3.8'
)

0 comments on commit c316d07

Please sign in to comment.