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

Add support for Trac 1.6 and Python3 #141

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
23 changes: 12 additions & 11 deletions .github/workflows/runtests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,15 @@ jobs:
- run: git config --global user.email runtest@localhost
- run: nox --non-interactive --error-on-missing-interpreter --session runtests -- --git-default-branch=master

# runtests-py3:
# runs-on: ubuntu-latest
# steps:
# - uses: wntrblm/nox@2022.8.7
# with:
# python-versions: "3.7"
# - uses: actions/checkout@v4
# - run: git config --global user.name runtest
# - run: git config --global user.email runtest@localhost
# - run: git config --global init.defaultBranch main
# - run: nox --non-interactive --error-on-missing-interpreter --session runtests
runtests-py3:
runs-on: ubuntu-latest

steps:
- uses: wntrblm/nox@2022.8.7
with:
python-versions: "3.7, 3.8, 3.9, 3.10, 3.11, 3.12" # duplicated in noxfile.py
- uses: actions/checkout@v4
- run: git config --global user.name runtest
- run: git config --global user.email runtest@localhost
- run: git config --global init.defaultBranch main
- run: nox --non-interactive --error-on-missing-interpreter --session runtests
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -518,6 +518,7 @@ Changelog
* Add configuration option for path prefix of login and logout. (#127)
* Add `GitHubPolicy` permission policy to make `[timeline]`
`changeset_show_file` option work correctly. (#126)
* Support for Python3 (tested with 3.7 - 3.12) (requires Trac >= 1.6)

### 2.3

Expand Down
5 changes: 4 additions & 1 deletion noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,16 @@

if sys.version_info.major == 2:
TRAC_VERSIONS = ["1.4.4", "1.2.6"]
PYTHON_VERSIONS = ["2.7"]
else:
TRAC_VERSIONS = ["1.6"]
PYTHON_VERSIONS = ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"] # duplicated in runtests.yml


@nox.session
@nox.session(python=PYTHON_VERSIONS)
@nox.parametrize("trac", TRAC_VERSIONS)
def runtests(session, trac):
session.install("-r", "requirements_test.txt")
session.install("Trac==%s" % trac)
session.run("python", "--version")
session.run("python", "runtests.py", *session.posargs)
Loading
Loading