...
 
Commits (6)
......@@ -2,10 +2,11 @@ sqlobject (3.7.0+dfsg-2) unstable; urgency=low
* Change section for sqlobject-admin script to utils (lintian warning).
* Add patch to work around overly tight formencode requirement in the
setuptools files.
setuptools files. (Closes: #918683)
* Update Standards-Version to 4.3.0 (no changes needed).
* Add more autopkgtests.
-- Neil Muller <drnlmuller+debian@gmail.com> Sat, 05 Jan 2019 18:09:48 +0200
-- Neil Muller <drnlmuller+debian@gmail.com> Mon, 07 Jan 2019 18:06:32 +0200
sqlobject (3.7.0+dfsg-1) unstable; urgency=low
......
......@@ -22,7 +22,6 @@ Standards-Version: 4.3.0
Vcs-Git: https://salsa.debian.org/python-team/modules/sqlobject.git
Vcs-Browser: https://salsa.debian.org/python-team/modules/sqlobject
Homepage: http://www.sqlobject.org
Testsuite: autopkgtest-pkg-python
Package: python-sqlobject
Architecture: all
......
......@@ -7,23 +7,21 @@ to avoid do not apply to the debian package, and keeping this
requirement in place can cause problems with packages using
the debian versions, so we change the requirement to 1.3.0 or later.
---
SQLObject.egg-info/requires.txt | 4 ++--
setup.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/SQLObject.egg-info/requires.txt b/SQLObject.egg-info/requires.txt
index 601beb5..a9708e5 100644
--- a/SQLObject.egg-info/requires.txt
+++ b/SQLObject.egg-info/requires.txt
@@ -1,10 +1,10 @@
PyDispatcher>=2.0.4
[:python_version == "2.7"]
-FormEncode!=1.3.0,>=1.1.1
+FormEncode>=1.3.0
[:python_version >= "3.4"]
-FormEncode>=1.3.1
+FormEncode>=1.3.0
[adodbapi]
adodbapi
diff --git a/setup.py b/setup.py
index b0fb383..eac9aee 100755
--- a/setup.py
+++ b/setup.py
@@ -87,8 +87,8 @@ and `GitHub <https://github.com/sqlobject>`_.
python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*',
requires=['FormEncode', 'PyDispatcher'],
install_requires=[
- "FormEncode>=1.1.1,!=1.3.0; python_version=='2.7'",
- "FormEncode>=1.3.1; python_version>='3.4'",
+ "FormEncode>=1.3.0; python_version=='2.7'",
+ "FormEncode>=1.3.0; python_version>='3.4'",
"PyDispatcher>=2.0.4",
],
extras_require={
Tests: testdb
Depends: python-sqlobject, python3-sqlobject
Tests: testdb-setuptools
Depends: python-sqlobject, python-setuptools, python3-sqlobject, python3-setuptools
#!/bin/sh
# Simple test that we can use a memory database
set -e
WORKDIR=$(mktemp -d)
trap "rm -rf $WORKDIR" 0 INT QUIT ABRT PIPE TERM
cd $WORKDIR
cat << EOF > testdb.py
import sys
from sqlobject import SQLObject, connectionForURI, IntCol, sqlhub, SQLObjectNotFound
class TestCol(SQLObject):
number = IntCol()
def run():
sqlhub.processConnection = connectionForURI('sqlite:///:memory:')
TestCol.createTable()
entry1 = TestCol(number=1)
entry2 = TestCol(number=2)
entry3 = TestCol(number=3)
# Check we have the right number of entries
if TestCol.select().count() != 3:
sys.exit(1)
# check we can select by number
entry = TestCol.selectBy(number=1).getOne()
if entry != entry1:
return False
# Check select fails correctly
try:
TestCol.selectBy(number=4).getOne()
except SQLObjectNotFound:
return True
return False
if __name__ == "__main__":
if not run():
sys.exit(1)
EOF
python testdb.py
python3 testdb.py
#!/bin/sh
# Test that setuptools requirements are correct
# See #918683 for context of why we want this test
set -e
WORKDIR=$(mktemp -d)
trap "rm -rf $WORKDIR" 0 INT QUIT ABRT PIPE TERM
cd $WORKDIR
mkdir mypkg
mkdir mypkg/testlib
mkdir rundir
mkdir rundir3
cd mypkg
touch __init__.py
cat << EOF > setup.py
from setuptools import setup, find_packages
setup(name="testlib",
version="0.0.1",
description="Test sqlobject with setuptools requires",
install_requires="SQLObject",
packages=find_packages(),
entry_points={
'console_scripts': ['testdb=testlib.testdb:main'],
},
)
EOF
cd testlib
cat << EOF > base.py
from sqlobject import SQLObject, IntCol
class TestCol(SQLObject):
number = IntCol()
EOF
cat << EOF > testdb.py
import sys
from sqlobject import connectionForURI, sqlhub, SQLObjectNotFound
from testlib.base import TestCol
def run():
sqlhub.processConnection = connectionForURI('sqlite:///:memory:')
TestCol.createTable()
entry1 = TestCol(number=1)
# Check we have the right number of entries
if TestCol.select().count() != 1:
return False
# check we can select by number
entry = TestCol.selectBy(number=1).getOne()
if entry != entry1:
return False
return True
def main():
if not run():
sys.exit(1)
EOF
touch __init__.py
cd $WORKDIR/mypkg
export PYTHONPATH=$WORKDIR/rundir
python ./setup.py develop -d $WORKDIR/rundir
cd $WORKDIR/rundir
./testdb
# Repeat with python 3
cd $WORKDIR/mypkg
export PYTHONPATH=$WORKDIR/rundir3
python3 ./setup.py develop -d $WORKDIR/rundir3
cd $WORKDIR/rundir3
./testdb