diff --git a/.github/ISSUE_TEMPLATE/bug-report.yml b/.github/ISSUE_TEMPLATE/bug-report.yml new file mode 100644 index 00000000..e911e842 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug-report.yml @@ -0,0 +1,22 @@ +name: Bug Report +description: Create a report to help us improve. +labels: ["bug"] +body: + - type: textarea + attributes: + label: Current Situation + description: Discuss what the current issue is, how to reproduce, and link to any relevant prior discussion/context. + validations: + required: true + - type: textarea + attributes: + label: Proposed Actions + description: Describe what ought to be done, and why that will address the reasons for action mentioned above. + validations: + required: false + - type: textarea + attributes: + label: System Information + description: Versions for things such as... Django-dbbackup, Python, Django, Operating System, etc. + validations: + required: false diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md deleted file mode 100644 index 579cf09a..00000000 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ /dev/null @@ -1,35 +0,0 @@ ---- -name: Bug report -about: Create a report to help us improve ---- - -# Bug Report - -_Please help us help you by filling out any applicable information in this template and removing the rest!_ - -## Describe the bug - -A clear and concise description of what the bug is. - -## To Reproduce - -Steps to reproduce the behavior - -## Expected behavior - -A clear and concise description of what you expected to happen. - -## Screenshots or reproduction - -If applicable, add screenshots (errors, example of the behavior, etc.) to help explain your problem or post a link to a repository that replicates the issue. - -## Versions - -### Django-dbbackup -- pypi: [e.g. 3.3.0] - -### External tools - -- Python: [e.g. 3.7] -- Django: [e.g. 2.2.0] -- OS: [Linux, MacOS, Windows] diff --git a/.github/ISSUE_TEMPLATE/feature-request.yml b/.github/ISSUE_TEMPLATE/feature-request.yml new file mode 100644 index 00000000..7d7a4084 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature-request.yml @@ -0,0 +1,16 @@ +name: Feature request +description: Suggest an idea for this project. +labels: ["feature-request"] +body: + - type: textarea + attributes: + label: Feature description + description: Describe what the feature is, why it is needed, and link any relevant prior discussion/context. + validations: + required: true + - type: textarea + attributes: + label: Alternatives options + description: Describe any alternatives to this feature, and why they were not chosen. + validations: + required: false diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md deleted file mode 100644 index 49c3a9cc..00000000 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ /dev/null @@ -1,24 +0,0 @@ ---- -name: Feature request -about: Suggest an idea for this project ---- - -# Feature Request - -_Please help us help you by filling out any applicable information in this template and removing the rest!_ - -## Is your feature request related to a problem? - -A clear and concise description of what the problem is. If this is a bug, please open a bug report instead of a feature request! - -## Describe the solution you'd like - -A clear and concise description of what you want to happen. Please also include alternative solutions or features you've considered. - -## Additional context - -Add any other context or screenshots about the feature request here. - -## PR link - -If you have opened a pull request to address the issue, please link it here. diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 11f99dc1..a5553200 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,15 +1,14 @@ -# Type of PR (feature, enhancement, bug fix, etc.) - ## Description -Please include a summary of the change and which issue is fixed. - -Fixes # (issue) + -## Why should this be added +## Checklist -Explain value. +Please update this checklist as you complete each item: -## Checklist +- [ ] Tests have been developed for bug fixes or new functionality. +- [ ] The changelog has been updated, if necessary. +- [ ] Documentation has been updated, if necessary. +- [ ] GitHub Issues closed by this PR have been linked. -- [ ] Documentation has been added or amended for this feature / update +By submitting this pull request I agree that all contributions comply with this project's open source license(s). diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4115766f..53d5f6e9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.7", "3.8", "3.9", "3.10"] + python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"] steps: - uses: actions/checkout@v2 - name: Set up Python ${{ matrix.python-version }} @@ -24,7 +24,10 @@ jobs: python -m pip install --upgrade pip python -m pip install -r requirements/tests.txt python -m pip install -r requirements.txt - - name: Linting + # TODO: Remove this conditional when Python 3.7 is dropped and Flake8 executes on + # all Python versions in matrix. + - if: matrix.python-version == '3.8' + name: Linting run: flake8 # Environments are selected using tox-gh-actions configuration in tox.ini. - name: Test with tox diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 50944fbd..d79957ab 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -33,7 +33,7 @@ repos: hooks: - id: yesqa - repo: https://github.com/pycqa/isort - rev: "5.10.1" + rev: "5.12.0" hooks: - id: isort args: ["--profile", "black"] diff --git a/dbbackup/VERSION b/dbbackup/VERSION index 4d54dadd..ee74734a 100644 --- a/dbbackup/VERSION +++ b/dbbackup/VERSION @@ -1 +1 @@ -4.0.2 +4.1.0 diff --git a/dbbackup/tests/test_storage.py b/dbbackup/tests/test_storage.py index e9b38558..e5ba32fb 100644 --- a/dbbackup/tests/test_storage.py +++ b/dbbackup/tests/test_storage.py @@ -23,7 +23,11 @@ def test_set_path(self): @patch("dbbackup.settings.STORAGE", DEFAULT_STORAGE_PATH) def test_set_options(self, *args): storage = get_storage(options=STORAGE_OPTIONS) - self.assertEqual(storage.storage.__module__, "django.core.files.storage") + self.assertIn( + storage.storage.__module__, + # TODO: Remove "django.core.files.storage" case when dropping support for Django < 4.2. + ("django.core.files.storage", "django.core.files.storage.filesystem"), + ) class StorageTest(TestCase): diff --git a/docs/index.rst b/docs/index.rst index 93c23370..236dcdb0 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -42,7 +42,7 @@ Compatibility As we want to ensure a lot of platforms will be able to save data before upgrading, Django-DBBackup supports PyPy, 3.2 to 3.5 and Django -greater than 2.2 +greater than 3.2. Other Resources =============== diff --git a/requirements.txt b/requirements.txt index 8053d290..b39b5e0c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,2 @@ -django>=2.2 +django>=3.2 pytz diff --git a/requirements/build.txt b/requirements/build.txt index 82e745cf..b1434cfc 100644 --- a/requirements/build.txt +++ b/requirements/build.txt @@ -1,5 +1,5 @@ build setuptools -tox +tox>=4.0.0 twine wheel diff --git a/requirements/tests.txt b/requirements/tests.txt index e975d619..a189f4c9 100644 --- a/requirements/tests.txt +++ b/requirements/tests.txt @@ -9,5 +9,5 @@ python-dotenv python-gnupg>=0.5.0 pytz testfixtures -tox +tox>=4.0.0 tox-gh-actions diff --git a/setup.py b/setup.py index ce7fc362..c60490c2 100644 --- a/setup.py +++ b/setup.py @@ -48,9 +48,9 @@ def get_test_requirements(): "Development Status :: 4 - Beta", "Environment :: Web Environment", "Environment :: Console", - "Framework :: Django :: 2.2", "Framework :: Django :: 3.2", - "Framework :: Django :: 4.0", + "Framework :: Django :: 4.2", + "Framework :: Django :: 5.0", "Intended Audience :: Developers", "Intended Audience :: System Administrators", "License :: OSI Approved :: BSD License", @@ -61,6 +61,8 @@ def get_test_requirements(): "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", "Topic :: Database", "Topic :: System :: Archiving", "Topic :: System :: Archiving :: Backup", diff --git a/tox.ini b/tox.ini index da3732f2..bafe8999 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py{37,38,39}-django22,py{37,38,39,310}-django{32,40,master},lint,docs,functional +envlist = py{37,38,39,310,311,312}-django{32,42,50,master},lint,docs,functional [testenv] passenv = * @@ -7,19 +7,21 @@ setenv = PYTHONDONTWRITEBYTECODE=1 deps = -rrequirements/tests.txt - django22: django>=2.2,<2.3 django32: django>=3.2,<3.3 - django40: django>=4.0,<4.1 + django42: django>=4.2,<4.3 + django50: django>=5.0,<5.1 djangomaster: https://github.com/django/django/archive/master.zip commands = {posargs:coverage run runtests.py} # Configure which test environments are run for each Github Actions Python version. [gh-actions] python = - 3.7: py37-django{22,32},functional - 3.8: py38-django{22,32,40},functional - 3.9: py39-django{22,32,40},functional - 3.10: py310-django{22,32,40},functional + 3.7: py37-django{32},functional + 3.8: py38-django{32,42},functional + 3.9: py39-django{32,42},functional + 3.10: py310-django{32,42,50},functional + 3.11: py311-django{42,50},functional + 3.12: py312-django{42,50},functional [testenv:lint] basepython = python @@ -29,14 +31,14 @@ commands = prospector dbbackup -0 [testenv:docs] basepython = python -whitelist_externals=make +allowlist_externals=make deps = -rrequirements/docs.txt commands = make docs [testenv:functional] basepython = python passenv = * -whitelist_externals = bash +allowlist_externals = bash deps = -rrequirements/tests.txt django @@ -48,7 +50,7 @@ commands = {posargs:bash -x functional.sh} [testenv:functional-mongodb] basepython = python passenv = * -whitelist_externals = bash +allowlist_externals = bash deps = -rrequirements/tests.txt djongo