#30461: contrib.gis.geoip2 does not support pathlib.Path as GEOIP_PATH
parameter,
only str
---------------------------------------+--------------------------
Reporter: lsnk | Owner: nobody
Type: New feature | Status: assigned
Component: GIS | Version: 2.2
Severity: Normal | Keywords: geoip2
Triage Stage: Unreviewed | Has patch: 1
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 1
UI/UX: 0 |
---------------------------------------+--------------------------
I want to pass Path instance directly as GEOIP_PATH param but currently it
only allowes str instances.
As I understand, min Python version for Django 2.2 is 3.5+ so I can freely
pass Path instance there.
{{{
...
# Getting the GeoIP data path.
path = path or GEOIP_SETTINGS['GEOIP_PATH']
if not path:
raise GeoIP2Exception('GeoIP path must be provided via
parameter or the GEOIP_PATH setting.')
if not isinstance(path, str):
raise TypeError('Invalid path type: %s' % type(path).__name__)
path = Path(path)
...
}}}
I can fix this issue myself.
--
Ticket URL: <https://code.djangoproject.com/ticket/30461>
Django <https://code.djangoproject.com/>
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/047.c12804c07f5daecd376e3341c45d8b49%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.