Skip to content

Convert async_connect to sync, AwareDateTimeField optimisations and test fixes#8

Merged
arunsureshkumar merged 3 commits into
feat/asyncfrom
feat/async-connect-sync
Jun 23, 2026
Merged

Convert async_connect to sync, AwareDateTimeField optimisations and test fixes#8
arunsureshkumar merged 3 commits into
feat/asyncfrom
feat/async-connect-sync

Conversation

@mak626

@mak626 mak626 commented Jun 4, 2026

Copy link
Copy Markdown
Member
  • Made async_connect sync since the AsyncMongoClient class does not need an async wrapper.
  • optimise: AwareDateTimeField available_timezones() call was CPU intensive, add support for precision format
  • A lot of tests and core lib had missing await in PyMongo async calls. Tests would pass on these since omitting await is a truthy operation

mak626 added 2 commits June 5, 2026 00:03
…et_connection, async_connect to sync

remove reconnect param from async_get_connection since pymongo internally manages this
@mak626 mak626 force-pushed the feat/async-connect-sync branch from 748c0c4 to 0ac5c08 Compare June 4, 2026 18:36
@mak626 mak626 changed the title Convert async_connect to sync, ZonedDateTimeField optimisations and test fixes Convert async_connect to sync, AwareDateTimeField optimisations and test fixes Jun 4, 2026
@mak626 mak626 force-pushed the feat/async-connect-sync branch from 0ac5c08 to c6bf5de Compare June 4, 2026 18:50
@@ -1,5 +1,5 @@
from pymongo import AsyncMongoClient, ReadPreference
from pymongo.asynchronous import uri_parser

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The sync and async uri_parser are both internally sync

@arunsureshkumar arunsureshkumar merged commit d918b1a into feat/async Jun 23, 2026
248 checks passed
@mak626 mak626 deleted the feat/async-connect-sync branch June 25, 2026 13:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants