Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[xqueue-watcher] add python 3.11 and 3.12 support #110

Merged
merged 2 commits into from
Mar 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ name: Python CI
on:
push:
branches:
- master
- master
pull_request:
branches:
- '**'
- '**'

jobs:
run_tests:
Expand All @@ -15,10 +15,8 @@ jobs:
strategy:
matrix:
os:
- ubuntu-20.04
python-version:
- 3.8

- ubuntu-20.04
python-version: ['3.8', '3.11', '3.12']
steps:
- uses: actions/checkout@v2
- name: setup python
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

setup(
name='xqueue_watcher',
version='0.2',
version='0.3',
description='XQueue Pull Grader',
packages=[
'grader_support',
Expand Down
1 change: 0 additions & 1 deletion xqueue_watcher/grader.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
Implementation of a grader compatible with XServer
"""
import html
import imp
import sys
import time
import json
Expand Down
5 changes: 3 additions & 2 deletions xqueue_watcher/jailedgrader.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import codecs
import os
import sys
import imp
import importlib
import json
import random
import gettext
Expand Down Expand Up @@ -122,7 +122,8 @@ def grade(self, grader_path, grader_config, submission):
# Import the grader, straight from the original file. (It probably isn't in
# sys.path, and we may be in a long running gunicorn process, so we don't
# want to add stuff to sys.path either.)
grader_module = imp.load_source("grader_module", str(grader_path))
sf_loader = importlib.machinery.SourceFileLoader("grader_module", str(grader_path))
grader_module = sf_loader.load_module()
grader = grader_module.grader

# Preprocess for grader-specified errors
Expand Down
Loading