Configure GitHub Actions workflow to run tests only on pull requests and remove Python 3.9 support#114
Merged
ChasNelson1990 merged 4 commits intochas/update-pythonfrom Dec 8, 2025
Merged
Conversation
Co-authored-by: ChasNelson1990 <7795189+ChasNelson1990@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix tests to run on pull request but not on push
Configure GitHub Actions workflow to run tests only on pull requests
Dec 8, 2025
Member
|
@copilot the 2.10 tests fail the Setup Extension step with: > ckan -c test.ini db init
Traceback (most recent call last):
File "/usr/local/bin/ckan", line 3, in <module>
from ckan.cli.cli import ckan
File "/srv/app/src/ckan/ckan/cli/__init__.py", line 13, in <module>
from ckan.types import Config
File "/srv/app/src/ckan/ckan/types/__init__.py", line 18, in <module>
from flask.wrappers import Response, Request
File "/usr/local/lib/python3.10/site-packages/flask/__init__.py", line 6, in <module>
from . import json as json
File "/usr/local/lib/python3.10/site-packages/flask/json/__init__.py", line 9, in <module>
from jinja2.utils import htmlsafe_json_dumps as _jinja_htmlsafe_dumps
File "/usr/local/lib/python3.10/site-packages/jinja2/__init__.py", line 33, in <module>
from jinja2.environment import Environment, Template
File "/usr/local/lib/python3.10/site-packages/jinja2/environment.py", line 16, in <module>
from jinja2.defaults import BLOCK_START_STRING, \
File "/usr/local/lib/python3.10/site-packages/jinja2/defaults.py", line 32, in <module>
from jinja2.tests import TESTS as DEFAULT_TESTS
File "/usr/local/lib/python3.10/site-packages/jinja2/tests.py", line 13, in <module>
from collections import Mapping
ImportError: cannot import name 'Mapping' from 'collections' (/usr/local/lib/python3.10/collections/__init__.py) |
Author
... The failure is due to an incompatibility between jinja2==2.10.1 and Python 3.10. In Python 3.10+, The workflow file currently pins jinja2==2.10.1 and markupsafe==2.0.1. These versions need to be updated or removed. Would you like me to remove these pinned versions, or do you know which versions are compatible with all CKAN versions being tested (2.9, 2.10, 2.11)? |
The pinned versions jinja2==2.10.1 and markupsafe==2.0.1 are incompatible with Python 3.10+, causing ImportError for collections.Mapping. Removing these pins allows CKAN to install compatible versions for each version. Co-authored-by: ChasNelson1990 <7795189+ChasNelson1990@users.noreply.github.com>
Copilot stopped work on behalf of
ChasNelson1990 due to an error
December 8, 2025 16:43
Copilot stopped work on behalf of
ChasNelson1990 due to an error
December 8, 2025 16:53
Member
|
@copilot remove python 3.9 (and thus ckan 2.8) support |
Removed Python 3.9 from the lint job and CKAN 2.9 test configuration, focusing support on Python 3.10 with CKAN 2.10 and 2.11 only. Co-authored-by: ChasNelson1990 <7795189+ChasNelson1990@users.noreply.github.com>
Author
Copilot
AI
changed the title
Configure GitHub Actions workflow to run tests only on pull requests
Configure GitHub Actions workflow to run tests only on pull requests and remove Python 3.9 support
Dec 8, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes Made
on: [push, pull_request]toon: [pull_request]to run tests only on pull requestsThe workflow now runs tests exclusively on pull requests using Python 3.10 with CKAN 2.10 and 2.11.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.