4 psycopg2 is free software: you can redistribute it and/or modify it
5 under the terms of the GNU Lesser General Public License as published
6 by the Free Software Foundation, either version 3 of the License, or
7 (at your option) any later version.
9 psycopg2 is distributed in the hope that it will be useful, but WITHOUT
10 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
12 License for more details.
14 In addition, as a special exception, the copyright holders give
15 permission to link this program with the OpenSSL library (or with
16 modified versions of OpenSSL that use the same license as OpenSSL),
17 and distribute linked combinations including the two.
19 You must obey the GNU Lesser General Public License in all respects for
20 all of the code used other than OpenSSL. If you modify file(s) with this
21 exception, you may extend this exception to your version of the file(s),
22 but you are not obligated to do so. If you do not wish to do so, delete
23 this exception statement from your version. If you delete this exception
24 statement from all source files in the program, then also delete it here.
26 You should have received a copy of the GNU Lesser General Public License
27 along with psycopg2 (see the doc/ directory.)
28 If not, see <https://www.gnu.org/licenses/>.
34 The following BSD-like license applies (at your option) to the files following
35 the pattern ``psycopg/adapter*.{h,c}`` and ``psycopg/microprotocol*.{h,c}``:
37 Permission is granted to anyone to use this software for any purpose,
38 including commercial applications, and to alter it and redistribute it
39 freely, subject to the following restrictions:
41 1. The origin of this software must not be misrepresented; you must not
42 claim that you wrote the original software. If you use this
43 software in a product, an acknowledgment in the product documentation
44 would be appreciated but is not required.
46 2. Altered source versions must be plainly marked as such, and must not
47 be misrepresented as being the original software.
49 3. This notice may not be removed or altered from any source distribution.
51 --- doc/COPYING.LESSER ----------------------------------------------------
53 GNU LESSER GENERAL PUBLIC LICENSE
54 Version 3, 29 June 2007
56 Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
57 Everyone is permitted to copy and distribute verbatim copies
58 of this license document, but changing it is not allowed.
61 This version of the GNU Lesser General Public License incorporates
62 the terms and conditions of version 3 of the GNU General Public
63 License, supplemented by the additional permissions listed below.
65 0. Additional Definitions.
67 As used herein, "this License" refers to version 3 of the GNU Lesser
68 General Public License, and the "GNU GPL" refers to version 3 of the GNU
69 General Public License.
71 "The Library" refers to a covered work governed by this License,
72 other than an Application or a Combined Work as defined below.
74 An "Application" is any work that makes use of an interface provided
75 by the Library, but which is not otherwise based on the Library.
76 Defining a subclass of a class defined by the Library is deemed a mode
77 of using an interface provided by the Library.
79 A "Combined Work" is a work produced by combining or linking an
80 Application with the Library. The particular version of the Library
81 with which the Combined Work was made is also called the "Linked
84 The "Minimal Corresponding Source" for a Combined Work means the
85 Corresponding Source for the Combined Work, excluding any source code
86 for portions of the Combined Work that, considered in isolation, are
87 based on the Application, and not on the Linked Version.
89 The "Corresponding Application Code" for a Combined Work means the
90 object code and/or source code for the Application, including any data
91 and utility programs needed for reproducing the Combined Work from the
92 Application, but excluding the System Libraries of the Combined Work.
94 1. Exception to Section 3 of the GNU GPL.
96 You may convey a covered work under sections 3 and 4 of this License
97 without being bound by section 3 of the GNU GPL.
99 2. Conveying Modified Versions.
101 If you modify a copy of the Library, and, in your modifications, a
102 facility refers to a function or data to be supplied by an Application
103 that uses the facility (other than as an argument passed when the
104 facility is invoked), then you may convey a copy of the modified
107 a) under this License, provided that you make a good faith effort to
108 ensure that, in the event an Application does not supply the
109 function or data, the facility still operates, and performs
110 whatever part of its purpose remains meaningful, or
112 b) under the GNU GPL, with none of the additional permissions of
113 this License applicable to that copy.
115 3. Object Code Incorporating Material from Library Header Files.
117 The object code form of an Application may incorporate material from
118 a header file that is part of the Library. You may convey such object
119 code under terms of your choice, provided that, if the incorporated
120 material is not limited to numerical parameters, data structure
121 layouts and accessors, or small macros, inline functions and templates
122 (ten or fewer lines in length), you do both of the following:
124 a) Give prominent notice with each copy of the object code that the
125 Library is used in it and that the Library and its use are
126 covered by this License.
128 b) Accompany the object code with a copy of the GNU GPL and this license
133 You may convey a Combined Work under terms of your choice that,
134 taken together, effectively do not restrict modification of the
135 portions of the Library contained in the Combined Work and reverse
136 engineering for debugging such modifications, if you also do each of
139 a) Give prominent notice with each copy of the Combined Work that
140 the Library is used in it and that the Library and its use are
141 covered by this License.
143 b) Accompany the Combined Work with a copy of the GNU GPL and this license
146 c) For a Combined Work that displays copyright notices during
147 execution, include the copyright notice for the Library among
148 these notices, as well as a reference directing the user to the
149 copies of the GNU GPL and this license document.
151 d) Do one of the following:
153 0) Convey the Minimal Corresponding Source under the terms of this
154 License, and the Corresponding Application Code in a form
155 suitable for, and under terms that permit, the user to
156 recombine or relink the Application with a modified version of
157 the Linked Version to produce a modified Combined Work, in the
158 manner specified by section 6 of the GNU GPL for conveying
159 Corresponding Source.
161 1) Use a suitable shared library mechanism for linking with the
162 Library. A suitable mechanism is one that (a) uses at run time
163 a copy of the Library already present on the user's computer
164 system, and (b) will operate properly with a modified version
165 of the Library that is interface-compatible with the Linked
168 e) Provide Installation Information, but only if you would otherwise
169 be required to provide such information under section 6 of the
170 GNU GPL, and only to the extent that such information is
171 necessary to install and execute a modified version of the
172 Combined Work produced by recombining or relinking the
173 Application with a modified version of the Linked Version. (If
174 you use option 4d0, the Installation Information must accompany
175 the Minimal Corresponding Source and Corresponding Application
176 Code. If you use option 4d1, you must provide the Installation
177 Information in the manner specified by section 6 of the GNU GPL
178 for conveying Corresponding Source.)
180 5. Combined Libraries.
182 You may place library facilities that are a work based on the
183 Library side by side in a single library together with other library
184 facilities that are not Applications and are not covered by this
185 License, and convey such a combined library under terms of your
186 choice, if you do both of the following:
188 a) Accompany the combined library with a copy of the same work based
189 on the Library, uncombined with any other library facilities,
190 conveyed under the terms of this License.
192 b) Give prominent notice with the combined library that part of it
193 is a work based on the Library, and explaining where to find the
194 accompanying uncombined form of the same work.
196 6. Revised Versions of the GNU Lesser General Public License.
198 The Free Software Foundation may publish revised and/or new versions
199 of the GNU Lesser General Public License from time to time. Such new
200 versions will be similar in spirit to the present version, but may
201 differ in detail to address new problems or concerns.
203 Each version is given a distinguishing version number. If the
204 Library as you received it specifies that a certain numbered version
205 of the GNU Lesser General Public License "or any later version"
206 applies to it, you have the option of following the terms and
207 conditions either of that published version or of any later version
208 published by the Free Software Foundation. If the Library as you
209 received it does not specify a version number of the GNU Lesser
210 General Public License, you may choose any version of the GNU Lesser
211 General Public License ever published by the Free Software Foundation.
213 If the Library as you received it specifies that a proxy can decide
214 whether future versions of the GNU Lesser General Public License shall
215 apply, that proxy's public statement of acceptance of any version is
216 permanent authorization for you to choose that version for the