[Django] #34347: Mypy complaint: module "django.contrib.gis.utils" does not explicitly export attribute "LayerMapping"

48 views
Skip to first unread message

Django

unread,
Feb 17, 2023, 8:33:47 AM2/17/23
to django-...@googlegroups.com
#34347: Mypy complaint: module "django.contrib.gis.utils" does not explicitly
export attribute "LayerMapping"
-----------------------------------------+------------------------
Reporter: syre | Owner: nobody
Type: Uncategorized | Status: new
Component: Uncategorized | Version: 4.1
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 |
-----------------------------------------+------------------------
Mypy complains that:
module "django.contrib.gis.utils" does not explicitly export attribute
"LayerMapping"

Since the documentation uses that import path, for example:
https://docs.djangoproject.com/en/4.1/ref/contrib/gis/layermapping/

I guess django.contrib.gis.utils.!__init!__ should contain !__all!__?

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

Django

unread,
Feb 17, 2023, 10:13:57 AM2/17/23
to django-...@googlegroups.com
#34347: Mypy complaint: module "django.contrib.gis.utils" does not explicitly
export attribute "LayerMapping"
-------------------------------------+-------------------------------------
Reporter: Søren Howe Gersager | Owner: nobody

Type: Uncategorized | Status: new
Component: Uncategorized | Version: 4.1
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 Søren Howe Gersager):

* has_patch: 0 => 1


Old description:

> Mypy complains that:
> module "django.contrib.gis.utils" does not explicitly export attribute
> "LayerMapping"
>
> Since the documentation uses that import path, for example:
> https://docs.djangoproject.com/en/4.1/ref/contrib/gis/layermapping/
>
> I guess django.contrib.gis.utils.!__init!__ should contain !__all!__?

New description:

Mypy complains that:
module "django.contrib.gis.utils" does not explicitly export attribute
"LayerMapping"

Since the documentation uses that import path, for example:
https://docs.djangoproject.com/en/4.1/ref/contrib/gis/layermapping/

I guess django.contrib.gis.utils.!__init!__ should contain !__all!__?

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

--

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

Django

unread,
Feb 17, 2023, 10:52:11 AM2/17/23
to django-...@googlegroups.com
#34347: Mypy complaint: module "django.contrib.gis.utils" does not explicitly
export attribute "LayerMapping"
--------------------------------------+------------------------------------

Reporter: Søren Howe Gersager | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: GIS | Version: 4.1
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted

Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1

Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by Tim Graham):

* needs_better_patch: 0 => 1
* type: Uncategorized => Cleanup/optimization
* component: Uncategorized => GIS
* stage: Unreviewed => Accepted


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

Django

unread,
Feb 17, 2023, 3:01:01 PM2/17/23
to django-...@googlegroups.com
#34347: Mypy complaint: module "django.contrib.gis.utils" does not explicitly
export attribute "LayerMapping"
-------------------------------------+-------------------------------------

Reporter: Søren Howe Gersager | Owner: nobody
Type: | Status: new
Cleanup/optimization |

Component: GIS | Version: 4.1
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):

* needs_better_patch: 1 => 0
* stage: Accepted => Ready for checkin


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

Django

unread,
Feb 17, 2023, 3:43:20 PM2/17/23
to django-...@googlegroups.com
#34347: Mypy complaint: module "django.contrib.gis.utils" does not explicitly
export attribute "LayerMapping"
-------------------------------------+-------------------------------------
Reporter: Søren Howe Gersager | Owner: nobody
Type: | Status: closed

Cleanup/optimization |
Component: GIS | Version: 4.1
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 <felisiak.mariusz@…>):

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


Comment:

In [changeset:"eafe1468d228e6f63d044f787a9ffec82ec22746" eafe1468]:
{{{
#!CommitTicketReference repository=""
revision="eafe1468d228e6f63d044f787a9ffec82ec22746"
Fixed #34347 -- Added __all__ to django.contrib.gis.utils.
}}}

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

Reply all
Reply to author
Forward
0 new messages