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

Updated to match the newest version of source repository #2

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
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
76 changes: 76 additions & 0 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
name: Python package

on: [push, pull_request]

jobs:
build:
runs-on: ubuntu-latest
services:
postgres:
image: postgres
env:
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
mysql:
image: mysql
env:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: root
options: >-
--health-cmd "mysqladmin -uroot -proot ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 3306:3306
env:
PYTHONDEVMODE: 1
DJANGO_DATABASE_HOST_POSTGRES: localhost
DJANGO_DATABASE_USER_POSTGRES: postgres
DJANGO_DATABASE_NAME_POSTGRES: postgres
DJANGO_DATABASE_PASSWORD_POSTGRES: postgres
DJANGO_DATABASE_HOST_MYSQL: 127.0.0.1
DJANGO_DATABASE_USER_MYSQL: root
DJANGO_DATABASE_NAME_MYSQL: root
DJANGO_DATABASE_PASSWORD_MYSQL: root
strategy:
matrix:
python-version: [3.8, 3.9, '3.10', '3.11', '3.12']
django-version:
- '>=5.0,<6.0'
- '>=4.2,<5.0'
exclude:
- python-version: 3.9
django-version: '>=5.0,<6.0'
- python-version: 3.8
django-version: '>=5.0,<6.0'
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies (Django ${{ matrix.django-version }})
run: |
python -m pip install --upgrade pip
python -m pip install --pre django'${{ matrix.django-version }}'
python -m pip install flake8 coverage sphinx sphinx_rtd_theme psycopg2 mysqlclient -e .
- name: Lint with flake8
run: |
flake8
- name: Check no missing migrations
run: |
tests/manage.py makemigrations --check
- name: Test with unittest
run: |
coverage run tests/manage.py test tests
coverage report
- name: Build docs
run: |
(cd docs && sphinx-build -n -W . _build)
26 changes: 26 additions & 0 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Upload Python Package

