Skip to content

Commit

Permalink
pep 621
Browse files Browse the repository at this point in the history
  • Loading branch information
saxix committed Jan 26, 2024
1 parent f3c5ac1 commit 8b233b9
Show file tree
Hide file tree
Showing 15 changed files with 25 additions and 157 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,4 @@ Pipfile.lock
poetry.lock
pyproject.toml
.venv/
pdm.lock
10 changes: 2 additions & 8 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,9 @@ repos:
entry: isort
language: system
types: [python]
- id: check-manifest
name: check-manifest
entry: check-manifest
language: system
types: [python]
files: '^$'
always_run: true

- repo: git://github.com/pre-commit/pre-commit-hooks

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v1.4.0
hooks:
- id: debug-statements
Expand Down
2 changes: 1 addition & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ version: 2
build:
os: ubuntu-22.04
tools:
python: "3.9"
python: "3.10"
# You can also specify other tool versions:
# nodejs: "20"
# rust: "1.70"
Expand Down
1 change: 1 addition & 0 deletions CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
-----------
* add support do Django 5.x
* drop support python 3.9
* move to .pyproject.toml


Release 2.5
Expand Down
26 changes: 0 additions & 26 deletions Pipfile

This file was deleted.

6 changes: 3 additions & 3 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@
'django': ('http://django.readthedocs.org/en/latest/', None),
'sphinx': ('http://sphinx.readthedocs.org/en/latest/', None),
}
extlinks = {'issue': ('https://github.com/saxix/django-concurrency/issues/%s', 'issue #'),
'django_issue': ('https://code.djangoproject.com/ticket/%s', 'issue #'),
extlinks = {'issue': ('https://github.com/saxix/django-concurrency/issues/%s', 'issue #%s'),
'django_issue': ('https://code.djangoproject.com/ticket/%s', 'issue #%s'),

}

Expand Down Expand Up @@ -122,7 +122,7 @@

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
html_theme = "default"
# html_theme = "default"
#
# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
Expand Down
2 changes: 1 addition & 1 deletion docs/requirements.pip
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
sphinx==3.5.2
sphinx
django
sphinx_issues
9 changes: 0 additions & 9 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,3 @@ max-complexity = 12
max-line-length = 160
exclude = .tox,migrations,.git,docs,diff_match_patch.py, deploy/**,settings
ignore = E501,E401,W391,E128,E261,E731,W504

[aliases]
test=pytest

[bdist_wheel]
universal=1

[devpi:upload]
formats = bdist_wheel,sdist.tgz
97 changes: 0 additions & 97 deletions setup.py

This file was deleted.

8 changes: 4 additions & 4 deletions src/concurrency/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,14 @@
from django.core.exceptions import ImproperlyConfigured, ValidationError
from django.db import transaction
from django.db.models import Q
from django.forms import CheckboxInput
from django.forms.formsets import INITIAL_FORM_COUNT, ManagementForm, MAX_NUM_FORM_COUNT, TOTAL_FORM_COUNT
from django.forms.models import BaseModelFormSet
from django.http import HttpResponse, HttpResponseRedirect
from django.utils.encoding import force_str
from django.utils.html import format_html
from django.utils.safestring import mark_safe
from django.utils.translation import ngettext
from django.utils.translation import gettext_lazy as _, ngettext

from concurrency import core, forms
from concurrency.api import get_revision_of_object
Expand All @@ -23,9 +25,7 @@
from concurrency.exceptions import RecordModifiedError
from concurrency.forms import ConcurrentForm, VersionWidget
from concurrency.utils import flatten
from django.forms import CheckboxInput
from django.utils.html import format_html
from django.utils.translation import gettext_lazy as _

ALL = object()


Expand Down
2 changes: 0 additions & 2 deletions tests/demoapp/demo/backends.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from typing import Any

from django.conf import settings
from django.contrib.auth import get_user_model
from django.contrib.auth.backends import ModelBackend
Expand Down
3 changes: 2 additions & 1 deletion tests/demoapp/demo/migrations5/0001_initial.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
# Generated by Django 5.0.1 on 2024-01-25 17:49

import concurrency.fields
import django.contrib.auth.models
import django.db.models.deletion
from django.conf import settings
from django.db import migrations, models

import concurrency.fields


class Migration(migrations.Migration):

Expand Down
4 changes: 2 additions & 2 deletions tests/demoapp/demo/settings.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import os
from tempfile import mktemp

import django

try:
from psycopg2cffi import compat

Expand Down Expand Up @@ -28,8 +30,6 @@
'reversion',
'demo'
]
import django

IS_DJANGO_5 = django.VERSION[0] == 5
if IS_DJANGO_5:
MIGRATION_MODULES = {
Expand Down
3 changes: 2 additions & 1 deletion tests/test_forms.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
from django.conf import settings
from django.core.exceptions import ImproperlyConfigured, SuspiciousOperation
from django.forms.models import modelform_factory
from django.forms.widgets import HiddenInput, TextInput
from django.test import override_settings, TestCase
from django.test.testcases import SimpleTestCase
from django.utils.encoding import smart_str
from django.utils.translation import gettext as _
from django.conf import settings

import pytest

from concurrency.exceptions import VersionError
Expand Down
8 changes: 6 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ deps =
.[dev]
pypy-pg: psycopg2cffi
mysql: mysqlclient
docs: -rdocs/requirements.pip
d32: django==3.2.*
d42: django==4.2.*
d50: django==5.0.*
Expand Down Expand Up @@ -78,6 +77,12 @@ commands =


[testenv:docs]
basepython = python310
allowlist_externals =
mkdir
pipenv
deps =
-rdocs/requirements.pip
commands =
mkdir -p {toxinidir}/~build/docs
pipenv run sphinx-build -aE docs/ {toxinidir}/~build/docs
Expand All @@ -104,4 +109,3 @@ commands =
python -c "import shutil; shutil.rmtree('dist', ignore_errors=True)"
python -m build
python -m twine upload --repository-url https://test.pypi.org/legacy/ dist/*

0 comments on commit 8b233b9

Please sign in to comment.