Skip to content

Commit

Permalink
3.0 (#509)
Browse files Browse the repository at this point in the history
  • Loading branch information
marksweb authored Dec 15, 2022
1 parent dd6fa02 commit aa02dea
Show file tree
Hide file tree
Showing 8 changed files with 92 additions and 17 deletions.
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
53 changes: 46 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,16 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [ 3.8]
requirements-file: [
django-3.2.txt
]
python-version: ['3.8', '3.9', '3.10', '3.11']
django-version: ['3.2', '4.0', '4.1']
os: [
ubuntu-20.04,
]
exclude:
- python-version: '3.11'
django-version: '3.2'
- python-version: '3.11'
django-version: '4.0'

steps:
- uses: actions/checkout@v1
Expand All @@ -25,11 +28,47 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements/base.txt
pip install -r requirements/optional.txt
pip install -r requirements/${{ matrix.requirements-file }}
pip install Django==${{ matrix.django-version }}
python setup.py install
- name: Run tests
run: coverage run --source=explorer manage.py test

- name: Upload Coverage to Codecov
uses: codecov/codecov-action@v3

unit-tests-future-versions:
# Runs for all Django/Python versions which are not yet supported
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11']
django-version: [
'https://github.com/django/django/archive/main.tar.gz'
]
os: [
ubuntu-20.04,
]

steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}

uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
coverage run --source=explorer manage.py test
coverage report
python -m pip install --upgrade pip
pip install ${{ matrix.django-version }} coverage
python setup.py install
- name: Run coverage
run: coverage run --source=explorer manage.py test
continue-on-error: true

- name: Upload Coverage to Codecov
uses: codecov/codecov-action@v3
26 changes: 26 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,20 @@ This project adheres to `Semantic Versioning <https://semver.org/>`_.
---------------------


`3.0.0`_ (2022-12-15)
---------------------
* Add support for Django >3.2 and drop support for <3.2
* Add support for Python 3.9, 3.10 and 3.11 and drop support for <3.8
* `#496`_: Document breakage of "Format" button due to ``CSRF_COOKIE_HTTPONLY`` (`#492`_)
* `#497`_: Avoid execution of parameterised queries when viewing query
* `#498`_: Change sql blacklist functionality from regex to sqlparse
* `#500`_: Form display in popup now requires sanitize: false flag
* `#501`_: Updated celery support
* `#504`_: Added pre-commit hooks
* `#505`_: Feature/more s3 providers
* `#506`_: Check sql blacklist on execution as well as save
* `#508`_: Conditionally import optional packages

`2.5.0`_ (2022-10-09)
---------------------
* `#494`_: Fixes Security hole in blacklist for MySQL (`#490`_)
Expand Down Expand Up @@ -360,6 +374,8 @@ Initial Release
.. _2.4.0: https://github.com/groveco/django-sql-explorer/compare/2.3.0...2.4.0
.. _2.4.1: https://github.com/groveco/django-sql-explorer/compare/2.4.0...2.4.1
.. _2.4.2: https://github.com/groveco/django-sql-explorer/compare/2.4.1...2.4.2
.. _2.5.0: https://github.com/groveco/django-sql-explorer/compare/2.4.2...2.5.0
.. _3.0.0: https://github.com/groveco/django-sql-explorer/compare/2.5.0...3.0.0
.. _unreleased: https://github.com/groveco/django-sql-explorer/compare/2.4.2...master

.. _#254: https://github.com/groveco/django-sql-explorer/pull/254
Expand Down Expand Up @@ -410,6 +426,15 @@ Initial Release
.. _#484: https://github.com/groveco/django-sql-explorer/pull/484
.. _#488: https://github.com/groveco/django-sql-explorer/pull/488
.. _#494: https://github.com/groveco/django-sql-explorer/pull/494
.. _#496: https://github.com/groveco/django-sql-explorer/pull/496
.. _#497: https://github.com/groveco/django-sql-explorer/pull/497
.. _#498: https://github.com/groveco/django-sql-explorer/pull/498
.. _#500: https://github.com/groveco/django-sql-explorer/pull/500
.. _#501: https://github.com/groveco/django-sql-explorer/pull/501
.. _#504: https://github.com/groveco/django-sql-explorer/pull/504
.. _#505: https://github.com/groveco/django-sql-explorer/pull/505
.. _#506: https://github.com/groveco/django-sql-explorer/pull/506
.. _#508: https://github.com/groveco/django-sql-explorer/pull/508

.. _#269: https://github.com/groveco/django-sql-explorer/issues/269
.. _#288: https://github.com/groveco/django-sql-explorer/issues/288
Expand All @@ -425,5 +450,6 @@ Initial Release
.. _#477: https://github.com/groveco/django-sql-explorer/issues/477
.. _#483: https://github.com/groveco/django-sql-explorer/issues/483
.. _#490: https://github.com/groveco/django-sql-explorer/issues/490
.. _#492: https://github.com/groveco/django-sql-explorer/issues/492

.. _furo: https://github.com/pradyunsg/furo
4 changes: 2 additions & 2 deletions explorer/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
__version_info__ = {
'major': 2,
'minor': 5,
'major': 3,
'minor': 0,
'micro': 0,
'releaselevel': 'final',
'serial': 0
Expand Down
2 changes: 1 addition & 1 deletion explorer/views/email.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class EmailCsvQueryView(PermissionRequiredMixin, View):
permission_required = 'view_permission'

def post(self, request, query_id, *args, **kwargs):
if request.is_ajax():
if request.META.get('HTTP_X_REQUESTED_WITH') == 'XMLHttpRequest':
email = request.POST.get('email', None)
if email:
execute_query.delay(query_id, email)
Expand Down
1 change: 0 additions & 1 deletion requirements/base.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
Django>=2.2.14
sqlparse>=0.4.0
coverage
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ def read(fname):
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3 :: Only',
],
python_requires='>=3.8',
Expand Down
11 changes: 5 additions & 6 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@
envlist =
flake8
isort
py{36}-dj{32}
; py{38,39,310}-dj{32,40,41,main}
; py{310,311}-dj{41,main}
py{38,39,310}-dj{32,40,41,main}
py{310,311}-dj{41,main}

skip_missing_interpreters=True

Expand All @@ -13,9 +12,9 @@ deps =
-r{toxinidir}/requirements/base.txt
-r{toxinidir}/requirements/optional.txt
dj32: Django>=3.2,<3.3
; dj40: Django>=4.0,<4.1
; dj41: Django>=4.1,<4.2
; djmain: https://github.com/django/django/archive/main.tar.gz
dj40: Django>=4.0,<4.1
dj41: Django>=4.1,<4.2
djmain: https://github.com/django/django/archive/main.tar.gz
commands =
{envpython} --version
{env:COMMAND:coverage} erase
Expand Down

0 comments on commit aa02dea

Please sign in to comment.