Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf36e7ff

Browse files
committed
Update for PyGreSQL 3.0, from D'Arcy J.M. Cain
1 parent0bd8444 commitf36e7ff

File tree

17 files changed

+1981
-1373
lines changed

17 files changed

+1981
-1373
lines changed

‎doc/TODO

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ MISC
250250
* allow configuration of maximum number of open files
251251
* Remove pg_listener index
252252
* Remove ANALYZE from VACUUM so it can be run separately without locks
253-
* Gather more accurate statistics using indexes
253+
* Gather more accuratedisbursionstatistics using indexes
254254
* Improve statistics storage in pg_class [performance]
255255
* Improve VACUUM speed with indexes [vacuum]
256256
* -BSD/OS does not support locale because there is no LC_MESSAGES (Bruce)

‎src/interfaces/python/Announce

Lines changed: 43 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
11

2-
Announce: Release of PyGreSQL version2.4
2+
Announce: Release of PyGreSQL version3.0
33
===============================================
44

5-
PyGreSQLv2.4 has been released.
5+
PyGreSQLv3.0 has been released.
66
It is available at: ftp://ftp.druid.net/pub/distrib/PyGreSQL.tgz. If
7-
you are on NetBSD, look in the packages directory under databases. If
8-
it isn't there yet, it should be there shortly. You can also pick up the
9-
package files from ftp://ftp.druid.net/pub/distrib/pygresql.pkg.tgz.
10-
There is also a package in the FreeBSD ports collection but as I write
11-
this it is at version 2.1. I will try to get that updated as well.
7+
you are running NetBSD, look in the packages directory under databases.
8+
There is also a package in the FreeBSD ports collection.
129

