Roadmap #733
Replies: 5 comments 4 replies
-
|
@bckohan i want to start working on adding the stub files do i need to wait until the lib is getting updated to v5? |
Beta Was this translation helpful? Give feedback.
-
|
Hi @JohananOppongAmoateng! Thank you for volunteering! You might want to checkout #647 Huy had mentioned wanting to work on this but I'm not sure anything has happened yet. He mentioned maybe putting these types in typeshed instead of django-polymorphic... what do you think? |
Beta Was this translation helpful? Give feedback.
-
|
Honestly i think having the types in typeshed isnt bad but i am looking at long term the fact that we need to always sync the types as they change in the lib with typeshed. I think for start we can have them there if the need arises to include them in the lib we then move them here |
Beta Was this translation helpful? Give feedback.
-
|
I'm also partial to keeping them in this library. I also don't think we need to wait for 5.0 - who knows how long it will be before we get to that... If you want to start a branch we can just do our best to stay in sync until the merge! |
Beta Was this translation helpful? Give feedback.
-
|
I would want to keep all the types in stub files though. I think the rebasing will be waaaay easier that way. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
This is an update for everyone on how I'm thinking about and prioritizing work on this library so you may make decisions about continuing to use it based on more than nothing.
The first version of django-polymorphic was released 15 years ago in 2011. There are many users of this library and it runs in production systems around the world - per PyPi statistics it is not unreasonable to assume that somewhere approaching 5% of production Django systems depend on this library. During that time it has been supported by 6 different maintainers (@bconstantin @vdboor @chrisglass @jleclanche @meshy with me being the most recent) and over 125 individual contributors.
Maintaining open source is difficult. Volunteers burn out, get busy or have life changes that pull them away. There was a period of ~4 years where this library was essentially unmaintained. The Django/Python ecosystem marched on and things started to break. When I was granted maintainership there were 163 open issues and 16 open PRs - the oldest dating back 14 years.
Move to django-commons
This project was moved into jazzband not that long ago. Unfortunately the move took place without an identified maintainer so it languished for a few years without a successful update. The jazzband has been a true boon to the Django ecosystem over the years but I think this move is necessary for the health of this library for several reasons:
I do not have admin rights to this repo, nor do I have full admin rights to the pypi repository. This move will be hard to coordinate as we will need to get help from at least @jezdez @vdboor or @chrisglass . Please be patient.
Additional Maintainer
I would like to find at least one other additional maintainer with publish privileges. This will likely not move forward until the move to django-commons is complete. Given where I would like to take this library (see below) if you have experience in the guts of Django's ORM that would be extremely helpful! Otherwise - for trust - you would need an established record in the open source Django ecosystem. The best way to help right now is to pick off issues by opening PRs - I promise to look at them within a reasonable amount of time!
Progress So Far
Roadmap
I am cognizant that there are many outstanding bugs in this library and for users that have invested in its existing functionality fixing these should and will be be my top priority. The focus of the version 4.x series will be fixing those bugs while maintaining backwards compatibility. For version 5.x I would like to take a deeper look at how django-polymorphic works and determine if there are some fundamental changes that might notably increase its performance or simplify the implementation in ways that address the longstanding lack of support for
selected_relatedandprefetch_related.The current design of django-polymorphic is mostly a manager/queryset extension. It basically works by storing the most-derived leaf class ContentType on the parent table(s). When queries are made a second step uses those ContentTypes to run an additional query (or queries) if there are more derived tables for any model in the queryset. This works, is performant enough for most workflows, and is aligned with how most users would implement polymorphism themselves - but there may be deeper tie-ins to the Django ORM that could replace the 2-phase process with a single step process.
I want to acknowledge that of all the outstanding PRs those by @pgammans (@676 and @545) were the most thorough and impactful but they are the only two outstanding PRs I have not merged yet. I am delaying proxy model changes (@676) to version 5.x because there will be breaking changes. The current proxy model support is unintuitive and, I think, incongruous with the intent of proxy models in Django. I did not see a way to offer backwards compatibility with the current behavior without requiring users to change their code. I am delaying
select_relatedandprefetch_relatedsupport (@676) until I can do a more thorough review of the library's architecture and I do not want to publish an interface that might be immediately deprecated in the next release. Thank you @pgammans - I promise these PRs will not languish forever!Version 4.x
The last 4.x release will coincide with a Django LTS release (hopefully 6.2) to give users a solid 3 years to migrate to 5.x.
In priority order, with some issue links these are my areas of focus. Each block will be a release containing fixes in a related area. This should help users more easily identify the source of regressions if they arise and help keep me sane as I work through the backlog.
.alias()On Polymorphic Querysets #658savean entity when using a non-default db #486django-polymorphicfilter the popup change list for raw ID fields? #144dumpdata --naturalmanagement command missing parent fields to restore polymorphic child models #175The best way for folks to help right now is to pick out open issues and open PRs that have tests and fixes! I will happily accept and work on PRs that have tests illustrating bugs without the fixes in place yet!
Version 5.x
Version 5.x will include a significant scope of refactoring and potential breaking changes.
select_relatedandprefetch_relatedselect_relatedissue from parent on inherited models to avoid n+1 queries? #436select_relatedfor a polymorphic model only returns base class objects #410Please hold some grace for me and the other contributors to this library. Coming updates will likely trigger regressions. This is unavoidable to make progress and that progress lies at the feet of volunteers who are not remunerated for this work.
Beta Was this translation helpful? Give feedback.
All reactions