Skip to content

Commit 265a305

Browse files
authored
INTPYTHON-380 Finish remaining QA (#179)
1 parent 25ab164 commit 265a305

12 files changed

+196
-149
lines changed

.github/dependabot.yml

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
version: 2
2+
updates:
3+
# GitHub Actions
4+
- package-ecosystem: "github-actions"
5+
directory: "/"
6+
schedule:
7+
interval: "weekly"
8+
groups:
9+
actions:
10+
patterns:
11+
- "*"
12+
# Python
13+
- package-ecosystem: "pip"
14+
directory: "/"
15+
schedule:
16+
interval: "weekly"

.github/workflows/test-python.yml

-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ jobs:
3232
- uses: extractions/setup-just@v2
3333
- run: just install
3434
- run: just lint
35-
- run: uv run pre-commit run --hook-stage manual --all-files
3635
- run: just docs
3736
- run: just doctest
3837
build:

.pre-commit-config.yaml

+21
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,27 @@ repos:
3535
args: ["-L", "nd"]
3636
stages: [manual]
3737

38+
- repo: https://github.com/adamchainz/blacken-docs
39+
rev: "1.19.1"
40+
hooks:
41+
- id: blacken-docs
42+
additional_dependencies: [black==24.*]
43+
44+
- repo: https://github.com/pre-commit/pygrep-hooks
45+
rev: "v1.10.0"
46+
hooks:
47+
- id: rst-backticks
48+
- id: rst-directive-colons
49+
- id: rst-inline-touching-normal
50+
51+
- repo: https://github.com/hukkin/mdformat
52+
rev: 0.7.21
53+
hooks:
54+
- id: mdformat
55+
# Optionally add plugins
56+
additional_dependencies:
57+
- mdformat-gfm
58+
3859
- repo: https://github.com/astral-sh/ruff-pre-commit
3960
# Ruff version.
4061
rev: v0.9.1

CHANGELOG.md

+123-123
Original file line numberDiff line numberDiff line change
@@ -2,184 +2,184 @@
22

33
## 3.0.0: Unreleased
44

5-
- Support Flask 3.0+ and PyMongo 4.0+.
6-
- Support Python 3.9-3.13.
7-
- Support MongoDB 4.4+.
8-
- Add support for `~flask.json.jsonify()`.
5+
- Support Flask 3.0+ and PyMongo 4.0+.
6+
- Support Python 3.9-3.13.
7+
- Support MongoDB 4.4+.
8+
- Add support for `~flask.json.jsonify()`.
99

1010
## 2.3.0: April 24, 2019
1111

12-
- Update version compatibility matrix in tests, drop official support
13-
for PyMongo less than 3.3.x.
12+
- Update version compatibility matrix in tests, drop official support
13+
for PyMongo less than 3.3.x.
1414

1515
## 2.2.0: November 1, 2018
1616

17-
- [\#117](https://github.com/dcrosta/flask-pymongo/pull/117) Allow
18-
URIs without database name.
17+
- [#117](https://github.com/dcrosta/flask-pymongo/pull/117) Allow
18+
URIs without database name.
1919

2020
## 2.1.0: August 6, 2018
2121

22-
- [\#114](https://github.com/dcrosta/flask-pymongo/pull/114) Accept
23-
keyword arguments to `~flask_pymongo.PyMongo.save_file` (Andrew C.
24-
Hawkins).
22+
- [#114](https://github.com/dcrosta/flask-pymongo/pull/114) Accept
23+
keyword arguments to `~flask_pymongo.PyMongo.save_file` (Andrew C.
24+
Hawkins).
2525

2626
## 2.0.1: July 17, 2018
2727

28-
- [\#113](https://github.com/dcrosta/flask-pymongo/pull/113) Make the
29-
`app` argument to `PyMongo` optional (yarobob).
28+
- [#113](https://github.com/dcrosta/flask-pymongo/pull/113) Make the
29+
`app` argument to `PyMongo` optional (yarobob).
3030

3131
## 2.0.0: July 2, 2018
3232

33-
**This release is not compatible with Flask-PyMongo 0.5.x or any
34-
earlier version.** You can see an explanation of the reasoning and
35-
changes in [issue
36-
\#110](https://github.com/dcrosta/flask-pymongo/issues/110).
33+
**This release is not compatible with Flask-PyMongo 0.5.x or any
34+
earlier version.** You can see an explanation of the reasoning and
35+
changes in [issue
36+
#110](https://github.com/dcrosta/flask-pymongo/issues/110).
3737

38-
- Only support configuration via URI.
39-
- Don't connect to MongoDB by default.
40-
- Clarify version support of Python, Flask, PyMongo, and MongoDB.
41-
- Readability improvement to `README.md` (MinJae Kwon).
38+
- Only support configuration via URI.
39+
- Don't connect to MongoDB by default.
40+
- Clarify version support of Python, Flask, PyMongo, and MongoDB.
41+
- Readability improvement to `README.md` (MinJae Kwon).
4242

4343
## 0.5.2: May 19, 2018
4444

45-
- [\#102](https://github.com/dcrosta/flask-pymongo/pull/102) Return
46-
404, not 400, when given an invalid input to
47-
<span class="title-ref">BSONObjectIdConverter</span> (Abraham Toriz
48-
Cruz).
45+
- [#102](https://github.com/dcrosta/flask-pymongo/pull/102) Return
46+
404, not 400, when given an invalid input to
47+
<span class="title-ref">BSONObjectIdConverter</span> (Abraham Toriz
48+
Cruz).
4949

5050
## 0.5.1: May 24, 2017
5151

52-
- [\#93](https://github.com/dcrosta/flask-pymongo/pull/93) Supply a
53-
default `MONGO_AUTH_MECHANISM` (Mark Unsworth).
52+
- [#93](https://github.com/dcrosta/flask-pymongo/pull/93) Supply a
53+
default `MONGO_AUTH_MECHANISM` (Mark Unsworth).
5454

5555
## 0.5.0: May 21, 2017
5656

57-
> **This will be the last 0.x series release.** The next non-bugfix
58-
> release will be Flask-PyMongo 2.0, which will introduce backwards
59-
> breaking changes, and will be the foundation for improvements and
60-
> changes going forward. Flask-PyMongo 2.0 will no longer support
61-
> Python 2.6, but will support Python 2.7 and Python 3.3+.
62-
63-
- [\#44](https://github.com/dcrosta/flask-pymongo/issues/44),
64-
[\#51](https://github.com/dcrosta/flask-pymongo/pull/51) Redirect
65-
`/` to `/HomePage` in the wiki example (David Awad)
66-
- [\#76](https://github.com/dcrosta/flask-pymongo/pull/76) Build on
67-
more modern Python versions (Robson Roberto Souza Peixoto)
68-
- [\#79](https://github.com/dcrosta/flask-pymongo/pull/79),
69-
[\#84](https://github.com/dcrosta/flask-pymongo/issues/84),
70-
[\#85](https://github.com/dcrosta/flask-pymongo/pull/85) Don't use
71-
`flask.ext` import paths any more (ratson, juliascript)
72-
- [\#40](https://github.com/dcrosta/flask-pymongo/issues/40),
73-
[\#83](https://github.com/dcrosta/flask-pymongo/pull/83),
74-
[\#86](https://github.com/dcrosta/flask-pymongo/pull/86) Fix options
75-
parsing from `MONGO_URI` (jobou)
76-
- [\#72](https://github.com/dcrosta/flask-pymongo/issues/72),
77-
[\#80](https://github.com/dcrosta/flask-pymongo/pull/80) Support
78-
`MONGO_SERVER_SELECTION_TIMEOUT_MS` (Henrik Blidh)
79-
- [\#34](https://github.com/dcrosta/flask-pymongo/issues/34),
80-
[\#64](https://github.com/dcrosta/flask-pymongo/pull/64),
81-
[\#88](https://github.com/dcrosta/flask-pymongo/pull/88) Support
82-
from `MONGO_AUTH_SOURCE` and `MONGO_AUTH_MECHANISM` (Craig Davis)
83-
- [\#74](https://github.com/dcrosta/flask-pymongo/issues/74),
84-
[\#77](https://github.com/dcrosta/flask-pymongo/issues/77),
85-
[\#78](https://github.com/dcrosta/flask-pymongo/pull/78) Fixed
86-
`maxPoolSize` in PyMongo 3.0+ (Henrik Blidh)
87-
- [\#82](https://github.com/dcrosta/flask-pymongo/issues/82) Fix
88-
"another user is already authenticated" error message.
89-
- [\#54](https://github.com/dcrosta/flask-pymongo/issues/54)
90-
Authenticate against "admin" database if no `MONGO_DBNAME` is
91-
provided.
57+
> **This will be the last 0.x series release.** The next non-bugfix
58+
> release will be Flask-PyMongo 2.0, which will introduce backwards
59+
> breaking changes, and will be the foundation for improvements and
60+
> changes going forward. Flask-PyMongo 2.0 will no longer support
61+
> Python 2.6, but will support Python 2.7 and Python 3.3+.
62+
63+
- [#44](https://github.com/dcrosta/flask-pymongo/issues/44),
64+
[#51](https://github.com/dcrosta/flask-pymongo/pull/51) Redirect
65+
`/` to `/HomePage` in the wiki example (David Awad)
66+
- [#76](https://github.com/dcrosta/flask-pymongo/pull/76) Build on
67+
more modern Python versions (Robson Roberto Souza Peixoto)
68+
- [#79](https://github.com/dcrosta/flask-pymongo/pull/79),
69+
[#84](https://github.com/dcrosta/flask-pymongo/issues/84),
70+
[#85](https://github.com/dcrosta/flask-pymongo/pull/85) Don't use
71+
`flask.ext` import paths any more (ratson, juliascript)
72+
- [#40](https://github.com/dcrosta/flask-pymongo/issues/40),
73+
[#83](https://github.com/dcrosta/flask-pymongo/pull/83),
74+
[#86](https://github.com/dcrosta/flask-pymongo/pull/86) Fix options
75+
parsing from `MONGO_URI` (jobou)
76+
- [#72](https://github.com/dcrosta/flask-pymongo/issues/72),
77+
[#80](https://github.com/dcrosta/flask-pymongo/pull/80) Support
78+
`MONGO_SERVER_SELECTION_TIMEOUT_MS` (Henrik Blidh)
79+
- [#34](https://github.com/dcrosta/flask-pymongo/issues/34),
80+
[#64](https://github.com/dcrosta/flask-pymongo/pull/64),
81+
[#88](https://github.com/dcrosta/flask-pymongo/pull/88) Support
82+
from `MONGO_AUTH_SOURCE` and `MONGO_AUTH_MECHANISM` (Craig Davis)
83+
- [#74](https://github.com/dcrosta/flask-pymongo/issues/74),
84+
[#77](https://github.com/dcrosta/flask-pymongo/issues/77),
85+
[#78](https://github.com/dcrosta/flask-pymongo/pull/78) Fixed
86+
`maxPoolSize` in PyMongo 3.0+ (Henrik Blidh)
87+
- [#82](https://github.com/dcrosta/flask-pymongo/issues/82) Fix
88+
"another user is already authenticated" error message.
89+
- [#54](https://github.com/dcrosta/flask-pymongo/issues/54)
90+
Authenticate against "admin" database if no `MONGO_DBNAME` is
91+
provided.
9292

9393
## 0.4.1: January 25, 2016
9494

95-
- Add the connect keyword:
96-
[\#67](https://github.com/dcrosta/flask-pymongo/pull/67).
95+
- Add the connect keyword:
96+
[#67](https://github.com/dcrosta/flask-pymongo/pull/67).
9797

9898
## 0.4.0: October 19, 2015
9999

100-
- Flask-Pymongo is now compatible with pymongo 3.0+:
101-
[\#63](https://github.com/dcrosta/flask-pymongo/pull/63).
100+
- Flask-Pymongo is now compatible with pymongo 3.0+:
101+
[#63](https://github.com/dcrosta/flask-pymongo/pull/63).
102102

103103
## 0.3.1: April 9, 2015
104104

105-
- Flask-PyMongo is now tested against Python 2.6, 2.7, 3.3, and 3.4.
106-
- Flask-PyMongo installation now no longer depends on
107-
[nose](https://pypi.python.org/pypi/nose/).
108-
- [\#58](https://github.com/dcrosta/flask-pymongo/pull/58) Update
109-
requirements for PyMongo 3.x (Emmanuel Valette).
110-
- [\#43](https://github.com/dcrosta/flask-pymongo/pull/43) Ensure
111-
error is raised when URI database name is parsed as 'None' (Ben
112-
Jeffrey).
113-
- [\#50](https://github.com/dcrosta/flask-pymongo/pull/50) Fix a bug
114-
in read preference handling (Kevin Funk).
115-
- [\#46](https://github.com/dcrosta/flask-pymongo/issues/46) Cannot
116-
use multiple replicaset instances which run on different ports (Mark
117-
Unsworth).
118-
- [\#30](https://github.com/dcrosta/flask-pymongo/issues/30)
119-
ConfiguationError with MONGO_READ_PREFERENCE (Mark Unsworth).
105+
- Flask-PyMongo is now tested against Python 2.6, 2.7, 3.3, and 3.4.
106+
- Flask-PyMongo installation now no longer depends on
107+
[nose](https://pypi.python.org/pypi/nose/).
108+
- [#58](https://github.com/dcrosta/flask-pymongo/pull/58) Update
109+
requirements for PyMongo 3.x (Emmanuel Valette).
110+
- [#43](https://github.com/dcrosta/flask-pymongo/pull/43) Ensure
111+
error is raised when URI database name is parsed as 'None' (Ben
112+
Jeffrey).
113+
- [#50](https://github.com/dcrosta/flask-pymongo/pull/50) Fix a bug
114+
in read preference handling (Kevin Funk).
115+
- [#46](https://github.com/dcrosta/flask-pymongo/issues/46) Cannot
116+
use multiple replicaset instances which run on different ports (Mark
117+
Unsworth).
118+
- [#30](https://github.com/dcrosta/flask-pymongo/issues/30)
119+
ConfiguationError with MONGO_READ_PREFERENCE (Mark Unsworth).
120120

121121
## 0.3.0: July 4, 2013
122122

123-
- This is a minor version bump which introduces backwards breaking
124-
changes! Please read these change notes carefully.
125-
- Removed read preference constants from Flask-PyMongo; to set a read
126-
preference, use the string name or import constants directly from
127-
`pymongo.read_preferences.ReadPreference`.
128-
- [\#22 (partial)](https://github.com/dcrosta/flask-pymongo/pull/22)
129-
Add support for `MONGO_SOCKET_TIMEOUT_MS` and
130-
`MONGO_CONNECT_TIMEOUT_MS` options (ultrabug).
131-
- [\#27 (partial)](https://github.com/dcrosta/flask-pymongo/pull/27)
132-
Make Flask-PyMongo compatible with Python 3 (Vizzy).
123+
- This is a minor version bump which introduces backwards breaking
124+
changes! Please read these change notes carefully.
125+
- Removed read preference constants from Flask-PyMongo; to set a read
126+
preference, use the string name or import constants directly from
127+
`pymongo.read_preferences.ReadPreference`.
128+
- [#22 (partial)](https://github.com/dcrosta/flask-pymongo/pull/22)
129+
Add support for `MONGO_SOCKET_TIMEOUT_MS` and
130+
`MONGO_CONNECT_TIMEOUT_MS` options (ultrabug).
131+
- [#27 (partial)](https://github.com/dcrosta/flask-pymongo/pull/27)
132+
Make Flask-PyMongo compatible with Python 3 (Vizzy).
133133

134134
## 0.2.1: December 22, 2012
135135

136-
- [\#19](https://github.com/dcrosta/flask-pymongo/pull/19) Added
137-
`MONGO_DOCUMENT_CLASS` config option (jeverling).
136+
- [#19](https://github.com/dcrosta/flask-pymongo/pull/19) Added
137+
`MONGO_DOCUMENT_CLASS` config option (jeverling).
138138

139139
## 0.2.0: December 15, 2012
140140

141-
- This is a minor version bump which may introduce backwards breaking
142-
changes! Please read these change notes carefully.
143-
- [\#17](https://github.com/dcrosta/flask-pymongo/pull/17) Now using
144-
PyMongo 2.4's `MongoClient` and `MongoReplicaSetClient` objects
145-
instead of `Connection` and `ReplicaSetConnection` classes
146-
(tang0th).
147-
- [\#17](https://github.com/dcrosta/flask-pymongo/pull/17) Now
148-
requiring at least PyMongo version 2.4 (tang0th).
149-
- [\#17](https://github.com/dcrosta/flask-pymongo/pull/17) The wrapper
150-
class `flask_pymongo.wrappers.Connection` is renamed to
151-
`flask_pymongo.wrappers.MongoClient` (tang0th).
152-
- [\#17](https://github.com/dcrosta/flask-pymongo/pull/17) The wrapper
153-
class `flask_pymongo.wrappers.ReplicaSetConnection` is renamed to
154-
`flask_pymongo.wrappers.MongoReplicaSetClient` (tang0th).
155-
- [\#18](https://github.com/dcrosta/flask-pymongo/issues/18)
156-
`MONGO_AUTO_START_REQUEST` now defaults to `False` when connecting
157-
using a URI.
141+
- This is a minor version bump which may introduce backwards breaking
142+
changes! Please read these change notes carefully.
143+
- [#17](https://github.com/dcrosta/flask-pymongo/pull/17) Now using
144+
PyMongo 2.4's `MongoClient` and `MongoReplicaSetClient` objects
145+
instead of `Connection` and `ReplicaSetConnection` classes
146+
(tang0th).
147+
- [#17](https://github.com/dcrosta/flask-pymongo/pull/17) Now
148+
requiring at least PyMongo version 2.4 (tang0th).
149+
- [#17](https://github.com/dcrosta/flask-pymongo/pull/17) The wrapper
150+
class `flask_pymongo.wrappers.Connection` is renamed to
151+
`flask_pymongo.wrappers.MongoClient` (tang0th).
152+
- [#17](https://github.com/dcrosta/flask-pymongo/pull/17) The wrapper
153+
class `flask_pymongo.wrappers.ReplicaSetConnection` is renamed to
154+
`flask_pymongo.wrappers.MongoReplicaSetClient` (tang0th).
155+
- [#18](https://github.com/dcrosta/flask-pymongo/issues/18)
156+
`MONGO_AUTO_START_REQUEST` now defaults to `False` when connecting
157+
using a URI.
158158

159159
## 0.1.4: December 15, 2012
160160

161-
- [\#15](https://github.com/dcrosta/flask-pymongo/pull/15) Added
162-
support for `MONGO_MAX_POOL_SIZE` (Fabrice Aneche)
161+
- [#15](https://github.com/dcrosta/flask-pymongo/pull/15) Added
162+
support for `MONGO_MAX_POOL_SIZE` (Fabrice Aneche)
163163

164164
## 0.1.3: September 22, 2012
165165

166-
- Added support for configuration from MongoDB URI.
166+
- Added support for configuration from MongoDB URI.
167167

168168
## 0.1.2: June 18, 2012
169169

170-
- Updated wiki example application
171-
- [\#14](https://github.com/dcrosta/flask-pymongo/issues/14) Added
172-
examples and docs to PyPI package.
170+
- Updated wiki example application
171+
- [#14](https://github.com/dcrosta/flask-pymongo/issues/14) Added
172+
examples and docs to PyPI package.
173173

174174
## 0.1.1: May 26, 2012
175175

176-
- Added support for PyMongo 2.2's "auto start request" feature, by way
177-
of the `MONGO_AUTO_START_REQUEST` configuration flag.
178-
- [\#13](https://github.com/dcrosta/flask-pymongo/pull/13) Added
179-
BSONObjectIdConverter (Christoph Herr)
180-
- [\#12](https://github.com/dcrosta/flask-pymongo/pull/12) Corrected
181-
documentation typo (Thor Adam)
176+
- Added support for PyMongo 2.2's "auto start request" feature, by way
177+
of the `MONGO_AUTO_START_REQUEST` configuration flag.
178+
- [#13](https://github.com/dcrosta/flask-pymongo/pull/13) Added
179+
BSONObjectIdConverter (Christoph Herr)
180+
- [#12](https://github.com/dcrosta/flask-pymongo/pull/12) Corrected
181+
documentation typo (Thor Adam)
182182

183183
## 0.1: December 21, 2011
184184

185-
- Initial Release
185+
- Initial Release

0 commit comments

Comments
 (0)