Skip to content

Commit

Permalink
Merge branch 'release/2.6'
Browse files Browse the repository at this point in the history
* release/2.6: (24 commits)
  lint
  updats tox matrix
  fixes tox matrix
  updats tox
  updates tox config
  add flake8 config
  updates CI
  lint
  updates CI
  lint
  preparing release
  update tox
  updates tox.ini
  updates tox
  add missing pyproject.toml
  pep 621
  updated RTD deps
  updated RTD deps
  updated RTD config
  updated RTD config
  ...
  • Loading branch information
saxix committed Sep 28, 2024
2 parents 10ac3ac + 499cae5 commit 2195839
Show file tree
Hide file tree
Showing 70 changed files with 2,245 additions and 1,277 deletions.
13 changes: 13 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[flake8]
max-complexity = 12
max-line-length = 120
exclude =
.*/
__pycache__
docs
~build
dist
*.md

per-file-ignores =
src/**/migrations/*.py:E501
4 changes: 2 additions & 2 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [ "3.9", "3.11"]
django-version: [ "3.2", "4.2"]
python-version: [ "3.11", "3.12"]
django-version: [ "4.2", "5.1"]
db-engine: ["pg", "mysql"]
env:
PY_VER: ${{ matrix.python-version}}
Expand Down
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
!.gitignore
!.editorconfig
!.pre-commit-config.yaml
!.readthedocs.yaml
!.flake8
coverage.xml
notes.txt
build/
Expand All @@ -19,5 +21,6 @@ __pycache__
.testmondata
Pipfile.lock
poetry.lock
pyproject.toml
!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
37 changes: 37 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Read the Docs configuration file for Sphinx projects
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Set the OS, Python version and other tools you might need
build:
os: ubuntu-22.04
tools:
python: "3.10"
# You can also specify other tool versions:
# nodejs: "20"
# rust: "1.70"
# golang: "1.20"

# Build documentation in the "docs/" directory with Sphinx
sphinx:
configuration: docs/conf.py
# You can configure Sphinx to use a different builder, for instance use the dirhtml builder for simpler URLs
# builder: "dirhtml"
# Fail on all warnings to avoid broken references
# fail_on_warning: true

# Optionally build your docs in additional formats such as PDF and ePub
# formats:
# - pdf
# - epub

# Optional but recommended, declare the Python requirements required
# to build your documentation
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
python:
install:
- requirements: docs/requirements.pip
- method: pip
path: .
8 changes: 8 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
Release 2.6
-----------
* add support do Django 5.x
* drop support python 3.9
* drop support django 3.x
* move to .pyproject.toml


Release 2.5
-----------
* BUG FIX: fixes check() implementation
Expand Down
26 changes: 0 additions & 26 deletions Pipfile

This file was deleted.

8 changes: 4 additions & 4 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 @@ -81,7 +81,7 @@
version = concurrency.VERSION
# The full version, including alpha/beta/rc tags.
release = concurrency.VERSION
next_version = '1.5'
next_version = '2.6'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
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
4 changes: 2 additions & 2 deletions docs/requirements.pip
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
sphinx==3.5.2
django==3.1
sphinx
django
sphinx_issues
70 changes: 70 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
[project]
name = "django-concurrency"
version = "2.6.0"
description = "Optimistic lock implementation for Django. Prevents users from doing concurrent editing"
authors = [
{name = "sax", email = "[email protected]"},
]
dependencies = []
requires-python = ">=3.10"
readme = "README.md"
license = {text = "MIT"}

[project.optional-dependencies]
dj4 = [
"django>=4.2,<5",
]
dj5 = [
"django>=5.1",
]

[tool.pdm]
[[tool.pdm.source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"

[tool.pdm.dev-dependencies]
dev = [
"black>=24.8.0",
"bump2version>=1.0.1",
"check-manifest",
"django-reversion",
"django-webtest",
"flake8",
"isort",
"mock",
"pre-commit",
"psycopg2-binary",
"pytest>=8.3.3",
"pytest-cov",
"pytest-django",
"pytest-echo",
"sphinx",
"sphinx-issues",
"tox",
"twine",
]

[tool.isort]
profile = "black"

[tool.black]
line-length = 120
include = '\.pyi?$'
exclude = '''
/(
\.git
| \.hg
| \.mypy_cache
| \.tox
| \.venv
| venv
| _build
| buck-out
| build
| dist
| migrations
| snapshots
)/
'''
28 changes: 0 additions & 28 deletions setup.cfg

This file was deleted.

75 changes: 0 additions & 75 deletions setup.py

This file was deleted.

6 changes: 3 additions & 3 deletions src/concurrency/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__author__ = 'sax'
__author__ = "sax"

VERSION = __version__ = "2.5"
NAME = 'django-concurrency'
VERSION = __version__ = "2.5.0"
NAME = "django-concurrency"
Loading

0 comments on commit 2195839

Please sign in to comment.