Commit graph

87 commits

Author SHA1 Message Date
Tom Parker-Shemilt
a7f94c8354
Redo as a package to fix mypy issues (#215)
* Demo the mypy types issue

* Redo as a package

* Update setup.py

---------

Co-authored-by: Matt Seymour <mattaseymour@gmail.com>
2023-04-13 10:59:57 +01:00
Matt Seymour
14ad3bdc7b
Fixes #209 - Make conn_max_age optional[int] type (#210) 2023-02-14 11:23:46 +00:00
Tom Parker-Shemilt
47ac967679
Throw warning if DATABASE_URL isn't set (#199) 2023-01-30 12:19:02 +00:00
Tom Parker-Shemilt
3ef273f086
Avoid duplicating the uses_netloc and schemes lines (#201) 2022-12-30 09:48:07 +00:00
Tom Parker-Shemilt
414c69c122
100% test coverage (#202) 2022-12-30 09:44:45 +00:00
Tom Parker-Shemilt
698882ea83
Add type hints (#198) 2022-12-21 11:47:41 +00:00
Tom Parker-Shemilt
e47382d4ab
Better error on missing schema (#196) 2022-12-21 08:19:39 +00:00
Matt Seymour
7aa7afd764
Update config test_options adding unitest 2022-12-13 09:14:38 +00:00
Matt Seymour
3c1a39b437
Make test_options paramter type None over Dict
Has the potential in the future to be a bug. {} are mutable
in the scope of kwargs of a function.
2022-12-13 09:01:13 +00:00
Mike
e0cd4c10b1
Support urlencoding/decoding for hostname (#181)
* Use URL Parse library to decode % encodes

Use URL Parse library for what it's good for: to decode % URL encode strings. Don't do it here -- we're already importing a better library for that!

* Test revision with Google Cloud SQL connector

Add synthetic test correlating to Google Cloud SQL connector socket, to make sure Issue https://github.com/jacobian/dj-database-url/issues/132 is solved

Co-authored-by: jared-hardy <jaredhardy@gmail.com>
2022-12-12 20:18:02 +00:00
Chris Hranj
d2e4719a8d
allow TEST settings to be passed into a db config (#116) 2022-12-12 14:56:50 +00:00
Adam Johnson
f19d4970dc
Add ability to set CONN_HEALTH_CHECKS (#185) 2022-12-11 15:38:29 +00:00
Jair Henrique
ccbcc8f93d
Improve (#190)
* convert list to tuple

* use pathlib to read file data
2022-12-11 15:15:20 +00:00
Adam Johnson
9a4a6f3535
Use urlsplit() instead of urlparse() (#184) 2022-10-15 09:24:18 +01:00
Adam Johnson
742d74d091
Support Django 4.1 and remove compatibility code (#183)
* Support Django 4.1 and remove compatibility code

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-09-25 21:49:01 +01:00
Lino Helms
91bb95360e Added support for Timescale and Timescale (GIS)
Timescale is a Postgres based database for time series data and it's
supported via the django-timescaledb package.

[pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci
2022-08-06 08:37:23 +00:00
Matt Seymour
389febf692
Remove scope name shadow (#169) 2022-05-29 10:33:52 +01:00
Matt Seymour
aba6a67d51
Removes py2.7 urlparse import (#168)
* Fixes #167 - Removes py2.7 urlparse import

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-05-29 10:33:30 +01:00
Daniele Bortoluzzi
931a4e4198
Fix #149 Add support to official Microsoft mssql-django adapter (#150)
* Fix #149 Add support to official Microsoft mssql-django adapter

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

Co-authored-by: Matt Seymour <mattaseymour@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-05-28 21:18:21 +01:00
Matt Seymour
98421fdf85
Merge branch 'master' into cockroachdb 2022-05-17 22:13:39 +01:00
Matt Seymour
3e87a497f8 Re-format code to black, isort, flake8 2022-05-04 09:51:32 +01:00
Matt Seymour
973b0bcf35 Add flake8 and black config, re-format
* Adds a basic black and flake8 compatible config
* Reformat the code with black using skip string normalization
2022-01-11 12:56:31 +00:00
Tom Parker-Shemilt
78d225c069 Add support for CockroachDB 2021-06-07 22:50:57 +01:00
Ian Stapleton Cordasco
53c3d79d6e
Merge pull request #101 from mintel/psycopg2
fix #96 deprecated postgres backend strings
2018-05-03 10:15:01 -05:00
Ian Stapleton Cordasco
b6b6a1f25b
Merge pull request #100 from elohmeier/master
use str port for mssql
2018-05-02 09:39:43 -05:00
Jaye Doepke
8b48e4bd40 fix #96 deprecated postgres backend strings
The backend "django.db.backends.postgresql_psycopg2" has been deprecated
in Django 2.0 in favor of "django.db.backends.postgresql".

https://docs.djangoproject.com/en/2.0/releases/2.0/#id1
2018-03-28 17:14:04 -05:00
Kenneth Reitz
de91c7de55 v0.5.0
Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
2018-03-01 13:37:00 -05:00
Enno Lohmeier
e2f43d97a1 use str port for mssql 2018-02-07 21:33:10 +01:00
Enno Lohmeier
ec2428fea0 add mssql support using pyodbc 2017-08-21 11:59:09 +02:00
klashxx
e370c860b8 Django expects Oracle Ports as strings 2017-04-08 12:46:36 +02:00
Alex Tomkins
be4c7f2262 Fix IPv6 address parsing 2017-01-20 15:06:53 +00:00
Kenneth Reitz
99b5b7c697 Merge pull request #73 from kingbuzzman/master
Fixes issue with unix file paths being turned to lower case
2017-01-05 12:45:29 -05:00
Daniel Berry
8a24aab17d added option of postgis backend to also add path parsing. (test added also) 2016-12-14 09:45:31 -06:00
Alexey Evseev
89a55460d6 Support schema definition for redshift
In addition to postgres, redshift database is also support schema.
Respect it by 'currentSchema' param.

Also, we need to not include this param as in in Django's DATABASES
settings. Otherwise, following error is raised:

```
django.db.utils.OperationalError: invalid connection option
"currentSchema"
```
2016-11-28 15:49:26 +03:00
makoto tsuyuki
d1139e3e71 add redshift support 2016-10-25 17:25:01 +09:00
buzzi
8974da0191 Fixes issue with unix file paths being turned to lower case 2016-09-28 17:01:57 +02:00
Kenneth Reitz
afc4d3946c Revert "Merge pull request #69 from johntellsall/issue-68-redis-support"
This reverts commit 183428f624, reversing
changes made to 7d89221325.
2016-06-22 19:22:29 -04:00
John Mitchell
6e4ffaf394 add Redis support 2016-06-17 14:48:51 -07:00
Tobias Wilken
fc63b54ec7 Enable CA providing for MySQL URIs
Using `ssl-ca` from the command line as parameter to provide the CA.
Django MySQL database configuration uses a nested dictionary:

```
{'options': {
     'ssl': {
         'ca': 'PATH TO CA'
     }
 }
```
2016-04-06 18:15:08 +02:00
Kenneth Reitz
4ecda6a1cc Manual merge of #59
/cc eisensheng
2016-02-02 19:07:35 -05:00
Kenneth Reitz
bf55358444 fix for python3 2016-02-02 17:36:35 -05:00
Kenneth Reitz
a14d69adb2 Merge pull request #36 from svdgraaf/master
Added support for python mysql-connector
2016-02-02 17:34:09 -05:00
Kenneth Reitz
b7b75fa0b8 Merge pull request #42 from slafs/oraclesupport
add oracle support
2016-02-02 17:32:49 -05:00
Kenneth Reitz
19dc4ab90a Merge pull request #45 from tomwys/special_characters
Support special characters in user, password and name fields.
2016-02-02 17:32:03 -05:00
Kenneth Reitz
3e057546bb Merge pull request #52 from rcrdclub/master
Proper support for OPTIONS based on DATABASE_URL querystring
2016-02-02 17:09:47 -05:00
Kenneth Reitz
a5a4aaa624 Revert "Merge pull request #59 from eisensheng/master"
This reverts commit e13cc5ff96, reversing
changes made to 063ff555dd.
2016-02-02 17:08:10 -05:00
Kenneth Reitz
e13cc5ff96 Merge pull request #59 from eisensheng/master
Handle search path config in connect url for postgres
2016-02-02 17:05:56 -05:00
Arthur Skowronek
c12fa956fb Handle search path config in connect url for postgres 2015-11-11 18:47:21 +01:00
Sam Sandberg
b83dfb52ce Simplified the querystring parse logic
Apparently I was targetting an older version of python 2.7 where urlparse worked differently
2015-05-15 12:32:15 -04:00
Sam Sandberg
4cc995adc7 Travis didn't like my dict comprehension D: 2015-05-14 18:05:12 -04:00