Re: [Django] #35547: reset_queries not included in __all__ of django/db/__init__.py

10 views
Skip to first unread message

Django

unread,
Jun 24, 2024, 3:27:17 AM6/24/24
to django-...@googlegroups.com
#35547: reset_queries not included in __all__ of django/db/__init__.py
-------------------------------------+-------------------------------------
Reporter: AjmalPonneth | Owner:
Type: | AjmalPonneth
Cleanup/optimization | Status: assigned
Component: Database layer | Version: 5.0
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by AjmalPonneth):

Replying to [comment:7 Mariusz Felisiak]:
> Replying to [comment:6 AjmalPonneth]:
> > Currently, the `reset_queries` function is not importable from
`django.db`. Since it's not included in the ` __all__` from `django.db`.
>
> That's not true. `reset_queries` can be imported from `django.db` even
without including it in `__all__`, e.g.
https://github.com/django/django/blob/7ba2a0db20c37a5b1500434ca4ed48022311c171/django/test/utils.py#L25.

I agree. But the linters will complain like this `reset_queries not
declared in __all__`
--
Ticket URL: <https://code.djangoproject.com/ticket/35547#comment:9>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Jun 24, 2024, 4:11:27 AM6/24/24
to django-...@googlegroups.com
#35547: reset_queries not included in __all__ of django/db/__init__.py
-------------------------------------+-------------------------------------
Reporter: AjmalPonneth | Owner:
Type: | AjmalPonneth
Cleanup/optimization | Status: closed
Component: Database layer | Version: 5.0
(models, ORM) |
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: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Sarah Boyce <42296566+sarahboyce@…>):

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

Comment:

In [changeset:"2a082d827de05528cb976109f219ec9b00490d2d" 2a082d8]:
{{{#!CommitTicketReference repository=""
revision="2a082d827de05528cb976109f219ec9b00490d2d"
Fixed #35547 -- Added reset_queries to django.db.__all__.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/35547#comment:10>

Django

unread,
Jun 24, 2024, 4:14:47 AM6/24/24
to django-...@googlegroups.com
#35547: reset_queries not included in __all__ of django/db/__init__.py
-------------------------------------+-------------------------------------
Reporter: AjmalPonneth | Owner:
Type: | AjmalPonneth
Cleanup/optimization | Status: closed
Component: Database layer | Version: 5.0
(models, ORM) |
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: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Sarah Boyce <42296566+sarahboyce@…>):

In [changeset:"56180fb5ff7dac6fcd5419adb8d163c7ebf4b85d" 56180fb]:
{{{#!CommitTicketReference repository=""
revision="56180fb5ff7dac6fcd5419adb8d163c7ebf4b85d"
[5.1.x] Fixed #35547 -- Added reset_queries to django.db.__all__.

Backport of 2a082d827de05528cb976109f219ec9b00490d2d from main.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/35547#comment:11>
Reply all
Reply to author
Forward
0 new messages