[Django] #28930: Utilize all()/any()

10 views
Skip to first unread message

Django

unread,
Dec 15, 2017, 10:02:20 AM12/15/17
to django-...@googlegroups.com
#28930: Utilize all()/any()
------------------------------------------------+------------------------
Reporter: Дилян Палаузов | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Uncategorized | Version: master
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
------------------------------------------------+------------------------


--
Ticket URL: <https://code.djangoproject.com/ticket/28930>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Dec 15, 2017, 10:02:41 AM12/15/17
to django-...@googlegroups.com
#28930: Utilize all()/any()
-------------------------------------+-------------------------------------

Reporter: Дилян Палаузов | Owner: nobody
Type: | Status: new
Cleanup/optimization |
Component: Uncategorized | Version: master
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 Дилян Палаузов):

* Attachment "any_all.patch" added.

Django

unread,
Dec 15, 2017, 12:41:31 PM12/15/17
to django-...@googlegroups.com
#28930: Utilize all()/any()
--------------------------------------+------------------------------------

Reporter: Дилян Палаузов | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Uncategorized | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by Claude Paroz):

* stage: Unreviewed => Accepted


Comment:

Thanks, please provide a pull request.

--
Ticket URL: <https://code.djangoproject.com/ticket/28930#comment:1>

Django

unread,
Dec 26, 2017, 1:48:08 PM12/26/17
to django-...@googlegroups.com
#28930: Utilize all()/any()
--------------------------------------+------------------------------------

Reporter: Дилян Палаузов | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Uncategorized | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Description changed by Srinivas Reddy Thatiparthy:

Old description:

New description:

What is the policy for taking this patch and raising a PR? Ofcourse, I
acknowledge the author.

I like this patch very much, i couldn't resist to raise a PR. If i break
the unspoken rules, please close the PR.

https://github.com/django/django/pull/9493

--

--
Ticket URL: <https://code.djangoproject.com/ticket/28930#comment:2>

Django

unread,
Dec 26, 2017, 1:48:43 PM12/26/17
to django-...@googlegroups.com
#28930: Utilize all()/any()
--------------------------------------+------------------------------------

Reporter: Дилян Палаузов | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Uncategorized | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------

Old description:

> What is the policy for taking this patch and raising a PR? Ofcourse, I
> acknowledge the author.
>
> I like this patch very much, i couldn't resist to raise a PR. If i break
> the unspoken rules, please close the PR.
>
> https://github.com/django/django/pull/9493

New description:

--

Comment (by Srinivas Reddy Thatiparthy):

What is the policy for taking this patch and raising a PR? Ofcourse, I
acknowledge the author.

I like this patch very much, i couldn't resist to raise a PR. If i break
the unspoken rules, please close the PR.

https://github.com/django/django/pull/9493

--
Ticket URL: <https://code.djangoproject.com/ticket/28930#comment:3>

Django

unread,
Dec 26, 2017, 3:04:06 PM12/26/17
to django-...@googlegroups.com
#28930: Simplify code iwth all() and any()
-------------------------------------+-------------------------------------

Reporter: Дилян Палаузов | Owner: nobody
Type: | Status: new
Cleanup/optimization |
Component: Core (Other) | Version: master
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 Tim Graham):

* has_patch: 0 => 1
* component: Uncategorized => Core (Other)
* stage: Accepted => Ready for checkin


Comment:

That's fine. For future reference, the way to credit the patch author is
using `git commit --amend --author="Дилян Палаузов
<Dilyan....@db.com>"`. It would have been nice if you fixed up the
flake8 issues and the failing lists, but I've done that. I also reverted
changes to vendored code like `six.py` and an incorrect change in
`admin/utils.py` which changed behavior and broke a test.

--
Ticket URL: <https://code.djangoproject.com/ticket/28930#comment:4>

Django

unread,
Dec 26, 2017, 3:06:18 PM12/26/17
to django-...@googlegroups.com
#28930: Simplify code with all() and any()
-------------------------------------+-------------------------------------

