Skip to content
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
27 changes: 27 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Tests

on:
push:
pull_request:

jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]

name: Python ${{ matrix.python }}

steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
allow-prereleases: true

- run: pip install tox tox-gh-actions

- run: tox
19 changes: 0 additions & 19 deletions .travis.yml

This file was deleted.

7 changes: 5 additions & 2 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,13 @@
Changelog
=========

1.3.1 (unreleased)
2.0.0 (unreleased)
------------------

- Nothing changed yet.
- Drop support for Python < 3.8
- Drop support for Django < 4.2.
- Add support for Django 4.2, 5.0, 5.1, 5.2, and 6.0.
- Add support for Python 3.10, 3.11, 3.12, 3.13, and 3.14.


1.3.0 (2018-09-04)
Expand Down
5 changes: 3 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
django-absoluteuri
==================

.. image:: https://travis-ci.org/fusionbox/django-absoluteuri.png?branch=master
:target: https://travis-ci.org/fusionbox/django-absoluteuri
.. image:: https://github.com/fusionbox/django-absoluteuri/actions/workflows/tests.yml/badge.svg
:target: https://github.com/fusionbox/django-absoluteuri/actions/workflows/tests.yml
:alt: Tests

Absolute URI functions and template tags for Django.

Expand Down
11 changes: 8 additions & 3 deletions absoluteuri/__init__.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
import pkg_resources

from django import urls
from django.conf import settings

__version__ = pkg_resources.get_distribution('django-absoluteuri').version
try:
from importlib.metadata import version

__version__ = version('django-absoluteuri')
except ImportError:
import pkg_resources

__version__ = pkg_resources.get_distribution('django-absoluteuri').version


def build_absolute_uri(path):
Expand Down
8 changes: 4 additions & 4 deletions absoluteuri/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from django.test import TestCase
from django.template import Template, Context
from django.conf.urls import url
from django.urls import re_path

import absoluteuri

Expand All @@ -12,9 +12,9 @@ def view(request, *args, **kwargs):


urlpatterns = [
url(r'^foo/$', view, name='view'),
url(r'^foo/(?P<foo>\w+)/$', view, name='view'),
url(r'^foo/(\d+)/$', view, name='view'),
re_path(r'^foo/$', view, name='view'),
re_path(r'^foo/(?P<foo>\w+)/$', view, name='view'),
re_path(r'^foo/(\d+)/$', view, name='view'),
]


Expand Down
20 changes: 9 additions & 11 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,15 @@ def read(fname):

setup(
name='django-absoluteuri',
version='1.3.1.dev0',
version='2.0.0',
description=__doc__,
long_description=readme + '\n\n' + changelog,
author='Fusionbox, Inc.',
author_email='programmers@fusionbox.com',
url='https://github.com/fusionbox/django-absoluteuri',
packages=[package for package in find_packages() if package.startswith('absoluteuri')],
install_requires=[
'Django>=1.11',
],
test_suite='setuptest.setuptest.SetupTestSuite',
tests_require=[
'django-setuptest',
'Django>=4.2',
],
license="Apache 2.0",
zip_safe=True,
Expand All @@ -36,11 +32,13 @@ def read(fname):
'Intended Audience :: Developers',
'License :: OSI Approved :: Apache Software License',
'Natural Language :: English',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Programming Language :: Python :: 3.13',
'Programming Language :: Python :: 3.14',
],
)
4 changes: 3 additions & 1 deletion test_settings.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# We just put it here to get the checks to shut up
MIDDLEWARE_CLASSES = []
MIDDLEWARE = []

INSTALLED_APPS = (
'django.contrib.sites',
Expand All @@ -14,6 +14,8 @@

SITE_ID = 1

SECRET_KEY = 'test-secret-key'

ROOT_URLCONF = 'absoluteuri.tests'

TEMPLATES = [
Expand Down
42 changes: 31 additions & 11 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,18 +1,38 @@
[tox]
envlist=
py{27,36}-dj111
py36-dj20
py36-dj21
py{38,39}-dj42
py310-dj{42,50,51,52}
py{311,312}-dj{42,50,51,52}
py313-dj{51,52}
py314-dj60
[testenv]
basepython=
py27: python2.7
py36: python3.6
py38: python3.8
py39: python3.9
py310: python3.10
py311: python3.11
py312: python3.12
py313: python3.13
py314: python3.14
setenv=
PYTHONPATH={toxinidir}
DJANGO_SETTINGS_MODULE=test_settings
commands=
/usr/bin/env
python setup.py test
django-admin test absoluteuri
deps=
dj111: Django>=1.11,<2.0
dj20: Django>=2.0,<2.1
dj21: Django>=2.1,<2.2
whitelist_externals=
dj42: Django>=4.2,<4.3
dj50: Django>=5.0,<5.1
dj51: Django>=5.1,<5.2
dj52: Django>=5.2,<5.3
dj60: Django>=6.0,<6.1
allowlist_externals=
env
[gh-actions]
python =
3.8: py38
3.9: py39
3.10: py310
3.11: py311
3.12: py312
3.13: py313
3.14: py314