File tree Expand file tree Collapse file tree 7 files changed +22
-30
lines changed Expand file tree Collapse file tree 7 files changed +22
-30
lines changed Original file line number Diff line number Diff line change 65
65
- " 3.9"
66
66
- " 3.10"
67
67
- " 3.11"
68
+ django-version :
69
+ - " 4.0"
70
+ - " 4.1"
71
+ - " 4.2"
68
72
steps :
69
73
- uses : actions/checkout@v4
70
74
- uses : actions/setup-python@v4
@@ -102,12 +106,7 @@ jobs:
102
106
runs-on : ubuntu-latest
103
107
strategy :
104
108
matrix :
105
- python-version : [ "3.10" ]
106
- django-version :
107
- - " 4.0"
108
- - " 4.1"
109
- extras :
110
- - postgres
109
+ python-version : [ "3.x" ]
111
110
services :
112
111
postgres :
113
112
image : postgres
@@ -123,7 +122,7 @@ jobs:
123
122
with :
124
123
python-version : ${{ matrix.python-version }}
125
124
- uses : actions/checkout@v4
126
- - run : python -m pip install Django~=${{ matrix.django-version }}.0 - e ".[test,${{ matrix.extras }} ]"
125
+ - run : python -m pip install - e ".[test,postgres ]"
127
126
- run : python -m pytest
128
127
env :
129
128
DB_PORT : ${{ job.services.postgres.ports[5432] }}
Original file line number Diff line number Diff line change 1
1
from django .db import migrations
2
2
3
3
try :
4
- from django . contrib . postgres . fields import CIEmailField
4
+ from citext import CIEmailField , CITextExtension
5
5
except ImportError :
6
+ CITextExtension = None
6
7
CIEmailField = None
7
- else :
8
- from django .contrib .postgres .operations import CITextExtension
9
8
10
9
11
10
def _operations ():
12
- if CIEmailField :
11
+ if CITextExtension :
13
12
yield CITextExtension ()
14
13
yield migrations .AlterField (
15
14
model_name = "emailuser" ,
Original file line number Diff line number Diff line change 1
1
from django .db import migrations , models
2
2
3
3
try :
4
- from django . contrib . postgres . fields import CIEmailField
4
+ from citext import CIEmailField
5
5
except ImportError :
6
6
CIEmailField = models .EmailField
7
7
Original file line number Diff line number Diff line change 7
7
from . import signals
8
8
9
9
try :
10
- from django . contrib . postgres . fields import CIEmailField
10
+ from citext import CIEmailField
11
11
except ImportError :
12
12
from django .db .models import EmailField as CIEmailField
13
13
Original file line number Diff line number Diff line change @@ -14,10 +14,7 @@ keywords = [
14
14
" otp" ,
15
15
" email" ,
16
16
" authentication" ,
17
- " login" ,
18
- " 2fa" ,
19
17
" passwordless" ,
20
- " password" ,
21
18
]
22
19
dynamic = [" version" , " description" ]
23
20
classifiers = [
@@ -34,13 +31,20 @@ classifiers = [
34
31
" Framework :: Django" ,
35
32
" Framework :: Django :: 4.0" ,
36
33
" Framework :: Django :: 4.1" ,
34
+ " Framework :: Django :: 4.2" ,
35
+ " Framework :: Wagtail" ,
36
+ " Framework :: Wagtail :: 2" ,
37
+ " Framework :: Wagtail :: 3" ,
38
+ " Framework :: Wagtail :: 4" ,
37
39
" Topic :: Internet" ,
38
40
" Topic :: Internet :: WWW/HTTP" ,
39
41
" Topic :: Software Development :: Quality Assurance" ,
40
42
" Topic :: Software Development :: Testing" ,
41
43
]
42
44
requires-python = " >=3.9"
43
- dependencies = [" django>=4.0" ]
45
+ dependencies = [
46
+ " django>=4.0"
47
+ ]
44
48
45
49
[project .optional-dependencies ]
46
50
test = [
@@ -55,7 +59,7 @@ wagtail = [
55
59
" wagtail>=2.8" ,
56
60
]
57
61
postgres = [
58
- " psycopg2-binary " ,
62
+ " django-citext " ,
59
63
]
60
64
61
65
[project .urls ]
Original file line number Diff line number Diff line change 3
3
4
4
from mailauth .contrib .user import models
5
5
6
- try :
7
- import psycopg2
8
- except ImportError :
9
- psycopg2 = None
10
-
11
-
12
- postgres_only = pytest .mark .skipif (
13
- psycopg2 is None , reason = "at least mymodule-1.1 required"
14
- )
15
-
16
6
17
7
class TestEmailUser :
18
- @postgres_only
19
8
def test_email__ci_unique (self , db ):
9
+ pytest .importorskip ("psycopg" )
20
10
models .EmailUser .objects .create_user ("IronMan@avengers.com" )
21
11
with pytest .raises (IntegrityError ):
22
12
models .EmailUser .objects .create_user ("ironman@avengers.com" )
Original file line number Diff line number Diff line change 52
52
"mailauth.contrib.wagtail" ,
53
53
"wagtail.admin" ,
54
54
"wagtail.users" ,
55
- "wagtail.core " ,
55
+ "wagtail" ,
56
56
]
57
57
58
58
AUTHENTICATION_BACKENDS = ("mailauth.backends.MailAuthBackend" ,)
You can’t perform that action at this time.
0 commit comments