on:
release:
types: [created]

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python setup.py sdist bdist_wheel
twine upload dist/*
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
.project
.pydevproject
.settings
.venv
*.pyc
*.pyo
dist
Expand All @@ -13,3 +14,4 @@ docs/_build
.coverage
*.sqlite3
.idea
.idea/
11 changes: 11 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
version: 2
build:
os: ubuntu-20.04
tools:
python: "3.9"
sphinx:
configuration: docs/conf.py
python:
install:
- method: pip
path: .
53 changes: 0 additions & 53 deletions .travis.yml

This file was deleted.

147 changes: 137 additions & 10 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,132 @@
django-reversion changelog
==========================

5.1.0 - 2024-08-09
------------------

- Django 5 support (@jeremy-engel).
- Use bulk_create`` on supported databases (@stianjensen).


5.0.12 - 2024-01-30
-------------------

- Fix missing migration introduced in v5.0.11.


5.0.11 - 2024-01-29
-------------------

- Improved the Chinese translation (@zengqiu).


5.0.10 - 2023-12-30
-------------------

- Fix N+1 queries while rendering the ``recover_list.html`` template (@armonge).


5.0.9 - 2023-12-20
------------------

- Broken release.


5.0.8 - 2023-11-08
------------------

- Fix ``get_deleted`` (@siddarta-weis, @etianen).


5.0.7 - 2023-11-07
------------------

- Speed up ``get_deleted`` (@caullla).


5.0.6 - 2023-09-29
------------------

- Fix handling case of missing object in admin revert (@julianklotz)


5.0.5 - 2023-09-19
------------------

- Handling case of missing object in admin revert (@etianen, @PavelPancocha)
- CI improvements (@etianen, @browniebroke)


5.0.4 - 2022-11-12
------------------

- Fix warning log formatting for failed reverts (@tony).


5.0.3 - 2022-10-02
------------------

- A revision will no longer be created if a transaction is marked as rollback, as this would otherwise cause an
additional database error (@proofit404).
- A warning log is now emitted if a revert fails due to database integrity errors, making debugging the final
``RevertError`` easier.


5.0.2 - 2022-08-06
------------------

- Fixed doc builds on readthedocs (@etianen).


5.0.1 - 2022-06-18
------------------

- Fix admin detail view in multi-database configuration (@atten).


5.0.0 - 2022-02-20
------------------

- Added support for using django-reversion contexts in ``asyncio`` tasks (@bellini666).
- **Breaking:** Dropped support for Python 3.6.


4.0.2 - 2022-01-30
------------------

- Improved performance of `createinitialrevisions` management command (@philipstarkey).


4.0.1 - 2021-11-04
------------------

- Django 4.0b support (@smithdc1, @kevinmarsh).
- Optimized ``VersionQuerySet.get_deleted``.


4.0.0 - 2021-07-09
------------------

- **Breaking:** The ``create_revision`` view decorator and ``RevisionMiddleware`` no longer roll back the revision and
database transaction on response status code >= 400. It's the responsibility of the view to use `transaction.atomic()`
to roll back any invalid data. This can be enabled globally by setting ``ATOMIC_REQUESTS=True``. (@etianen)

https://docs.djangoproject.com/en/3.1/ref/settings/#std:setting-DATABASE-ATOMIC_REQUESTS

- Fixing gettext plural forms with Django (@martinsvoboda).
- Deprecation removals (@lociii, @Peter-van-Tol).
- CI testing improvements (@etianen, @michael-k).
- Documentation fixes (@erikrw, @jedie, @michael-k).


3.0.9 - 2021-01-22
------------------

- Significant speedup to ``Version.objects.get_deleted(...)`` database query for PostgreSQL (@GeyseR).
- Testing against Django 3.1 (@michael-k).
- Django 4.0 compatibility improvements (@GitRon).


3.0.8 - 2020-08-31
------------------

Expand All @@ -26,13 +152,14 @@ django-reversion changelog
- Documentation fixes (@chicheng).


3.0.5 - 2019-02-12
3.0.5 - 2019-12-02
------------------

- Improved performance of `get_deleted` for large datasets (@jeremy-engel).
- Django 3.0 compatibility (@claudep).
- Drops Django < 1.11 compatibility (@claudep).
- Fixed errors in manageement commands when `django.contrib.admin` is not in `INSTALLED_APPS` (@irtimir).
- Drops Python 2.7 compatibility (@claudep).
- Fixed errors in management commands when `django.contrib.admin` is not in `INSTALLED_APPS` (@irtimir).


3.0.4 - 2019-05-22
Expand Down Expand Up @@ -77,7 +204,7 @@ django-reversion changelog
------------------

- **Breaking:** ``Revision.comment`` now contains the raw JSON change message generated by django admin, rather than
a string. Accesing ``Revision.comment`` directly is no longer recommended. Instead, use ``Revision.get_comment()``.
a string. Accessing ``Revision.comment`` directly is no longer recommended. Instead, use ``Revision.get_comment()``.
(@RamezIssac).
- **BREAKING:** django-reversion now uses ``_base_manager`` to calculate deleted models, not ``_default_manager``. This
change will only affect models that perform default filtering in their ``_default_manager`` (@ivissani).
Expand Down Expand Up @@ -434,7 +561,7 @@ Models

.. code:: python

# New-style import for accesssing admin class.
# New-style import for accessing admin class.
from reversion.admin import VersionAdmin

# Use the admin class directly.
Expand All @@ -461,7 +588,7 @@ Models

.. code:: python

# New-style import for accesssing the low-level API.
# New-style import for accessing the low-level API.
from reversion import revisions as reversion

# Use low-level API methods from the revisions namespace.
Expand All @@ -486,7 +613,7 @@ Models

.. code:: python

# New-style import for accesssing the reversion signals.
# New-style import for accessing the reversion signals.
from reversion.signals import pre_revision_commit, post_revision_commit

# Use reversion signals directly.
Expand Down Expand Up @@ -615,7 +742,7 @@ Models
----------------

* Django 1.5 compatibility.
* Experimantal Python 3.3 compatibility!
* Experimental Python 3.3 compatibility!


1.6.6 - 12/02/2013
Expand Down Expand Up @@ -655,7 +782,7 @@ Models
------------------

* Swedish translation.
* Fixing formating for PyPi readme and license.
* Fixing formatting for PyPi readme and license.
* Minor features and bugfixes.


Expand Down Expand Up @@ -719,8 +846,8 @@ Models
* Added Polish translation.
* Added French translation.
* Improved resilience of unit tests.
* Improved scaleability of Version.object.get_deleted() method.
* Improved scaleability of createinitialrevisions command.
* Improved scalability of Version.object.get_deleted() method.
* Improved scalability of createinitialrevisions command.
* Removed post_syncdb hook.
* Added new createinitialrevisions management command.
* Fixed DoesNotExistError with OneToOneFields and follow.
Expand Down
Loading
Loading