Re: [Django] #35224: Make GenericForeignKey a subclass of Field

2024-02-19 Thread Django
#35224: Make GenericForeignKey a subclass of Field
-+-
 Reporter:  Adam Johnson |Owner:  Adam
 Type:   |  Johnson
  Cleanup/optimization   |   Status:  closed
Component:   |  Version:  dev
  contrib.contenttypes   |
 Severity:  Normal   |   Resolution:  fixed
 Keywords:   | Triage Stage:  Ready for
 |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Mariusz Felisiak ):

 * resolution:   => fixed
 * status:  assigned => closed

Comment:

 In [changeset:"6002df06713cb0a7050432263527a25754190c27" 6002df06]:
 {{{#!CommitTicketReference repository=""
 revision="6002df06713cb0a7050432263527a25754190c27"
 Fixed #35224 -- Made GenericForeignKey inherit from Field.
 }}}
-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107018dc0b4a1ab-72e4475d-f385-4ec8-93c4-0fc790b74349-00%40eu-central-1.amazonses.com.


Re: [Django] #35224: Make GenericForeignKey a subclass of Field

2024-02-19 Thread Django
#35224: Make GenericForeignKey a subclass of Field
-+-
 Reporter:  Adam Johnson |Owner:  Adam
 Type:   |  Johnson
  Cleanup/optimization   |   Status:  assigned
Component:   |  Version:  dev
  contrib.contenttypes   |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Ready for
 |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Mariusz Felisiak):

 * stage:  Accepted => Ready for checkin

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107018dc09553c9-508f5c3a-db97-4a69-9a0f-2a86382c78a4-00%40eu-central-1.amazonses.com.


Re: [Django] #35224: Make GenericForeignKey a subclass of Field

2024-02-16 Thread Django
#35224: Make GenericForeignKey a subclass of Field
-+-
 Reporter:  Adam Johnson |Owner:  Adam
 Type:   |  Johnson
  Cleanup/optimization   |   Status:  assigned
Component:   |  Version:  dev
  contrib.contenttypes   |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Adam Johnson):

 * owner:  (none) => Adam Johnson
 * status:  new => assigned

Comment:

 Dylan, I already attached a PR to this ticket.
-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107018db5bfabdf-64774549-9d9d-4870-a587-43e05c8203aa-00%40eu-central-1.amazonses.com.


Re: [Django] #35224: Make GenericForeignKey a subclass of Field

2024-02-16 Thread Django
#35224: Make GenericForeignKey a subclass of Field
--+
 Reporter:  Adam Johnson  |Owner:  (none)
 Type:  Cleanup/optimization  |   Status:  new
Component:  contrib.contenttypes  |  Version:  dev
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Accepted
Has patch:  1 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+
Changes (by Dylan Patrick Go):

 * owner:  Dylan Patrick Go => (none)
 * status:  assigned => new

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107018db5900730-504626f3-4d8d-48a4-9ce7-cdd47426f3cb-00%40eu-central-1.amazonses.com.


Re: [Django] #35224: Make GenericForeignKey a subclass of Field

2024-02-16 Thread Django
#35224: Make GenericForeignKey a subclass of Field
-+-
 Reporter:  Adam Johnson |Owner:  Dylan
 Type:   |  Patrick Go
  Cleanup/optimization   |   Status:  assigned
Component:   |  Version:  dev
  contrib.contenttypes   |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Comment (by Adam Johnson):

 There’s an open PR, the tests all pass.
-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107018db5858c03-cc3029e9-9507-473d-b75c-42a355afc88b-00%40eu-central-1.amazonses.com.


Re: [Django] #35224: Make GenericForeignKey a subclass of Field

2024-02-16 Thread Django
#35224: Make GenericForeignKey a subclass of Field
-+-
 Reporter:  Adam Johnson |Owner:  Dylan
 Type:   |  Patrick Go
  Cleanup/optimization   |   Status:  assigned
