Skip to content

Commit 79e4fb2

Browse files
author
aviau
committed
Allow mixed case in DSN (closes influxdata#176)
1 parent 6ef9938 commit 79e4fb2

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

influxdb/client.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,6 @@ def from_DSN(dsn, **kwargs):
144144
additional udp_port parameter (cf. examples).
145145
:raise ValueError: if the provided DSN has any unexpected value.
146146
"""
147-
dsn = dsn.lower()
148147

149148
init_args = {}
150149
conn_params = urlparse(dsn)
@@ -559,7 +558,6 @@ def from_DSN(dsn, client_base_class=InfluxDBClient,
559558
:param client_base_class: In order to support different clients,
560559
default to InfluxDBClient
561560
"""
562-
dsn = dsn.lower()
563561
conn_params = urlparse(dsn)
564562
netlocs = conn_params.netloc.split(',')
565563
cluster_client = InfluxDBClusterClient(

tests/influxdb/client_test.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -727,3 +727,8 @@ def test_dsn_single_client(self):
727727
'https+influxdb://usr:pwd@host:8086/db',
728728
**{'ssl': False})
729729
self.assertEqual('http://host:8086', cli.clients[0]._baseurl)
730+
731+
def test_dsn_password_caps(self):
732+
cli = InfluxDBClusterClient.from_DSN(
733+
'https+influxdb://usr:pWd@host:8086/db')
734+
self.assertEqual('pWd', cli.clients[0]._password)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy