Skip to content

Commit 3d94511

Browse files
authored
Merge branch 'master' into update_azure_oauth
2 parents b630d62 + f4a8cfd commit 3d94511

File tree

272 files changed

+7980
-121029
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

272 files changed

+7980
-121029
lines changed

.github/workflows/ci.yml

Lines changed: 49 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
- name: flake8
3232
run: flake8 flask_appbuilder
3333
- name: mypy
34-
run: mypy flask_appbuilder
34+
run: mypy flask_appbuilder/**/*.py
3535
- name: black
3636
run: black --check tests
3737
- name: flake8
@@ -71,7 +71,7 @@ jobs:
7171
-e LDAP_ADMIN_PASSWORD=admin_password \
7272
-e LDAP_EXTRA_SCHEMAS=cosine,inetorgperson,nis,memberof \
7373
-p 1389:1389 \
74-
bitnami/openldap:2.6.4
74+
bitnamilegacy/openldap:2.6
7575
- name: Install dependencies
7676
run: |
7777
sudo apt-get update
@@ -87,24 +87,23 @@ jobs:
8787
run: |
8888
bash <(curl -s https://codecov.io/bash) -cF python
8989
90-
test-mysql:
90+
test-postgres-sqlalchemy1:
9191
runs-on: ubuntu-22.04
9292
strategy:
9393
matrix:
9494
python-version: ["3.10"]
9595
env:
96-
SQLALCHEMY_DATABASE_URI: |
97-
mysql+mysqldb://mysqluser:mysqluserpassword@127.0.0.1:13306/app?charset=utf8mb4&binary_prefix=true
96+
SQLALCHEMY_DATABASE_URI:
97+
postgresql+psycopg2://pguser:pguserpassword@127.0.0.1:15432/app
9898
services:
99-
mysql:
100-
image: mysql:5.7
99+
postgres:
100+
image: postgres:14-alpine
101101
env:
102-
MYSQL_USER: mysqluser
103-
MYSQL_PASSWORD: mysqluserpassword
104-
MYSQL_ROOT_PASSWORD: root
105-
MYSQL_DATABASE: app
102+
POSTGRES_USER: pguser
103+
POSTGRES_PASSWORD: pguserpassword
104+
POSTGRES_DB: app
106105
ports:
107-
- 13306:3306
106+
- 15432:5432
108107
steps:
109108
- uses: actions/checkout@v4
110109
- name: Setup Python
@@ -122,13 +121,13 @@ jobs:
122121
-e LDAP_ADMIN_PASSWORD=admin_password \
123122
-e LDAP_EXTRA_SCHEMAS=cosine,inetorgperson,nis,memberof \
124123
-p 1389:1389 \
125-
bitnami/openldap:2.6.4
124+
bitnamilegacy/openldap:2.6
126125
- name: Install dependencies
127126
run: |
128127
sudo apt-get update
129128
sudo apt-get install -y libldap2-dev libsasl2-dev libssl-dev
130129
pip install --upgrade pip
131-
pip install -r requirements/base.txt
130+
pip install -r requirements/base_legacy.txt
132131
pip install -r requirements/tests.txt
133132
pip install -r requirements/extra.txt
134133
- name: Run tests
@@ -138,22 +137,24 @@ jobs:
138137
run: |
139138
bash <(curl -s https://codecov.io/bash) -cF python
140139
141-
test-mssql:
140+
test-mysql:
142141
runs-on: ubuntu-22.04
143142
strategy:
144143
matrix:
145144
python-version: ["3.10"]
146145
env:
147146
SQLALCHEMY_DATABASE_URI: |
148-
mssql+pyodbc://sa:Password_123@localhost:11433/master?driver=FreeTDS
147+
mysql+mysqldb://mysqluser:mysqluserpassword@127.0.0.1:13306/app?charset=utf8mb4&binary_prefix=true
149148
services:
150-
mssql:
151-
image: mcr.microsoft.com/mssql/server:2019-CU31-ubuntu-20.04
149+
mysql:
150+
image: mysql:5.7
152151
env:
153-
SA_PASSWORD: Password_123
154-
ACCEPT_EULA: Y
152+
MYSQL_USER: mysqluser
153+
MYSQL_PASSWORD: mysqluserpassword
154+
MYSQL_ROOT_PASSWORD: root
155+
MYSQL_DATABASE: app
155156
ports:
156-
- 11433:1433
157+
- 13306:3306
157158
steps:
158159
- uses: actions/checkout@v4
159160
- name: Setup Python
@@ -171,78 +172,68 @@ jobs:
171172
-e LDAP_ADMIN_PASSWORD=admin_password \
172173
-e LDAP_EXTRA_SCHEMAS=cosine,inetorgperson,nis,memberof \
173174
-p 1389:1389 \
174-
bitnami/openldap:2.6.4
175+
bitnamilegacy/openldap:2.6
175176
- name: Install dependencies
176177
run: |
177178
sudo apt-get update
178-
sudo apt-get install -y libldap2-dev libsasl2-dev libssl-dev freetds-bin freetds-dev unixodbc-dev tdsodbc
179+
sudo apt-get install -y libldap2-dev libsasl2-dev libssl-dev
179180
pip install --upgrade pip
180181
pip install -r requirements/base.txt
181182
pip install -r requirements/tests.txt
182183
pip install -r requirements/extra.txt
183-
sudo cp .github/workflows/odbcinst.ini /etc/odbcinst.ini
184184
- name: Run tests
185185
run: |
186-
nose2 -c setup.cfg -F -v --with-coverage --coverage flask_appbuilder -A '!mongo,!openid'
186+
nose2 -c setup.cfg -F -v --with-coverage --coverage flask_appbuilder -A '!mongo,!openid' tests
187187
- name: Upload code coverage
188188
run: |
189189
bash <(curl -s https://codecov.io/bash) -cF python
190190
191-
test-mongodb:
191+
test-mssql:
192192
runs-on: ubuntu-22.04
193193
strategy:
194194
matrix:
195195
python-version: ["3.10"]
196+
env:
197+
SQLALCHEMY_DATABASE_URI: |
198+
mssql+pyodbc://sa:Password_123@localhost:11433/master?driver=FreeTDS
196199
services:
197-
mongo:
198-
image: mongo:4.4.1-bionic
200+
mssql:
201+
image: mcr.microsoft.com/mssql/server:2019-CU31-ubuntu-20.04
202+
env:
203+
SA_PASSWORD: Password_123
204+
ACCEPT_EULA: Y
199205
ports:
200-
- 27017:27017
206+
- 11433:1433
201207
steps:
202208
- uses: actions/checkout@v4
203209
- name: Setup Python
204210
uses: actions/setup-python@v5
205211
with:
206212
python-version: ${{ matrix.python-version }}
207-
- name: Install dependencies
208-
run: |
209-
sudo apt-get update
210-
sudo apt-get install -y libldap2-dev libsasl2-dev libssl-dev
211-
pip install --upgrade pip
212-
pip install -r requirements/base.txt
213-
pip install -r requirements/tests.txt
214-
pip install -r requirements/extra.txt
215-
pip install -r requirements/mongodb.txt
216-
- name: Run tests
217-
run: |
218-
nose2 -c setup.cfg -F -v --with-coverage --coverage flask_appbuilder -A 'mongo' tests
219-
- name: Upload code coverage
213+
- name: Run openldap
220214
run: |
221-
bash <(curl -s https://codecov.io/bash) -cF python
222-
223-
test-openid:
224-
runs-on: ubuntu-22.04
225-
strategy:
226-
matrix:
227-
python-version: ["3.10"]
228-
steps:
229-
- uses: actions/checkout@v4
230-
- name: Setup Python
231-
uses: actions/setup-python@v5
232-
with:
233-
python-version: ${{ matrix.python-version }}
215+
docker run -d \
216+
-v '${{ github.workspace }}/docker/openldap/ldifs:/ldifs' \
217+
-v '${{ github.workspace }}/docker/openldap/schemas/memberof.ldif:/opt/bitnami/openldap/etc/schema/memberof.ldif' \
218+
-e LDAP_URI=ldap://openldap:1389 \
219+
-e LDAP_BASE=dc=example,dc=org \
220+
-e LDAP_ADMIN_USERNAME=admin \
221+
-e LDAP_ADMIN_PASSWORD=admin_password \
222+
-e LDAP_EXTRA_SCHEMAS=cosine,inetorgperson,nis,memberof \
223+
-p 1389:1389 \
224+
bitnamilegacy/openldap:2.6
234225
- name: Install dependencies
235226
run: |
236227
sudo apt-get update
237-
sudo apt-get install -y libldap2-dev libsasl2-dev libssl-dev
228+
sudo apt-get install -y libldap2-dev libsasl2-dev libssl-dev freetds-bin freetds-dev unixodbc-dev tdsodbc
238229
pip install --upgrade pip
239230
pip install -r requirements/base.txt
240231
pip install -r requirements/tests.txt
241232
pip install -r requirements/extra.txt
242-
pip install -r requirements/openid.txt
233+
sudo cp .github/workflows/odbcinst.ini /etc/odbcinst.ini
243234
- name: Run tests
244235
run: |
245-
nose2 -c setup.cfg -F -v --with-coverage --coverage flask_appbuilder -A 'openid' tests
236+
nose2 -c setup.cfg -F -v --with-coverage --coverage flask_appbuilder -A '!mongo,!openid'
246237
- name: Upload code coverage
247238
run: |
248239
bash <(curl -s https://codecov.io/bash) -cF python

CHANGELOG.rst

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,51 @@
11
Flask-AppBuilder ChangeLog
22
==========================
33

4+
Improvements and Bug fixes on 5.0.2
5+
-----------------------------------
6+
7+
- fix: fix pkg name to comply with pypi (#2413) [Daniel Vaz Gaspar]
8+
- fix: setup pkg filename (#2412) [Daniel Vaz Gaspar]
9+
- fix: check user is active with is_active (#2410) [Daniel Vaz Gaspar]
10+
- chore: French translations update messages.po (#2371) [xavier-GitHub76]
11+
- chore(username): Expand username length (#2409) [Antonio Rivero]
12+
13+
Improvements and Bug fixes on 5.0.1
14+
-----------------------------------
15+
16+
- Import RequestLimit from public namespace (#2398) [Ali-Akber Saifee]
17+
- feat: support JSON columns (#2383) [Beto Dealmeida]
18+
- fix(ci): move ldap to bitnami legacy (#2402) [Daniel Vaz Gaspar]
19+
- chore: apply APPLICATION_ROOT to swagger URL (#2394) [Elizabeth Thompson]
20+
- docs: improve 5.0.0 version migration (#2392) [Daniel Vaz Gaspar]
21+
22+
Improvements and Bug fixes on 5.0.0
23+
-----------------------------------
24+
25+
- chore: remove mongodb and openid support (v2) (#2390) [Daniel Vaz Gaspar]
26+
- fix: Add missing items types get_list_schema (#2389) [Kamil Gabryjelski]
27+
- chore: support sqlalchemy 2.x and flask-sqlalchemy 3 (breaking) (#2241) [Daniel Vaz Gaspar]
28+
- fix: openapi list permissions return type (#2388) [jfo]
29+
30+
Improvements and Bug fixes on 4.8.1
31+
-----------------------------------
32+
33+
- fix: don't register reset my password when not on AUTH_DB (#2384) [Daniel Vaz Gaspar]
34+
- fix: Correct is_pk_composite method to return False instead of raising an error. False is not a base exception (#2378) [Kyle Lagerquist]
35+
36+
Improvements and Bug fixes on 4.8.0
37+
-----------------------------------
38+
39+
- feat: Support the select_columns arg on the Get Item method (#2372) [Vitor Avila]
40+
41+
Improvements and Bug fixes on 4.7.0
42+
-----------------------------------
43+
44+
- fix: group api, OAS and payload (#2358) [Daniel Vaz Gaspar]
45+
- fix: order by using mssql database (#2356) [ThomasP0815]
46+
- feat(filters): add "FilterIn" and "FilterNotIn" operators with unit tests (#2354) [Enzo Martellucci]
47+
- feat(GroupAPI): Add GroupAPI to FAB (#2339) [Enzo Martellucci]
48+
449
Improvements and Bug fixes on 4.6.4
550
-----------------------------------
651

docker-compose.yml

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,9 @@ services:
1212
POSTGRES_USER: pguser
1313
ports:
1414
- 5432:5432
15-
mongo:
16-
container_name: fab-mongo
17-
image: mongo
18-
restart: unless-stopped
19-
environment:
20-
MONGO_INITDB_DATABASE: app
21-
ports:
22-
- 27017:27017
2315
ldap:
2416
container_name: fab-ldap
25-
image: bitnami/openldap:2.6.4
17+
image: bitnamilegacy/openldap:2.6
2618
environment:
2719
LDAP_URI: ldap://openldap:1389
2820
LDAP_BASE: dc=example,dc=org

docs/advanced.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,6 @@ On this next example we are filtering a view by the logged in user and with colu
6262
from flask_appbuilder import ModelView
6363
from flask_appbuilder.models.sqla.interface import SQLAInterface
6464
from flask_appbuilder.models.sqla.filters import FilterEqualFunction, FilterStartsWith
65-
# If you're using Mongo Engine you should import filters like this, everything else is exactly the same
66-
# from flask_appbuilder.models.mongoengine.filters import FilterStartsWith, FilterEqualFunction
6765

6866
from .models import MyTable
6967

docs/breaking.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ Version 4.0.0
66

77
- Drops python 3.6 support
88
- Removed config key `AUTH_STRICT_RESPONSE_CODES`, it's always strict now.
9-
- Removes `Flask-OpenID` dependency (you can install it has an extra dependency `pip install flask-appbuilder[openid]`)
109
- Major version bumps on following packages
1110

1211
**Flask from 1.X to 2.X**

docs/cli.rst

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Take a quick look to the current possibilities. (The bold ones require app conte
3333

3434
- **create-user** - Create user with arbitrary role
3535

36-
- create-app - Create a Skeleton application (SQLAlchemy or MongoEngine).
36+
- create-app - Create a Skeleton application.
3737

3838
- create-addon - Create a Skeleton AddOn.
3939

@@ -69,15 +69,13 @@ Command Line uses the excellent click package, so you can have a detailed help f
6969
Options:
7070
--name TEXT Your application name, directory will have
7171
this name
72-
--engine [SQLAlchemy|MongoEngine]
73-
Write your engine type
7472
--help Show this message and exit.
7573

7674

7775
**create-app** - Create new Applications
7876
----------------------------------------
7977

80-
To create a ready to dev skeleton application, you can use this command for SQLAlchemy engine and MongoEngine (MongoDB).
78+
To create a ready to dev skeleton application.
8179
This commands needs an internet connection to **github.com**, because it will download a zip version of the skeleton repos.
8280

8381
**create-admin** - Create an admin user

0 commit comments

Comments
 (0)