Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Experimental APIs - #114

Draft
prafulgulani wants to merge 1 commit into
django:mainfrom
prafulgulani:experimental-apis
Draft

Experimental APIs#114
prafulgulani wants to merge 1 commit into
django:mainfrom
prafulgulani:experimental-apis

Conversation

@prafulgulani

@prafulgulani prafulgulani commented Jun 18, 2026

Copy link
Copy Markdown

This DEP proposes "Experimental" space to document, test and mature unstable features before they are locked into permanent stability guarantee.

References:

@LilyFirefly LilyFirefly left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for making a start on this! I have a bit of early feedback:

Comment on lines +98 to +102
long-standing framework components without breaking existing projects. For example,
`updating auth.User <https://buttondown.com/carlton/archive/evolving-djangos-authuser/>`_
to replace the ``first_name`` and ``last_name`` fields with a singular ``name`` field,
or making the email unique, becomes possible because the community can natively test
the changes before they are made permanent.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

While I'd love to see the first_name and last_name go, I'm not clear enough on how the experimental zone will interact with migrations to enable this cleanly.

Would we have new migrations in the experimental area that we opt-in to by adding a suitable entry in INSTALLED_APPS? If so, what would the process be for moving the migrations into stable once the experiment is successful? How do we handle removing migrations if the experiment is unsuccessful?

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Very good questions Lily! I suggested this area as an example for us to ground the conversation of the flags in a real problem which the community would like to see changed, but very likely impossible to change via the current methods (I could be wrong).

While the migrations would be tricky, it enables to propose a fresh default User model to work from (at least for new projects).

More broadly this is something we (myself & Praful) can experiment with once we something of flags up and running.

Comment thread draft/experimental-apis.rst Outdated
Comment on lines +73 to +75
We see this in `Ticket-28805 (adding database functions for regular expressions) <https://code.djangoproject.com/ticket/28805>`_.
While implementations for some database backends were ready, the feature stalled for
years because core integration required simultaneous support across every single

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I don't draw this same conclusion when I read the ticket. I think it stalled because of the complexity of "juggling so many database-specific flags", which is the nature of a cross-database abstraction given the complexity of the function we are talking about. I don't think this example backs up the "why" point here.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Would multi-column primary keys be a more relevant example for this?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Yes!

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Well, it has a different effect than the original example because it's something that we did merge without putting it under an experimental namespace and without the need for shipping a lot of incremental deprecations for design changes. So its success doesn't really demonstrate the need for a change.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Sure, but I meant it more as could have things gone better with a less restrictive support policy for it? Better being subjective across a number of facets (communication, documentation clarity, development, etc)

space, we can safely document them and provide a direct link to a dedicated forum
discussion where all the feedback can be gathered.

The Experimental Feature Pipeline

@nanorepublica nanorepublica Jul 1, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

One broad topic I come back to is with this idea is how this works with the current release cadences and how the community installs Django.

Currently Django has 3 release types. Bugfix, Feature & Series releases (from DEP 19). DEP 20 changes this and effective drops this down to 2 types (Feature & Bugfix).

Bugfix releases are shipped monthly. This is the current minimum time to ship something as I understand it, but these bugfixes are specifically backported to frozen feature branches.

I think therefore there is only one way for developers to test these experimental features quickly inside Django and that is installing Django from the main branch (or a slightly delayed main branch). - which is not a bad thing, ideally more folks would test/use Django against main (https://noumenal.es/posts/running-django-main/O2x/)

This means only those installing from main will get experimental features iteratively (and therefore quickly)


Worth noting the above is my current thoughts. I'm working through how this affects the project overall and being useful to the community

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The other possible path here is that we choose to start using python package extras to generate releases with the experimental code included. This would mean that we wouldn't be limited to having code within Django core that appears in a final Django package.

I generally think that we need to investigate the release process and what the Fellows would think to additional work added to the release process or more additional releases being added to the process.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think therefore there is only one way for developers to test these experimental features quickly inside Django and that is installing Django from the main branch (or a slightly delayed main branch). - which is not a bad thing, ideally more folks would test/use Django against main

Recommending people to use main for production applications is probably not a good idea. Mistakes still happen. For a project that hangs its hat on stability, recommending people use main in production seems like contradiction. Sure, there's room to have "versions" of main that are more reliable or have a high degree of reliability, but that doesn't exist in our process today so it likely shouldn't be included here.

Abstract
========

This DEP proposes a formal process for introducing "Experimental" features and

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Low: I think the term "experimental" needs clarification. I suspect folks have different opinions on it. For me, I imagine it's something that's fairly likely to be merged in, but there's some hesitancy. It's basically just a new stage of integrating a feature, but in this case we know we need to go slower with this feature than normal.

I'm drawn to multi-column primary keys as something that may have benefited from this. It's implemented, but not fully. Would it be helpful to be able to change the public API for another release without deprecations?

Comment on lines +152 to +155
* **Direct Links for Forum Feedback:** Every experimental documentation block will
include a direct link pointing to a dedicated feedback thread on the Django Forum.
This ensures all user experiences, bug reports, and design suggestions are collected
in one place.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think this needs rethinking. Bug reports should always go through Trac. Being able to note the experiment or feature in there would be helpful.

I think the feedback portion is a good idea, but we should provide a bit more structure for someone. If we have an experiment, there was a reason for it. That's the spot that we particularly want feedback on. How do we make that easier for everyone?

@LilyFirefly

Copy link
Copy Markdown
Contributor

I wonder if support for http QUERY (django/new-features#185) would be a good candidate for exposing via experimental APIs?

@nanorepublica

Copy link
Copy Markdown

Ha 😄 , I was thinking the same thing given that precise feature has come up 4 separate times now.

It's something that would be appropriate for core and would allow us to develop and release it while the RFC is being still proposed. Only once it becomes finalised do we make it stable.

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.

5 participants