Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PYTHON-4264 Async PyMongo Beta #1629

Merged
merged 114 commits into from
Jun 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
114 commits
Select commit Hold shift + click to select a range
49c9fee
Rebased to master
NoahStapp Mar 8, 2024
5344769
All tests except fork tests passing
NoahStapp Mar 8, 2024
6a3adcf
Convert MongoClient to fully async part 1
NoahStapp Mar 11, 2024
80e66c5
WIP
NoahStapp Mar 12, 2024
4a26bcf
Async MongoClient
NoahStapp Mar 12, 2024
6e8a083
Async Database
NoahStapp Mar 12, 2024
7f4ae97
WIP SyncMongoClient with wrapper
NoahStapp Mar 12, 2024
a1613fa
Synchronized MongoClient
NoahStapp Mar 13, 2024
889347f
SyncCollection
NoahStapp Mar 13, 2024
ae928e5
WIP sync-friendly cursor
NoahStapp Mar 13, 2024
abc770e
Updating synchronize
NoahStapp Mar 15, 2024
e3e81fd
_get_topology fixed
NoahStapp Mar 18, 2024
c2b6838
WIP Database update
NoahStapp Mar 18, 2024
8880d70
WIP BaseCollection
NoahStapp Mar 19, 2024
316723a
BaseCollection and BaseDatabase
NoahStapp Mar 19, 2024
d52815e
Sync + Async CommandCursor
NoahStapp Mar 20, 2024
800b635
Finish SyncMongoClient
NoahStapp Mar 20, 2024
43161fe
Rename classes so default names are synchronous
NoahStapp Mar 20, 2024
191a84a
Complete Collection sync + async
NoahStapp Mar 20, 2024
2c4eff7
_Bulk sync + async
NoahStapp Mar 20, 2024
a6854da
Cleanup Database typing
NoahStapp Mar 20, 2024
6f17fde
Async + Sync Cursors
NoahStapp Mar 21, 2024
9602954
Overhaul CommandCursor
NoahStapp Mar 21, 2024
0b53c2a
Updated MongoClient
NoahStapp Mar 21, 2024
c2fb2e2
MongoClient update
NoahStapp Mar 21, 2024
51347e7
CommandCursor update
NoahStapp Mar 21, 2024
0eee282
test_client passes except test_insert_one for lazy
NoahStapp Mar 26, 2024
aa04f89
test_client - test_insert_one for lazy + test_collection pass
NoahStapp Mar 27, 2024
c99d240
test_database passing
NoahStapp Mar 27, 2024
9b952ee
1604 tests passing
NoahStapp Mar 28, 2024
75ddc1f
Add async GridFSBucket
NoahStapp Mar 28, 2024
1620bcc
GridFS tests passing
NoahStapp Apr 1, 2024
f64bb79
GridFS tests all passing
NoahStapp Apr 2, 2024
d2356fb
Initial commit
NoahStapp Apr 9, 2024
3f00241
Fix imports
NoahStapp Apr 9, 2024
f59e15b
test_collection passing
NoahStapp Apr 9, 2024
04f02a2
test_database passing
NoahStapp Apr 9, 2024
4835d6d
test_cursor passes
NoahStapp Apr 9, 2024
4a32ae6
Cleanup synchro imports
NoahStapp Apr 9, 2024
c731031
All but 7 non-gridfs tests passing
NoahStapp Apr 9, 2024
8196d7d
All tests that don't require custom behavior passing
NoahStapp Apr 9, 2024
bb6ad44
Move ismongos from Cursor constructor to separate function
NoahStapp Apr 10, 2024
f5e353c
Move ChangeStream._create_cursor() out of constructor
NoahStapp Apr 10, 2024
e4c9a1e
Add a_wrap_socket
NoahStapp Apr 10, 2024
6a4dee3
GridFS work
NoahStapp Apr 11, 2024
1ab0077
Move network and pyopenssl_context to top level
NoahStapp Apr 11, 2024
fad7e6f
WIP GridFS, 6 tests still failing
NoahStapp Apr 11, 2024
19e095d
All base tests passing
NoahStapp Apr 12, 2024
87bb217
Rename to avoid import ordering issues
NoahStapp Apr 15, 2024
732a8e3
Encryption tests passing
NoahStapp Apr 15, 2024
580ae12
WIP encryption, need async pymongocrypt
NoahStapp Apr 16, 2024
d6b2db5
Encryption passing
NoahStapp Apr 18, 2024
98bf04f
Changestream updates
NoahStapp Apr 18, 2024
9a74ba7
Remove unused
NoahStapp Apr 18, 2024
b26a9ee
Remove unused tests
NoahStapp Apr 18, 2024
f165531
Move helpers to asynchronous
NoahStapp Apr 19, 2024
4ca7201
Undo change to libmongocrypt
NoahStapp Apr 29, 2024
5d29d2d
Add IS_SYNC to pymongo files
NoahStapp Apr 29, 2024
237f3ed
Merge up to 4.8.0.dev0
NoahStapp Apr 30, 2024
d4d5b6b
Fix sendall signature
NoahStapp Apr 30, 2024
2aabc8a
Fix command cursor __del__ trying to lock
NoahStapp May 1, 2024
491f5f1
Fix oidc and ocsp tests
NoahStapp May 1, 2024
1396c6d
Format ocsp test uri
NoahStapp May 2, 2024
0f5110c
Only use _asyncio if available, default to asyncio for PyPy support
NoahStapp May 2, 2024
551b8a2
PYTHON-4372 Deprecate Python 3.7
NoahStapp May 2, 2024
035d981
PYTHON-4378 Update supported PyPy Versions to 3.9 and 3.10
NoahStapp May 2, 2024
33bc43a
Merge branch 'PYTHON-4372' into unasync
NoahStapp May 2, 2024
1091b98
Always use asyncio instead of _asyncio
NoahStapp May 3, 2024
090e52c
First pass of typecheck passing
NoahStapp May 7, 2024
4d5179e
All typechecks passing
NoahStapp May 7, 2024
85f6b09
Update to master
NoahStapp May 7, 2024
f2c34b3
Add our own wrapper for anext due to 3.8 support
NoahStapp May 7, 2024
93593e4
Remove testing comments from run-tests.sh
NoahStapp May 7, 2024
1fae89a
Add synchro + formatting to pre-commit
NoahStapp May 8, 2024
2a73146
Bump slotscheck version
NoahStapp May 8, 2024
a8efdb8
Update manifest
NoahStapp May 8, 2024
7c32cd0
Refactor top-level network.py
NoahStapp May 9, 2024
29ed111
Fix doc imports
NoahStapp May 9, 2024
bcbf7f1
Fix export tests
NoahStapp May 9, 2024
6a2a823
fix encryption import issue
NoahStapp May 9, 2024
eb234b2
Fix docstrings with automation
NoahStapp May 13, 2024
4082429
Fix spotty docstring translation
NoahStapp May 13, 2024
5a23dc0
Fix async_sendall
NoahStapp May 14, 2024
40e0097
Add async collection test suite
NoahStapp May 14, 2024
eb65030
Fix csot wrapper + async to_list
NoahStapp May 20, 2024
012f2fe
Add license to synchro.py
NoahStapp May 20, 2024
26c3e3f
Merge changes from master
NoahStapp May 20, 2024
1361ff3
Fix 3.8 typecheck
NoahStapp May 20, 2024
1c562c6
Move async test code to subfolder
NoahStapp May 20, 2024
42604db
Fix AsyncClientContext.pair
NoahStapp May 22, 2024
94a99a3
Async -> sync test_collection
NoahStapp May 23, 2024
63ce776
Fix typecheck for async test
NoahStapp May 23, 2024
c168e8d
Merge branch 'master' into unasync
NoahStapp May 23, 2024
5a6c90c
Add ruff ASYNC checks
NoahStapp May 28, 2024
8609ca6
Add parameter docstring translator for synchro
NoahStapp May 28, 2024
526e60a
Fix typechecking
NoahStapp May 29, 2024
0412a12
Remove async import references from top-level modules
NoahStapp May 30, 2024
bd1e9df
Add top-level reimport files for sync APIs
NoahStapp May 30, 2024
2dc0266
WIP
NoahStapp May 30, 2024
3307497
Move periodic_executor to asynchronous, remove _Lock + _Condition, un…
NoahStapp May 31, 2024
5a9e8c7
Use anext when possible, fallback only on 3.9
NoahStapp May 31, 2024
f2ae9af
Update import compatibility test
NoahStapp May 31, 2024
0e25b74
Move import compatibility tests into test_default_exports
NoahStapp Jun 3, 2024
241894e
Remove unnecessary imports from pymongo init
NoahStapp Jun 3, 2024
001dafc
Resync with master
NoahStapp Jun 3, 2024
d0a8c51
Fix test failures
NoahStapp Jun 3, 2024
e1ceee2
Re-import modules should also re-import module docstrings
NoahStapp Jun 3, 2024
290ebf3
Resync master again
NoahStapp Jun 3, 2024
77a4328
Merge branch 'master' into unasync
NoahStapp Jun 3, 2024
7fcfb6e
IS_SYNC -> _IS_SYNC
NoahStapp Jun 4, 2024
8399aa1
Address review
NoahStapp Jun 5, 2024
b96678c
Resync with master
NoahStapp Jun 5, 2024
a0305be
Re-add create arg to Collection, will be removed in 5.0
NoahStapp Jun 5, 2024
e007f6c
Remove double call of Collection._create
NoahStapp Jun 6, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,17 @@ repos:
exclude: .patch
exclude_types: [json]

