Skip to content

Commit 877918e

Browse files
authored
Merge pull request #5 from pangpang20/4.2.0
gaussdb-django 4.2.1: License Compliance, Documentation Improvements & Minor Release
2 parents 5a1b431 + 2741011 commit 877918e

File tree

13 files changed

+200
-5
lines changed

13 files changed

+200
-5
lines changed

LICENSE

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,41 @@ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
2626
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
2727
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
2828
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29+
30+
=============================================================================
31+
32+
ADDITIONAL ATTRIBUTION NOTICE:
33+
34+
Parts of this software are based on the Django project, which is licensed
35+
under the three-clause BSD license. The original Django project is
36+
copyright (c) Django Software Foundation and individual contributors.
37+
38+
Original Django License:
39+
40+
Copyright (c) Django Software Foundation and individual contributors.
41+
All rights reserved.
42+
43+
Redistribution and use in source and binary forms, with or without modification,
44+
are permitted provided that the following conditions are met:
45+
46+
1. Redistributions of source code must retain the above copyright notice,
47+
this list of conditions and the following disclaimer.
48+
49+
2. Redistributions in binary form must reproduce the above copyright
50+
notice, this list of conditions and the following disclaimer in the
51+
documentation and/or other materials provided with the distribution.
52+
53+
3. Neither the name of Django nor the names of its contributors may be used
54+
to endorse or promote products derived from this software without
55+
specific prior written permission.
56+
57+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
58+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
59+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
60+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
61+
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
62+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
63+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
64+
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
65+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
66+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

README.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
# GaussDB dialect for Django
2+
![PyPI](https://img.shields.io/pypi/v/gaussdb-django)
3+
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/gaussdb-django)
24

3-
This adds compatibility for [GaussDB](https://github.com/HuaweiCloudDeveloper/gaussdb-django) to Django.
5+
6+
This adds compatibility for [GaussDB](https://www.huaweicloud.com/product/gaussdb.html) to Django.
7+
8+
## License
9+
10+
This project is derived from the Django project and incorporates modifications for GaussDB compatibility. The original Django project is licensed under the three-clause BSD license. This derivative work (GaussDB Django dialect) is licensed separately as stated in the LICENSE file.
11+
12+
Original Django Project License: Copyright (c) Django Software Foundation and individual contributors. All rights reserved.
413

514
## Installation Guide
615

gaussdb_django/__init__.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
"""
2+
GaussDB Django dialect - initialization module.
3+
This module incorporates code from the Django project, which is
4+
licensed under the three-clause BSD license.
5+
Copyright (c) Django Software Foundation and individual contributors.
6+
All rights reserved.
7+
8+
This derivative work is licensed under the same BSD license.
9+
Copyright (c) 2025, HuaweiCloudDeveloper
10+
All rights reserved.
11+
12+
For more information about Django's license, see the LICENSE file in the
13+
root directory of this distribution.
14+
"""
15+
116
from .base import DatabaseWrapper
217

318
__all__ = ["DatabaseWrapper"]

gaussdb_django/base.py

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,20 @@
11
"""
2-
Gaussdb database backend for Django.
2+
GaussDB database backend for Django.
3+
Based on Django's PostgreSQL backend with modifications for GaussDB compatibility.
34
4-
Requires gaussdb >= 1.0.3
5+
This module incorporates code from the Django project, which is
6+
licensed under the three-clause BSD license.
7+
Copyright (c) Django Software Foundation and individual contributors.
8+
All rights reserved.
9+
10+
This derivative work is licensed under the same BSD license.
11+
Copyright (c) 2025, HuaweiCloudDeveloper
12+
All rights reserved.
13+
14+
For more information about Django's license, see the LICENSE file in the
15+
root directory of this distribution.
516
"""
17+
618
import asyncio
719
import threading
820
import warnings

gaussdb_django/client.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
"""
2+
GaussDB client module for Django.
3+
This module incorporates code from the Django project, which is
4+
licensed under the three-clause BSD license.
5+
Copyright (c) Django Software Foundation and individual contributors.
6+
All rights reserved.
7+
8+
This derivative work is licensed under the same BSD license.
9+
Copyright (c) 2025, HuaweiCloudDeveloper
10+
All rights reserved.
11+
12+
For more information about Django's license, see the LICENSE file in the
13+
root directory of this distribution.
14+
"""
15+
116
import signal
217

318
from django.db.backends.base.client import BaseDatabaseClient

gaussdb_django/compiler.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
"""
2+
GaussDB compiler module for Django.
3+
This module incorporates code from the Django project, which is
4+
licensed under the three-clause BSD license.
5+
Copyright (c) Django Software Foundation and individual contributors.
6+
All rights reserved.
7+
8+
This derivative work is licensed under the same BSD license.
9+
Copyright (c) 2025, HuaweiCloudDeveloper
10+
All rights reserved.
11+
12+
For more information about Django's license, see the LICENSE file in the
13+
root directory of this distribution.
14+
"""
15+
116
from django.db.models.sql.compiler import (
217
SQLAggregateCompiler,
318
SQLCompiler,

gaussdb_django/creation.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
"""
2+
GaussDB creation module for Django.
3+
This module incorporates code from the Django project, which is
4+
licensed under the three-clause BSD license.
5+
Copyright (c) Django Software Foundation and individual contributors.
6+
All rights reserved.
7+
8+
This derivative work is licensed under the same BSD license.
9+
Copyright (c) 2025, HuaweiCloudDeveloper
10+
All rights reserved.
11+
12+
For more information about Django's license, see the LICENSE file in the
13+
root directory of this distribution.
14+
"""
15+
116
import sys
217

318
from django.core.exceptions import ImproperlyConfigured

gaussdb_django/features.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
"""
2+
GaussDB features module for Django.
3+
This module incorporates code from the Django project, which is
4+
licensed under the three-clause BSD license.
5+
Copyright (c) Django Software Foundation and individual contributors.
6+
All rights reserved.
7+
8+
This derivative work is licensed under the same BSD license.
9+
Copyright (c) 2025, HuaweiCloudDeveloper
10+
All rights reserved.
11+
12+
For more information about Django's license, see the LICENSE file in the
13+
root directory of this distribution.
14+
"""
15+
116
from django.db import DataError, InterfaceError
217
from django.db.backends.base.features import BaseDatabaseFeatures
318
from django.utils.functional import cached_property

gaussdb_django/gaussdb_any.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
"""
2+
GaussDB compatibility helpers module for Django.
3+
This module incorporates code from the Django project, which is
4+
licensed under the three-clause BSD license.
5+
Copyright (c) Django Software Foundation and individual contributors.
6+
All rights reserved.
7+
8+
This derivative work is licensed under the same BSD license.
9+
Copyright (c) 2025, HuaweiCloudDeveloper
10+
All rights reserved.
11+
12+
For more information about Django's license, see the LICENSE file in the
13+
root directory of this distribution.
14+
"""
15+
116
import ipaddress
217
from functools import lru_cache
318

gaussdb_django/introspection.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
"""
2+
GaussDB introspection module for Django.
3+
This module incorporates code from the Django project, which is
4+
licensed under the three-clause BSD license.
5+
Copyright (c) Django Software Foundation and individual contributors.
6+
All rights reserved.
7+
8+
This derivative work is licensed under the same BSD license.
9+
Copyright (c) 2025, HuaweiCloudDeveloper
10+
All rights reserved.
11+
12+
For more information about Django's license, see the LICENSE file in the
13+
root directory of this distribution.
14+
"""
15+
116
import re
217
from collections import namedtuple
318

0 commit comments

Comments
 (0)