Component:   |  Version:  dev
  contrib.contenttypes   |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Dylan Patrick Go):

 * owner:  nobody => Dylan Patrick Go

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107018db511b9f0-295fee9c-fc2d-41da-a657-44d241ba340c-00%40eu-central-1.amazonses.com.


Re: [Django] #35224: Make GenericForeignKey a subclass of Field

2024-02-16 Thread Django
#35224: Make GenericForeignKey a subclass of Field
--+
 Reporter:  Adam Johnson  |Owner:  nobody
 Type:  Cleanup/optimization  |   Status:  assigned
Component:  contrib.contenttypes  |  Version:  dev
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Accepted
Has patch:  1 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+
Changes (by Simon Charette):

 * stage:  Unreviewed => Accepted

Comment:

 I'm eager to see what the test suite says but it seems like a worth
 cleanup!
-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107018db43f5c1a-268e9cdd-5f93-483a-b98a-5398df31e578-00%40eu-central-1.amazonses.com.


Re: [Django] #35224: Make GenericForeignKey a subclass of Field

2024-02-16 Thread Django
#35224: Make GenericForeignKey a subclass of Field
-+-
 Reporter:  Adam Johnson |Owner:  nobody
 Type:   |   Status:  assigned
  Cleanup/optimization   |
Component:   |  Version:  dev
  contrib.contenttypes   |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:
 |  Unreviewed
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Adam Johnson):

 * has_patch:  0 => 1

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107018db421d018-dfcb1784-90b1-4246-8407-66b464dc2aab-00%40eu-central-1.amazonses.com.


Re: [Django] #35224: Make GenericForeignKey a subclass of Field (was: Make GenericForeignKey subclass Field)

2024-02-16 Thread Django
#35224: Make GenericForeignKey a subclass of Field
-+-
 Reporter:  Adam Johnson |Owner:  nobody
 Type:   |   Status:  assigned
  Cleanup/optimization   |
Component:   |  Version:  dev
  contrib.contenttypes   |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:
 |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Adam Johnson):

 * summary:  Make GenericForeignKey subclass Field => Make GenericForeignKey
 a subclass of Field


Old description:

> When introduced in bca5327b21eb2e3ee18292cbe532d6d0071201d8,
> GenericForeignKey was created as its own class. Since then, it has grown
> to resemble a field, particularly in
> fb48eb05816b1ac87d58696cdfe48be18c901f16.
>
> GenericForeignKey *not* being a `Field` leads to several issues:
> 1. It is added as a “field” and returned by `Model._meta.get_fields()`, a
> type confusion [https://github.com/typeddjango/django-
> stubs/blob/5a8e7b3855ea6f7be2b2ab928d02eff9a748d917/django-
> stubs/db/models/options.pyi#L122-L124 reflected in django-stubs].
> 2. It duplicates code, such as `_check_field_name()`.
> 3. It misses methods like `__repr__()`.
>
> I think we should make it a subclass of `Field`.

New description:

 When introduced in bca5327b21eb2e3ee18292cbe532d6d0071201d8,
 GenericForeignKey was created as its own class. Since then, it has grown
 to resemble a field, particularly in
 fb48eb05816b1ac87d58696cdfe48be18c901f16.

 GenericForeignKey *not* being a `Field` leads to several issues:
 1. It is added as a “field” and returned by `Model._meta.get_fields()`, a
 type confusion [https://github.com/typeddjango/django-
 stubs/blob/5a8e7b3855ea6f7be2b2ab928d02eff9a748d917/django-
 stubs/db/models/options.pyi#L122-L124 reflected in django-stubs].
 2. It duplicates code, such as `_check_field_name()`.
 3. It misses methods like `__repr__()`.

 I think we should make it a subclass of `Field`.

 (`GenericRelation` has always been a subclass of `Field`.)

--
-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107018db4218f72-e6577486-c966-4b89-b197-44ae4287b9cc-00%40eu-central-1.amazonses.com.