Skip to content
Open
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
11 changes: 9 additions & 2 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
name: run-tests
on: [push, pull_request, workflow_dispatch]
on:
push:
branches:
- main
- master
- development
pull_request:
workflow_dispatch:
jobs:
build:
name: Run tests
strategy:
matrix:
os: [ubuntu-latest]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
Expand Down
4 changes: 1 addition & 3 deletions devtools/gearbox/quickstart/command.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from __future__ import print_function

import re
import os
import shutil
Expand Down Expand Up @@ -244,4 +242,4 @@ def safe_name(name: str) -> str:

from setuptools.pkg_resources.safe_name
"""
return re.sub('[^A-Za-z0-9.]+', '-', name)
return re.sub('[^A-Za-z0-9.]+', '-', name)
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ As {{project}} grows and the authentication method changes, only these tests
should be updated.

"""
from __future__ import unicode_literals

from {{package}}.tests import TestController


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class TestRootController(TestController):
assert msg in response

# You can also access a BeautifulSoup'ed response in your tests
# (First run $ easy_install BeautifulSoup
# (First run `pip install beautifulsoup4`
# and then uncomment the next two lines)

# links = response.html.findAll('a')
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# -*- coding: utf-8 -*-
"""Test suite for the TG app's models"""
from __future__ import unicode_literals

from {{package}} import model
from {{package}}.tests.models import ModelTest

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# -*- coding: utf-8 -*-
"""Setup the {{project}} application"""
from __future__ import print_function, unicode_literals

{{if sqlalchemy}}
import transaction
{{endif}}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# -*- coding: utf-8 -*-
"""Setup the {{project}} application"""
from __future__ import print_function

from tg import config
{{if sqlalchemy}}
import transaction
Expand Down Expand Up @@ -32,4 +30,4 @@ def setup_schema(command, conf, vars):
alembic_cfg.set_main_option("sqlalchemy.url", config['sqlalchemy.url'])
import alembic.command
alembic.command.stamp(alembic_cfg, "head")
{{endif}}
{{endif}}
1 change: 0 additions & 1 deletion devtools/gearbox/quickstart/template/migration/env.py_tmpl
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from __future__ import with_statement
from alembic import context
from sqlalchemy import engine_from_config, pool

Expand Down
7 changes: 1 addition & 6 deletions devtools/gearbox/sqlamigrate.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,9 @@
check http://code.google.com/p/sqlalchemy-migrate/wiki/MigrateVersioning for detail.

"""
from __future__ import print_function
from configparser import ConfigParser
from gearbox.command import Command

try:
from configparser import ConfigParser
except ImportError:
from ConfigParser import ConfigParser

import sys, os

class MigrateCommand(Command):
Expand Down
2 changes: 0 additions & 2 deletions devtools/gearbox/tgext/command.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from __future__ import print_function

from gearbox.command import TemplateCommand
import re, getpass

Expand Down
4 changes: 2 additions & 2 deletions devtools/gearbox/tgext/template/pyproject.toml_tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ name = {{repr(package)}}
version = "{{version}}"
description = "{{description or ''}}"
readme = { file = "README.rst", content-type = "text/x-rst" }
requires-python = ">=3.8"
classifiers = [] # Get strings from http://pypi.python.org/pypi?%3Aaction=list_classifiers
keywords = {{repr(keywords or '')}}
keywords = [{{repr(keywords or '')}}]
authors = [
{ name = {{repr(author or '')}}, email = {{repr(author_email or '')}} }
]
Expand All @@ -24,4 +25,3 @@ exclude = ["ez_setup", "examples", "tests"]
[tool.setuptools]
include-package-data = true
zip-safe = false
namespace_packages = ["tgext"]
7 changes: 0 additions & 7 deletions devtools/gearbox/tgext/template/tgext/__init__.py

This file was deleted.

8 changes: 3 additions & 5 deletions devtools/gearbox/tgshell.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from __future__ import print_function

import os, sys
import tg

Expand Down Expand Up @@ -71,9 +69,9 @@ def take_action(self, opts):
if self._can_import(helpers_module):
locs['h'] = sys.modules[helpers_module]

exec ('import tg') in locs
exec ('from tg import app_globals, config, request, response, '
'session, tmpl_context, url') in locs
exec('import tg', locs)
exec('from tg import app_globals, config, request, response, '
'session, tmpl_context, url', locs)
locs.pop('__builtins__', None)

# Import all objects from the base module
Expand Down
1 change: 0 additions & 1 deletion devtools/tests/test_quickstart.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@


PY_VERSION = sys.version_info[:2]
PY2 = sys.version_info[0] == 2
PROJECT_NAME = 'TGTest-%02d'
ENV_NAME = 'TESTENV'
CLEANUP = True
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ build-backend = "setuptools.build_meta"
name = "tg.devtools"
version = "2.5.1dev1"
description = "TurboGears 2 DevTools is a command-line toolkit that streamlines TurboGears2 development."
requires-python = ">=3.10"
readme = { file = "README.rst", content-type = "text/x-rst" }
keywords = ["turbogears", "devtools", "cli", "scaffold", "gearbox"]
classifiers = []
Expand Down
Loading