Commit graph

1192 commits

Author SHA1 Message Date
Aleksi Häkli
122f387171 Adjust init verbose and enabled mode handling
Reduce complexity and leave the enabled mode to be used
with the toggleable decorator that disables functionality
when AXES_ENABLED is set to False for testing etc.

This conforms with the previous behaviour and logic flow.
2020-09-27 17:08:01 +03:00
Aleksi Häkli
4cac338138 Add AXES_LOGGER deprecation notice to checks 2020-09-27 17:08:01 +03:00
Aleksi Häkli
00635d3ad0 Update initial module imports 2020-09-27 17:08:01 +03:00
Aleksi Häkli
7b33ecbf69
Clean up requirements specification 2020-09-26 22:23:19 +03:00
dependabot-preview[bot]
c059bce290 Bump pytest from 6.0.2 to 6.1.0
Bumps [pytest](https://github.com/pytest-dev/pytest) from 6.0.2 to 6.1.0.
- [Release notes](https://github.com/pytest-dev/pytest/releases)
- [Changelog](https://github.com/pytest-dev/pytest/blob/master/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest/compare/6.0.2...6.1.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-09-26 22:20:38 +03:00
Aleksi Häkli
33f0eaa6b9
Version 5.7.0 2020-09-26 21:46:43 +03:00
Aleksi Häkli
b569cdb991 Deprecate settings.AXES_LOGGER configuration flag
Fixes #634

The Django import system seems to produce errors
in certain configurations and especially when
MIGRATION_MODULES configuration is set globally.

This is most probably caused by misbehaving or cyclic
Python module imports in the Django application
instrumentatation chain that come up when the
MIGRATION_MODULES configuration is altered.

This patch migrates to the standard Python logging system
use and has less overhead and complexity for users as well.

Having a configurable logging prefix does not produce
a lot of benefits and is less flexible than having
all individual module logging configurations accessible
through the module __name__ parameter in Axes.

For example axes.handlers.* or axes.backends.*
are separately configurable in the new scheme
whereas they would have been both bundled under
the AXES_LOGGER log configuration.
2020-09-26 21:44:56 +03:00
Aleksi Häkli
2b560fe244
Version 5.6.2 2020-09-20 22:02:54 +03:00
Aleksi Häkli
eedba80ef9 Roll back axes_reset_username style update 2020-09-20 22:00:59 +03:00
dependabot-preview[bot]
7c37c2634f Bump prospector from 1.2.0 to 1.3.0
Bumps [prospector](https://github.com/PyCQA/prospector) from 1.2.0 to 1.3.0.
- [Release notes](https://github.com/PyCQA/prospector/releases)
- [Changelog](https://github.com/PyCQA/prospector/blob/master/CHANGELOG.rst)
- [Commits](https://github.com/PyCQA/prospector/compare/1.2.0...1.3.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-09-18 09:51:36 +00:00
dependabot-preview[bot]
e3e6e14779 Bump pytest-django from 3.9.0 to 3.10.0
Bumps [pytest-django](https://github.com/pytest-dev/pytest-django) from 3.9.0 to 3.10.0.
- [Release notes](https://github.com/pytest-dev/pytest-django/releases)
- [Changelog](https://github.com/pytest-dev/pytest-django/blob/master/docs/changelog.rst)
- [Commits](https://github.com/pytest-dev/pytest-django/compare/v3.9.0...v3.10.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-09-18 09:35:08 +00:00
Aleksi Häkli
8d04a7418b
Version 5.6.1 2020-09-17 15:07:26 +03:00
David Smith
baed1377f2 Split requirements files and bumped black/mypy versions 2020-09-17 15:06:07 +03:00
dependabot-preview[bot]
761aa81e0f Bump pytest-django from 3.9.0 to 3.10.0
Bumps [pytest-django](https://github.com/pytest-dev/pytest-django) from 3.9.0 to 3.10.0.
- [Release notes](https://github.com/pytest-dev/pytest-django/releases)
- [Changelog](https://github.com/pytest-dev/pytest-django/blob/master/docs/changelog.rst)
- [Commits](https://github.com/pytest-dev/pytest-django/compare/v3.9.0...v3.10.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-09-15 09:35:02 +00:00
dependabot-preview[bot]
4d0ae02416 Bump pytest from 6.0.1 to 6.0.2
Bumps [pytest](https://github.com/pytest-dev/pytest) from 6.0.1 to 6.0.2.
- [Release notes](https://github.com/pytest-dev/pytest/releases)
- [Changelog](https://github.com/pytest-dev/pytest/blob/master/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest/compare/6.0.1...6.0.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-09-14 10:11:25 +00:00
dependabot-preview[bot]
d76cd5e4e3 Bump coverage from 5.2.1 to 5.3
Bumps [coverage](https://github.com/nedbat/coveragepy) from 5.2.1 to 5.3.
- [Release notes](https://github.com/nedbat/coveragepy/releases)
- [Changelog](https://github.com/nedbat/coveragepy/blob/master/CHANGES.rst)
- [Commits](https://github.com/nedbat/coveragepy/compare/coverage-5.2.1...coverage-5.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-09-14 09:35:31 +00:00
Aleksi Häkli
22d32fddb9
Improve README structuring 2020-09-13 16:12:38 +03:00
Aleksi Häkli
971cea4aae
Version 5.6.0 2020-09-12 17:06:49 +03:00
Aleksi Häkli
8b619dfdef Deprecate django-appconf 2020-09-12 17:03:50 +03:00
David Smith
4076a759dc Added pytest-subtests dependency 2020-09-12 14:57:37 +03:00
Aleksi Häkli
043cdcaa62
Version 5.5.2 2020-09-11 11:06:03 +03:00
David Smith
d96a3e4625 black formatting 2020-09-11 11:03:15 +03:00
David Smith
96d34c1b95 request.is_ajax() is deprecated 2020-09-11 11:03:15 +03:00
Aleksi Häkli
ee42228818
Version 5.5.1 2020-09-10 21:27:13 +03:00
David Smith
bf1f4eb360 Changed url() to path()
url() is deprecated in Django 3.1
2020-09-10 21:21:32 +03:00
David Smith
57a15116cd assertEquals() --> assertEqual()
assertEquals() is deprecated
2020-09-10 21:21:16 +03:00
Aleksi Häkli
f97bf3c592
Improve notes on atomic requests 2020-09-06 00:02:41 +03:00
Timmy O'Mahony
ef1e1b4422 Added note about atomic request related to issue #628 2020-09-05 23:46:14 +03:00
dependabot-preview[bot]
8f576c8ba8 Bump tox from 3.19.0 to 3.20.0
Bumps [tox](https://github.com/tox-dev/tox) from 3.19.0 to 3.20.0.
- [Release notes](https://github.com/tox-dev/tox/releases)
- [Changelog](https://github.com/tox-dev/tox/blob/master/docs/changelog.rst)
- [Commits](https://github.com/tox-dev/tox/compare/3.19.0...3.20.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-09-02 09:32:18 +00:00
Aleksi Häkli
86edcc6117
Version 5.5.0 2020-08-21 17:22:42 +03:00
Robert Rollins
98c404b442 Added comment describing the args the signal sends. 2020-08-21 17:18:45 +03:00
Robert Rollins
4986c240a6 Removed use of Signal()'s providing_args kwarg, as it is deprecated. 2020-08-21 17:18:45 +03:00
Petr Dlouhý
bf69a0a89e changes requested by aleksihakli 2020-08-21 17:17:57 +03:00
Petr Dlouhý
71ee9239d9 add missing tests; refactor reset_request() 2020-08-21 17:17:57 +03:00
Petr Dlouhý
576e666c54 fix tests on pypy 2020-08-21 17:17:57 +03:00
Petr Dlouhý
128d01158c add LOCK_OUT_BY_USER_OR_IP option
store all AccessAttempt records
2020-08-21 17:17:57 +03:00
Petr Dlouhý
18c4edec29 test_login also with cache handler; refactor making cache key 2020-08-21 17:17:57 +03:00
Petr Dlouhý
c3c2786d57 add reset_request helper function to internalize reset logic into django-axis 2020-08-21 17:17:57 +03:00
dependabot-preview[bot]
b855a92e88 Bump pytest-cov from 2.10.0 to 2.10.1
Bumps [pytest-cov](https://github.com/pytest-dev/pytest-cov) from 2.10.0 to 2.10.1.
- [Release notes](https://github.com/pytest-dev/pytest-cov/releases)
- [Changelog](https://github.com/pytest-dev/pytest-cov/blob/master/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest-cov/compare/v2.10.0...v2.10.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-08-17 10:35:53 +00:00
dependabot-preview[bot]
6fc1f83ead Bump tox from 3.18.1 to 3.19.0
Bumps [tox](https://github.com/tox-dev/tox) from 3.18.1 to 3.19.0.
- [Release notes](https://github.com/tox-dev/tox/releases)
- [Changelog](https://github.com/tox-dev/tox/blob/master/docs/changelog.rst)
- [Commits](https://github.com/tox-dev/tox/compare/3.18.1...3.19.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-08-07 09:31:16 +00:00
Aleksi Häkli
8765a51882
Version 5.4.3 2020-08-06 10:45:49 +03:00
Hasan Ramezani
df2d6ca24b Added Django 3.1 test environment.
Signed-off-by: Hasan Ramezani <hasan.r67@gmail.com>
2020-08-06 10:44:53 +03:00
dependabot-preview[bot]
2d0c289fc0 Bump pytest from 6.0.0 to 6.0.1
Bumps [pytest](https://github.com/pytest-dev/pytest) from 6.0.0 to 6.0.1.
- [Release notes](https://github.com/pytest-dev/pytest/releases)
- [Changelog](https://github.com/pytest-dev/pytest/blob/master/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest/compare/6.0.0...6.0.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-07-31 10:03:35 +00:00
dependabot-preview[bot]
7b8123a72c Bump pytest from 5.4.3 to 6.0.0
Bumps [pytest](https://github.com/pytest-dev/pytest) from 5.4.3 to 6.0.0.
- [Release notes](https://github.com/pytest-dev/pytest/releases)
- [Changelog](https://github.com/pytest-dev/pytest/blob/master/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest/compare/5.4.3...6.0.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-07-29 09:43:53 +00:00
Aleksi Häkli
d9d16003a0
Version 5.4.2 2020-07-28 20:29:10 +03:00
Jorge Galvis
45109341be Make code Black's compliant. 2020-07-28 20:21:34 +03:00
Jorge Galvis
f772817bc8 Add some docstrings for guidance about creating new handlers. 2020-07-28 20:21:34 +03:00
Jorge Galvis
c786c53e9b Make all handlers to use the AxesBaseHandler mixin. 2020-07-28 20:21:34 +03:00
Jorge Galvis
87d8a974a3 Move signal's callbacks to AxesDatabaseHandler as they only make sense for a DB backend. 2020-07-28 20:21:34 +03:00
Jorge Galvis
9bb04a01b8 Only AxesHandler needs to follow a contract 2020-07-28 20:21:34 +03:00