Reporter: Дилян Палаузов | Owner: nobody
Type: | Status: new
Cleanup/optimization |
Component: Core (Other) | Version: master
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
-------------------------------------+-------------------------------------

--
Ticket URL: <https://code.djangoproject.com/ticket/28930#comment:5>

Django

unread,
Dec 26, 2017, 5:27:27 PM12/26/17
to django-...@googlegroups.com
#28930: Simplify code with all() and any()
-------------------------------------+-------------------------------------
Reporter: Дилян Палаузов | Owner: nobody
Type: | Status: closed

Cleanup/optimization |
Component: Core (Other) | Version: master
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 Tim Graham <timograham@…>):

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


Comment:

In [changeset:"4c599ece57fa009cf3615f09497f81bfa6a585a7" 4c599ece]:
{{{
#!CommitTicketReference repository=""
revision="4c599ece57fa009cf3615f09497f81bfa6a585a7"
Fixed #28930 -- Simplified code with any() and all().
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/28930#comment:6>

Django

unread,
Jan 2, 2018, 7:47:20 AM1/2/18
to django-...@googlegroups.com
#28930: Simplify code with all() and any()
-------------------------------------+-------------------------------------
Reporter: Дилян Палаузов | Owner: nobody
Type: | Status: new

Cleanup/optimization |
Component: Core (Other) | Version: master
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 Дилян Палаузов):

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


Comment:

What happened to the changes in django/utils/translation/trans_real.py and
tests/schema/tests.py ?

--
Ticket URL: <https://code.djangoproject.com/ticket/28930#comment:7>

Django

unread,
Jan 2, 2018, 10:12:56 AM1/2/18
to django-...@googlegroups.com
#28930: Simplify code with all() and any()
-------------------------------------+-------------------------------------
Reporter: Дилян Палаузов | Owner: nobody
Type: | Status: new
Cleanup/optimization |
Component: Core (Other) | Version: master
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
-------------------------------------+-------------------------------------

Comment (by Tim Graham <timograham@…>):

In [changeset:"5f456408a0f52dc16f627d4a89ced5f52c36ad2f" 5f45640]:
{{{
#!CommitTicketReference repository=""
revision="5f456408a0f52dc16f627d4a89ced5f52c36ad2f"
Refs #28930 -- Simplified schemas test with any().
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/28930#comment:8>

Django

unread,
Jan 2, 2018, 10:13:59 AM1/2/18
to django-...@googlegroups.com
#28930: Simplify code with all() and any()
-------------------------------------+-------------------------------------
Reporter: Дилян Палаузов | Owner: nobody
Type: | Status: closed

Cleanup/optimization |
Component: Core (Other) | Version: master
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 Tim Graham):

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


Comment:

Changes were made to django/utils/translation/trans_real.py in the
original patch.

--
Ticket URL: <https://code.djangoproject.com/ticket/28930#comment:9>

Django

unread,
Jan 2, 2018, 11:50:00 AM1/2/18
to django-...@googlegroups.com
#28930: Simplify code with all() and any()
-------------------------------------+-------------------------------------
Reporter: Дилян Палаузов | Owner: nobody
Type: | Status: new

Cleanup/optimization |
Component: Core (Other) | Version: master
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 Дилян Палаузов):

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


Comment:

I wrote django/utils/translation/trans_real.py but I meant
django/utils/http.py .

--
Ticket URL: <https://code.djangoproject.com/ticket/28930#comment:10>

Django

unread,
Jan 2, 2018, 12:51:47 PM1/2/18
to django-...@googlegroups.com
#28930: Simplify code with all() and any()
-------------------------------------+-------------------------------------
Reporter: Дилян Палаузов | Owner: nobody
Type: | Status: closed

Cleanup/optimization |
Component: Core (Other) | Version: master
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 Tim Graham):

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


Comment:

As the docstring indicates, that code is copied from cpython so I didn't
want to make substantial changes to it.

--
Ticket URL: <https://code.djangoproject.com/ticket/28930#comment:11>

Reply all
Reply to author
Forward
0 new messages