This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "SQLObject development repository".
The branch, master has been updated
via 8cf109f4bc7084e6a177a4c4893c3cc90c4c8d95 (commit)
via d7ce8c4ae274bfc08e711f8a6f840252758f930b (commit)
via 362e10795e5a589be9342498f4bd79820a9de836 (commit)
via 463502a84c3540addbd47c4f0110430f0c42ea20 (commit)
via c021e99dfde5794d3cee318bb9b93e0a05dfbff6 (commit)
from 430bb09733f96084463e24ec132200df0bfebee7 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://sourceforge.net/p/sqlobject/sqlobject/ci/8cf109f4bc7084e6a177a4c4893c3cc90c4c8d95
commit 8cf109f4bc7084e6a177a4c4893c3cc90c4c8d95
Author: Oleg Broytman <ph...@ph...>
Date: Mon Feb 11 23:01:12 2019 +0300
Feat(compat): Use imp for Python 2, importlib for Python 3
The code in `sqlobject/compat.py` is still outdated
and should be updated for Python 3.5.
diff --git a/sqlobject/compat.py b/sqlobject/compat.py
index 18aba9d..a5a379c 100644
--- a/sqlobject/compat.py
+++ b/sqlobject/compat.py
@@ -1,3 +1,4 @@
+import os
import sys
import types
@@ -29,3 +30,21 @@ else:
unicode_type = str
class_types = (type,)
buffer_type = memoryview
+
+if PY2:
+ import imp
+
+ def load_module_from_file(base_name, module_name, filename):
+ fp, pathname, stuff = imp.find_module(
+ base_name, [os.path.dirname(filename)])
+ try:
+ module = imp.load_module(module_name, fp, pathname, stuff)
+ finally:
+ fp.close()
+ return module
+else:
+ import importlib.util
+
+ def load_module_from_file(base_name, module_name, filename):
+ specs = importlib.util.spec_from_file_location(module_name, filename)
+ return specs.loader.load_module()
diff --git a/sqlobject/tests/test_compat.py b/sqlobject/tests/test_compat.py
new file mode 100644
index 0000000..3b5fc65
--- /dev/null
+++ b/sqlobject/tests/test_compat.py
@@ -0,0 +1,10 @@
+from sqlobject.compat import load_module_from_file
+
+
+def test_load_module_from_path():
+ module = load_module_from_file(
+ 'test_compat', 'sqlobject.tests.test_compat', __file__
+ )
+ assert module.__file__ == __file__
+ assert module.__name__ == 'sqlobject.tests.test_compat'
+ assert module.__package__ == 'sqlobject.tests'
diff --git a/sqlobject/util/moduleloader.py b/sqlobject/util/moduleloader.py
index bbb8d0c..ee7fb2e 100644
--- a/sqlobject/util/moduleloader.py
+++ b/sqlobject/util/moduleloader.py
@@ -1,6 +1,6 @@
-import imp
import os
import sys
+from sqlobject.compat import load_module_from_file
def load_module(module_name):
@@ -24,7 +24,6 @@ def load_module_from_name(filename, module_name):
% (os.path.dirname(filename), e))
f.write('#\n')
f.close()
- fp = None
if module_name in sys.modules:
return sys.modules[module_name]
if '.' in module_name:
@@ -33,12 +32,4 @@ def load_module_from_name(filename, module_name):
load_module_from_name(os.path.dirname(filename), parent_name)
else:
base_name = module_name
- fp = None
- try:
- fp, pathname, stuff = imp.find_module(
- base_name, [os.path.dirname(filename)])
- module = imp.load_module(module_name, fp, pathname, stuff)
- finally:
- if fp is not None:
- fp.close()
- return module
+ return load_module_from_file(base_name, module_name, filename)
http://sourceforge.net/p/sqlobject/sqlobject/ci/d7ce8c4ae274bfc08e711f8a6f840252758f930b
commit d7ce8c4ae274bfc08e711f8a6f840252758f930b
Author: Oleg Broytman <ph...@ph...>
Date: Thu Feb 7 17:24:16 2019 +0300
CI(travis): remove deprecated `sudo` keyword
diff --git a/.travis.yml b/.travis.yml
index 26512db..4f375a4 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -4,9 +4,6 @@ branches:
only:
- master
-# Prefer docker container with setuid/sudo
-sudo: required
-
language: python
python:
http://sourceforge.net/p/sqlobject/sqlobject/ci/362e10795e5a589be9342498f4bd79820a9de836
commit 362e10795e5a589be9342498f4bd79820a9de836
Author: Oleg Broytman <ph...@ph...>
Date: Thu Feb 7 16:44:52 2019 +0300
Build(setup.py): Use `importlib` instead of deprecated `imp` for Python 3.4+
diff --git a/setup.py b/setup.py
index 8802c9f..8ef5c81 100755
--- a/setup.py
+++ b/setup.py
@@ -1,8 +1,24 @@
#!/usr/bin/env python
-from imp import load_source
from os.path import abspath, dirname, join
from setuptools import setup
+import sys
+
+if sys.version_info[:2] == (2, 7):
+ from imp import load_source
+
+elif sys.version_info >= (3, 4):
+ from importlib.machinery import SourceFileLoader
+ import types
+
+ def load_source(fullname, path):
+ loader = SourceFileLoader(fullname, path)
+ loaded = types.ModuleType(loader.name)
+ loader.exec_module(loaded)
+ return loaded
+
+else:
+ raise ImportError("SQLObject requires Python 2.7 or 3.4+")
versionpath = join(abspath(dirname(__file__)), "sqlobject", "__version__.py")
sqlobject_version = load_source("sqlobject_version", versionpath)
http://sourceforge.net/p/sqlobject/sqlobject/ci/463502a84c3540addbd47c4f0110430f0c42ea20
commit 463502a84c3540addbd47c4f0110430f0c42ea20
Author: Oleg Broytman <ph...@ph...>
Date: Thu Feb 7 09:06:12 2019 +0300
Build(devscripts): Run the scripts directly from devscripts/ subdir
[skip ci]
diff --git a/devscripts/BRANCH-CHECKLIST b/devscripts/BRANCH-CHECKLIST
index 0357e27..da9c16a 100644
--- a/devscripts/BRANCH-CHECKLIST
+++ b/devscripts/BRANCH-CHECKLIST
@@ -1,8 +1,8 @@
0. Run full test suite in master. Continue if all tests passed.
-1. If the branching point is master run ../branch $NEW_BRANCH. If it's
-not master run ../branch $NEW_BRANCH $TREEISH, where $TREEISH is
-a branch, a commit id or a tag.
+1. If the branching point is master run devscripts/branch $NEW_BRANCH. If
+ it's not master run devscripts/branch $NEW_BRANCH $TREEISH, where
+ $TREEISH is a branch, a commit id or a tag.
1a. The script creates a new branch and calls editor; edit README.rst,
__version__.py and News.rst in the branch - set version. In
@@ -20,11 +20,11 @@ a branch, a commit id or a tag.
2. To deprecate a version of Python edit files ANNOUNCE.rst, README.rst,
devscripts/release, devscripts/setup, docs/News.rst, docs/SQLObject.rst,
- docs/TODO.rst, requirements.txt, setup.py, sqlobject/main.py,
- tox.ini in master. Edit metadata at SourceForge.
+ docs/TODO.rst, requirements.txt, setup.py, sqlobject/main.py, tox.ini in
+ master. Edit metadata at SourceForge.
3. Do a null-merge from the new branch to the higher branch or the
master.
-4. Run ../push-all to push all branches and tags to the public
+4. Run devscripts/push-all to push all branches and tags to the public
repositories.
diff --git a/devscripts/RELEASE-CHECKLIST b/devscripts/RELEASE-CHECKLIST
index e6949c4..e85de5e 100644
--- a/devscripts/RELEASE-CHECKLIST
+++ b/devscripts/RELEASE-CHECKLIST
@@ -4,8 +4,8 @@
1. Check out the release branch. If it is a stable release - edit
docs/News.rst to set release date. Commit.
-2. If release branch is not master - run ../prerelease $NEW_TAG; if it's
- master - run ../prerelease $NEW_TAG master.
+2. If release branch is not master - run devscripts/prerelease $NEW_TAG; if
+ it's master - run devscripts/prerelease $NEW_TAG master.
The script checks out the release branch and calls editor; update
version, the list of contributors, the list of changes and download
@@ -24,28 +24,28 @@
3. If it's not master - null-merge to the next higher branch.
-4. If release branch is not master - run ../prerelease-tag $NEW_TAG; if
- it's master - run ../prerelease-tag $NEW_TAG master. This checks out
- the release branch and creates the new tag at the head of the release
- branch.
+4. If release branch is not master - run devscripts/prerelease-tag
+ $NEW_TAG; if it's master - run devscripts/prerelease-tag $NEW_TAG
+ master. This checks out the release branch and creates the new tag at
+ the head of the release branch.
-5. Run ../release. This generates and uploads new archives to PyPI and
- if it is a stable release - uploads archives and release announcement
- (ANNOUNCE.rst) to SourceForge.
+5. Run devscripts/release. This generates and uploads new archives to PyPI
+ and if it is a stable release - uploads archives and release
+ announcement (ANNOUNCE.rst) to SourceForge.
6. Move old releases at SourceForge to subdirectory OldFiles.
-7. Run ../push-all in the development repository to push all branches
- and tags to the public repositories.
+7. Run devscripts/push-all in the development repository to push all
+ branches and tags to the public repositories.
-8. Run ../postrelease. The script restores ANNOUNCE.rst and setup.cfg
- from the previous commit (HEAD~). It calls editor; update next version,
- remove the list of contributors and the list of changes, edit download
- URL in ANNOUNCE.rst. Edit README.rst and docs/News.rst - add new
- version.
+8. Run devscripts/postrelease. The script restores ANNOUNCE.rst and
+ setup.cfg from the previous commit (HEAD~). It calls editor; update next
+ version, remove the list of contributors and the list of changes, edit
+ download URL in ANNOUNCE.rst. Edit README.rst and docs/News.rst - add
+ new version.
-9. Generate new docs using ./build-all-docs. Upload docs using
- ./publish-docs.
+9. Generate new docs using devscripts/build-all-docs. Upload docs using
+ devscripts/publish-docs.
10. Send announcement to the SQLObject mailing list. For a stable
release send announcements to python, python-announce and python-db
diff --git a/devscripts/build-all-docs b/devscripts/build-all-docs
index 3f90528..746018a 100755
--- a/devscripts/build-all-docs
+++ b/devscripts/build-all-docs
@@ -2,15 +2,14 @@
build_docs() {
git checkout "$1" &&
- ../build-docs &&
+ devscripts/build-docs &&
rsync -ahP --del --exclude=/robots.txt docs/html/ ../SQLObject-docs/"$2"/
}
-PROG_DIR="`dirname \"$0\"`" &&
-cd "$PROG_DIR" &&
+cd "`dirname \"$0\"`" &&
PROG_DIR="`pwd`" &&
-cd "$PROG_DIR"/SQLObject &&
+cd .. &&
build_docs 3.7.1 &&
build_docs master devel &&
rm -rf docs/html &&
diff --git a/devscripts/build-docs b/devscripts/build-docs
index 8f9895b..dcd94d8 100755
--- a/devscripts/build-docs
+++ b/devscripts/build-docs
@@ -1,5 +1,4 @@
#! /bin/sh
-cd "`dirname \"$0\"`"/SQLObject &&
-cd docs &&
+cd "`dirname \"$0\"`"/../docs &&
exec ./rebuild
diff --git a/devscripts/cleanup b/devscripts/cleanup
index 19fdb46..77e348b 100755
--- a/devscripts/cleanup
+++ b/devscripts/cleanup
@@ -1,5 +1,5 @@
#! /bin/sh
-cd "`dirname $0`" &&
+cd "`dirname $0`"/../.. &&
find . \( -name \*.orig -o -name \*.rej -o -name \*.tmp -o -name \*.log \) -type f -delete &&
exec rm -f /tmp/test-sqlite.sqdb*
diff --git a/devscripts/flake8/run b/devscripts/flake8/run
index 2000dd6..ee82ca2 100755
--- a/devscripts/flake8/run
+++ b/devscripts/flake8/run
@@ -1,5 +1,5 @@
#! /bin/sh
-flake8 ../SQLObject | sort >all-results &&
+flake8 ../.. | sort >all-results &&
awk '{print $2}' all-results | sort | uniq -c |
sort -k 1,1nr -k 2,2 >sort-by-lines
diff --git a/devscripts/publish-docs b/devscripts/publish-docs
index 1ecdc50..f69df59 100755
--- a/devscripts/publish-docs
+++ b/devscripts/publish-docs
@@ -1,5 +1,5 @@
#! /bin/sh
-cd "`dirname \"$0\"`"/SQLObject-docs && chmod -R a+rX . &&
+cd "`dirname \"$0\"`"/../../SQLObject-docs && chmod -R a+rX . &&
exec rsync -hlrtP4 --del . \
web.sourceforge.net:/home/project-web/sqlobject/htdocs/
diff --git a/devscripts/release b/devscripts/release
index a329be3..35154c9 100755
--- a/devscripts/release
+++ b/devscripts/release
@@ -1,11 +1,11 @@
#! /bin/sh
-cd "`dirname \"$0\"`"/SQLObject &&
+cd "`dirname \"$0\"`"/.. &&
umask 022 &&
chmod -R a+rX . &&
set-commit-date.py &&
-../build-docs &&
+devscripts/build-docs &&
python setup.py build_py &&
python setup.py build --executable '/usr/bin/env python' &&
@@ -21,7 +21,7 @@ split_tag $version
if [ "$state" = final ]; then
rsync -ahP4 dist/* frs.sourceforge.net:/home/frs/project/sqlobject/sqlobject/"$version"/ &&
rsync -ahP4 ANNOUNCE.rst frs.sourceforge.net:/home/frs/project/sqlobject/sqlobject/"$version"/README.rst || exit 1
- ../sftp-frs
+ devscripts/sftp-frs
fi &&
twine upload --skip-existing dist/* &&
diff --git a/devscripts/setup b/devscripts/setup
index c85aae0..04ed1b7 100755
--- a/devscripts/setup
+++ b/devscripts/setup
@@ -1,7 +1,7 @@
#! /bin/sh
umask 022 # -rwxr-xr-x
-cd "`dirname \"$0\"`"/SQLObject &&
+cd "`dirname \"$0\"`"/.. &&
for py_ver in 2.7 3.4 3.5 3.6 3.7; do
python$py_ver -m pip install --install-option=-O2 --upgrade .
http://sourceforge.net/p/sqlobject/sqlobject/ci/c021e99dfde5794d3cee318bb9b93e0a05dfbff6
commit c021e99dfde5794d3cee318bb9b93e0a05dfbff6
Author: Oleg Broytman <ph...@ph...>
Date: Thu Feb 7 08:54:42 2019 +0300
Tests: Remove devscripts/run-*; we have been using tox
[skip ci]
diff --git a/devscripts/run-all-tests b/devscripts/run-all-tests
deleted file mode 100755
index 2e67aaa..0000000
--- a/devscripts/run-all-tests
+++ /dev/null
@@ -1,13 +0,0 @@
-#! /bin/sh
-
-cd "`dirname \"$0\"`"/SQLObject &&
-SO_DIR="`dirname $0`"
-
-for py_ver in 2.7 3.4 3.5 3.6 3.7; do
- echo "---------- PYTHON $py_ver "$1" ----------"
- "$SO_DIR"/cleanup &&
- PY_VER=$py_ver "$SO_DIR"/run-tests-"$1" \
- sqlobject/tests/test_*.py sqlobject/inheritance/tests/test_*.py \
- sqlobject/versioning/test/test_*.py || exit 1
-done
-echo "---------- 'DONE!' ----------"
diff --git a/devscripts/run-all-tests-ALL b/devscripts/run-all-tests-ALL
deleted file mode 100755
index 1d2d813..0000000
--- a/devscripts/run-all-tests-ALL
+++ /dev/null
@@ -1,4 +0,0 @@
-#! /bin/sh
-
-"`dirname $0`"/run-all-tests-sqlite &&
-exec "`dirname $0`"/run-all-tests-pgsql
diff --git a/devscripts/run-all-tests-pgsql b/devscripts/run-all-tests-pgsql
deleted file mode 100755
index 283ee0c..0000000
--- a/devscripts/run-all-tests-pgsql
+++ /dev/null
@@ -1,2 +0,0 @@
-#! /bin/sh
-exec "`dirname $0`"/run-all-tests pgsql
diff --git a/devscripts/run-all-tests-sqlite b/devscripts/run-all-tests-sqlite
deleted file mode 100755
index ffa4ba5..0000000
--- a/devscripts/run-all-tests-sqlite
+++ /dev/null
@@ -1,2 +0,0 @@
-#! /bin/sh
-exec "`dirname $0`"/run-all-tests sqlite
diff --git a/devscripts/run-tests b/devscripts/run-tests
deleted file mode 100755
index b81141d..0000000
--- a/devscripts/run-tests
+++ /dev/null
@@ -1,22 +0,0 @@
-#! /bin/sh
-
-START_DIR="`pwd`"
-CWD="$START_DIR"
-
-while [ ! -f setup.py -a "$CWD" != / ]; do
- cd .. && CWD="`pwd`" || exit 1
-done
-if [ ! -f setup.py ]; then
- echo "Cannot find setup.py, abort" >&2
- exit 1
-fi
-SO_DIR="$CWD"
-
-PYTHONPATH="$CWD"
-export PYTHONPATH
-
-TESTDB_URI="$1"
-shift
-
-cd "$START_DIR" &&
-exec python"$PY_VER" `which pytest` $PYTEST_OPTIONS -D "$TESTDB_URI" "$@"
diff --git a/devscripts/run-tests-mysql-connector b/devscripts/run-tests-mysql-connector
deleted file mode 100755
index d9ed817..0000000
--- a/devscripts/run-tests-mysql-connector
+++ /dev/null
@@ -1,5 +0,0 @@
-#! /bin/sh
-
-mysql -e 'create database sqlobject_test;'
-"`dirname \"$0\"`/run-tests" 'mysql://localhost/sqlobject_test?driver=connector&charset=utf8&debug=1' "$@"
-mysql -e 'drop database sqlobject_test;'
diff --git a/devscripts/run-tests-mysqlclient b/devscripts/run-tests-mysqlclient
deleted file mode 100755
index c99ca61..0000000
--- a/devscripts/run-tests-mysqlclient
+++ /dev/null
@@ -1,5 +0,0 @@
-#! /bin/sh
-
-mysql -e 'create database sqlobject_test;'
-"`dirname \"$0\"`/run-tests" 'mysql://localhost/sqlobject_test?driver=mysqldb&charset=utf8&debug=1' "$@"
-mysql -e 'drop database sqlobject_test;'
diff --git a/devscripts/run-tests-mysqldb b/devscripts/run-tests-mysqldb
deleted file mode 100755
index 65b7e7e..0000000
--- a/devscripts/run-tests-mysqldb
+++ /dev/null
@@ -1,5 +0,0 @@
-#! /bin/sh
-
-mysql -e 'create database sqlobject_test;'
-"`dirname \"$0\"`/run-tests" 'mysql://localhost/sqlobject_test?driver=mysqldb&debug=1' "$@"
-mysql -e 'drop database sqlobject_test;'
diff --git a/devscripts/run-tests-oursql b/devscripts/run-tests-oursql
deleted file mode 100755
index d01dfd6..0000000
--- a/devscripts/run-tests-oursql
+++ /dev/null
@@ -1,5 +0,0 @@
-#! /bin/sh
-
... 126 lines suppressed ...
hooks/post-receive
--
SQLObject development repository
|