- repo: local
hooks:
- id: synchro
name: synchro
entry: bash ./tools/synchro.sh
language: python
require_serial: true
additional_dependencies:
- ruff==0.1.3
- unasync

- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.1.3
Expand Down Expand Up @@ -74,7 +85,7 @@ repos:
stages: [manual]

- repo: https://github.com/ariebovenberg/slotscheck
rev: v0.17.0
rev: v0.19.0
hooks:
- id: slotscheck
files: \.py$
Expand Down
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ include doc/make.bat
include doc/static/periodic-executor-refs.dot
recursive-include requirements *.txt
recursive-include tools *.py
recursive-include tools *.sh
include tools/README.rst
include green_framework_test.py
recursive-include test *.pem
Expand Down
10 changes: 5 additions & 5 deletions doc/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ Changelog

Changes in Version 4.8.0
-------------------------

The handshake metadata for "os.name" on Windows has been simplified to "Windows" to improve import time.

The repr of ``bson.binary.Binary`` is now redacted when the subtype is SENSITIVE_SUBTYPE(8).

.. warning:: PyMongo 4.8 drops support for Python 3.7 and PyPy 3.8: Python 3.8+ or PyPy 3.9+ is now required.

PyMongo 4.8 brings a number of improvements including:
- The handshake metadata for "os.name" on Windows has been simplified to "Windows" to improve import time.
- The repr of ``bson.binary.Binary`` is now redacted when the subtype is SENSITIVE_SUBTYPE(8).
- A new asynchronous API with full asyncio support.

Changes in Version 4.7.3
-------------------------

Expand Down
Loading
Loading