Skip to content

Conversation

timgraham
Copy link
Member

This is useful with MongoDB.
Copy link
Contributor

@nessita nessita left a comment

Choose a reason for hiding this comment

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

Thank you @timgraham! This looks like a well-isolated and uncontroversial change. However, I feel uneasy about merging this, as in the past, I've seen similar proposals rejected for not being directly used within Django core.

Do you have any references to previous merges that set a precedent for landing a change like this?

@timgraham
Copy link
Member Author

timgraham commented Dec 17, 2024

I don't think it's controversial to add feature flags to support third-party database backends, so that they don't have to use a heavily forked version of the test suite. (Consider the possibility of moving a built-in backend like Oracle to a third-party package... I wouldn't propose to remove all of the Oracle feature flags in the test suite.) Certainly there could be some esoteric behaviors that impose too high a maintenance burden in the test suite, but I would say flags like this one are largely up to the third-party backends to keep up to date since patches with new tests in Django can't consider every third-party backend.

I upstreamed nearly all of the changes I needed for CockroachDB. Here are a few:
a7b4a04
227d0c7
f59a2b7
ede9fac

I don't anticipate being able to do the same for MongoDB since many of the changes are not appropriate, but this seemed like an easily described behavior that a SQL database could have.

Feel free to ping me on any feature flag proposals that come up in the future. I can't think of any that I rejected in the past, but I have forgotten a lot.

@felixxm
Copy link
Member

felixxm commented Dec 18, 2024

Do you have any references to previous merges that set a precedent for landing a change like this?

We always tried to encourage folks to build new database backends as a third party solutions. Assuring them that making small tweaks to the base backend to make their life easier is not a problem.

@nessita
Copy link
Contributor

nessita commented Dec 18, 2024

Thank you both, this information is really helpful!

@nessita nessita merged commit bb6114c into django:main Dec 18, 2024
42 checks passed
@timgraham timgraham deleted the rounds_to_even branch December 18, 2024 12:51
@pauloxnet
Copy link
Member

Do you have any references to previous merges that set a precedent for landing a change like this?

We always tried to encourage folks to build new database backends as a third party solutions. Assuring them that making small tweaks to the base backend to make their life easier is not a problem.

This is something that we should share publicly (e.g. in the database documentation) to encourage folks that want to build new database backends.

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.

4 participants