rednaks / django-async-orm

Bringing Async Capabilities to django ORM
https://pypi.org/project/django-async-orm/
MIT License
131 stars 9 forks source link

Comply with Django async syntax #22

Closed Archmonger closed 1 year ago

Archmonger commented 1 year ago

Changelog

Archmonger commented 1 year ago

Tests seem to be broken on Windows

PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'testdb.sqlite3'

So I'll rely on the GitHub workflow to test this PR.

rednaks commented 1 year ago

Thank you @Archmonger , the idea was to keep both the new django syntax and keep the old one, just to avoid breaking things for those who still use the current syntax.

But perhaps we can add a Deprecation warning for the old one.

Archmonger commented 1 year ago

Sure will do

Archmonger commented 1 year ago

Btw do you want to avoid replacing existing Django methods?

For example, if the user's Django version already has acreate defined, should we avoid monkey patching it? Would help for future compatibility when Django adds real async support.

Archmonger commented 1 year ago

I highly recommend doing a squash merge on this one, since the commit log is quite messy.

rednaks commented 1 year ago

Thank you @Archmonger for this amazing work, I will look at it and squash-merge if everything is good !

Archmonger commented 1 year ago

Let me know when you can review this PR.

After this gets merged, I'll PR the following

Archmonger commented 1 year ago

@rednaks Can you either merge this PR or add me as a maintainer?

I'd like to get his repo into a production-ready state.