1310
PostgreSQL is a database system derived from Postgres4.2. It conforms
1411
to (most of) ANSI SQL and offers many interesting capabilities (C
@@ -28,30 +25,61 @@ PyGreSQL is a python module that interfaces to a PostgreSQL database. It
2825
embeds the PostgreSQL query library to allow easy use of the powerful
2926
PostgreSQL features from a Python script.
3027

31-
I wanted to haveDB-SIG API support in the next release but there are
32-
enough fixes and improvements to make one more release before starting
33-
on that.The next version will be 3.0 and have the DB-SIG API support.
34-
Note that I said this for 2.4 but some required changes from others have
35-
been slow in coming (I'm not complaining, people do have lives) and
36-
there were enough fixes that I didn't want to keep them from a release.
28+
This release of PyGreSQL is the firstDB-SIG API. That's why we have
29+
a bump in the major number. There is also a potential problem in
30+
backwards compatibility.Previously when there was a NULL in a returned
31+
field it was returned as a blank. Now it is more properly returned as
32+
a Python None. Any scripts that expect NULLs to be blanks will have
33+
problems with this.
3734

38-
PyGreSQL 2.3 was developed and tested on a NetBSD 1.3_BETA system. It
35+
Due to the fact that the DB-API is brand new, it is expected that there
36+
will be a 3.1 release shortly with corrections once many people have
37+
had a chance to test it.
38+
39+
See the other changes below or in the Changelog file.
40+
41+
PyGreSQL 2.0 was developed and tested on a NetBSD 1.3_BETA system. It
3942
is based on the PyGres95 code written by Pascal Andre,
4043
andre@chimay.via.ecp.fr. I changed the version to 2.0 and updated the
4144
code for Python 1.5 and PostgreSQL 6.2.1. While I was at it I upgraded
4245
the code to use full ANSI style prototypes and changed the order of
4346
arguments to connect. Later versions are fixes and enhancements to that.
47+
The latest version of PyGreSQL works with Python 1.5.2 and PostgreSQL 6.5.
48+
49+
Important changes from PyGreSQL 2.4 to PyGreSQL 3.0:
50+
- Remove strlen() call from pglarge_write() and get size from object.
51+
(Richard@Bouska.cz)
52+
- Add a little more error checking to the quote function in the wrapper
53+
- Add extra checking in _quote function
54+
- Wrap query in pg.py for debugging
55+
- Add DB-API 2.0 support to pgmodule.c (andre@via.ecp.fr)
56+
- Add DB-API 2.0 wrapper pgdb.py (andre@via.ecp.fr)
57+
- Correct keyword clash (temp) in tutorial
58+
- Clean up layout of tutorial
59+
- Return NULL values as None (rlawrence@lastfoot.com) (WARNING: This
60+
will cause backwards compatibility issues.)
61+
- Change None to NULL in insert and update
62+
- Change hash-bang lines to use /usr/bin/env
63+
- Clearing date should be blank (NULL) not TODAY
64+
- Quote backslashes in strings in _quote (brian@CSUA.Berkeley.EDU)
65+
- Expanded and clarified build instructions (tbryan@starship.python.net)
66+
- Make code thread safe (Jerome.Alet@unice.fr)
67+
- Add README.distutils (mwa@gate.net & jeremy@cnri.reston.va.us)
68+
- Many fixes and increased DB-API compliance by chifungfan@yahoo.com,
69+
tony@printra.net, jeremy@alum.mit.edu and others to get the final
70+
version ready to release.
4471

4572
Important changes from PyGreSQL 2.3 to PyGreSQL 2.4:
4673
- Insert returns None if the user doesn't have select permissions
4774
on the table. It can (and does) happen that one has insert but
4875
not select permissions on a table.
4976
- Added ntuples() method to query object (brit@druid.net)
5077
- Corrected a bug related to getresult() and the money type
51-
- Corrected abut related to negative money amounts
78+
- Corrected abug related to negative money amounts
5279
- Allow update based on primary key if munged oid not available and
5380
table has a primary key
5481
- Add many __doc__ strings. (andre@via.ecp.fr)
82+
- Get method works with views if key specified
5583

5684
Important changes from PyGreSQL 2.2 to PyGreSQL 2.3:
5785
- connect.host returns "localhost" when connected to Unix socket

‎src/interfaces/python/ChangeLog

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,39 @@ This software is copyright (c) 1995, Pascal Andre (andre@via.ecp.fr)
55
Further copyright 1997, 1998 and 1999 by D'Arcy J.M. Cain (darcy@druid.net)
66
See file README for copyright information.
77

8+
Version 3.0
9+
- Remove strlen() call from pglarge_write() and get size from object.
10+
(Richard@Bouska.cz)
11+
- Add a little more error checking to the quote function in the wrapper
12+
- Add extra checking in _quote function
13+
- Wrap query in pg.py for debugging
14+
- Add DB-API 2.0 support to pgmodule.c (andre@via.ecp.fr)
15+
- Add DB-API 2.0 wrapper pgdb.py (andre@via.ecp.fr)
16+
- Correct keyword clash (temp) in tutorial
17+
- Clean up layout of tutorial
18+
- Return NULL values as None (rlawrence@lastfoot.com)
19+
- Change None to NULL in insert and update
20+
- Change hash-bang lines to use /usr/bin/env
21+
- Clearing date should be blank (NULL) not TODAY
22+
- Quote backslashes in strings in _quote (brian@CSUA.Berkeley.EDU)
23+
- Expanded and clarified build instructions (tbryan@starship.python.net)
24+
- Make code thread safe (Jerome.Alet@unice.fr)
25+
- Add README.distutils (mwa@gate.net & jeremy@cnri.reston.va.us)
26+
- Many fixes and increased DB-API compliance by chifungfan@yahoo.com,
27+
tony@printra.net, jeremy@alum.mit.edu and others to get the final
28+
version ready to release.
29+
830
Version 2.4
931
- Insert returns None if the user doesn't have select permissions
1032
on the table. It can (and does) happen that one has insert but
1133
not select permissions on a table.
1234
- Added ntuples() method to query object (brit@druid.net)
1335
- Corrected a bug related to getresult() and the money type
14-
- Corrected abut related to negative money amounts
36+
- Corrected abug related to negative money amounts
1537
- Allow update based on primary key if munged oid not available and
1638
table has a primary key
1739
- Add many __doc__ strings. (andre@via.ecp.fr)
40+
- Get method works with views if key specified
1841

1942
Version 2.3
2043
- connect.host returns "localhost" when connected to Unix socket

‎src/interfaces/python/PyGreSQL.spec

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
%define version 3.0
2+
%define release pre20000310
3+
%define name PyGreSQL
4+
%define pythonversion 1.5
5+
Source: %{name}-%{version}-%{release}.tgz
6+
Summary: A Python interface for PostgreSQL database.
7+
Name: %{name}
8+
Version: %{version}
9+
Release: %{release}
10+
#Patch:
11+
Group: Applications/Databases
12+
BuildRoot: /tmp/rpmbuild_%{name}
13+
Copyright: GPL-like
14+
Requires: python>= %{pythonversion}, postgresql
15+
Packager: Hartmut Goebel<hartmut@goebel.noris.de>
16+
Vendor: D'Arcy J.M. Cain<darcy@druid.net>
17+
URL: http://www.druid.net/pygresql/
18+
19+
%changelog
20+
#* Tue Oct 06 1998 Fabio Coatti <cova@felix.unife.it>
21+
#- fixed installation directory files list
22+
23+
%description
24+
PyGreSQL is a python module that interfaces to a PostgreSQL database. It
25+
embeds the PostgreSQL query library to allow easy use of the powerful
26+
PostgreSQL features from a Python script.
27+
28+
Version 3.0 includes DB-API 2.0 support.
29+
30+
%prep
31+
rm -rf $RPM_BUILD_ROOT
32+
33+
%setup -n %{name}-%{version}-%{release}
34+
#%patch
35+
36+
%build
37+
mkdir -p $RPM_BUILD_ROOT/usr/lib/python%{pythonversion}/lib-dynload
38+
cc -fpic -shared -o $RPM_BUILD_ROOT/usr/lib/python%{pythonversion}/lib-dynload/_pg.so -I/usr/include/pgsql/ -I/usr/include/python1.5 pgmodule.c -lpq
39+
## import fails, since _pg is not yet installed
40+
python -c 'import pg' || true
41+
python -c 'import pgdb' || true
42+
43+
%install
44+
cp *.py *.pyc $RPM_BUILD_ROOT/usr/lib/python%{pythonversion}/
45+
46+
cd $RPM_BUILD_ROOT
47+
find . -type f | sed 's,^\.,\%attr(-\,root\,root) ,' > $RPM_BUILD_DIR/file.list.%{name}
48+
find . -type l | sed 's,^\.,\%attr(-\,root\,root) ,' >> $RPM_BUILD_DIR/file.list.%{name}
49+
50+
%files -f ../file.list.%{name}
51+
%doc %attr(-,root,root) Announce ChangeLog README tutorial
52+
53+
54+
%clean
55+
rm -rf $RPM_BUILD_ROOT
56+
cd $RPM_BUILD_DIR
57+
rm -rf %{name}-%{version}-%{release} file.list.%{name}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp