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 f1ffdf88ce7f477ec55eb73a7b0f7bcf15c81fbc (commit)
via 67d58541fc48c0e1358e1b6ecc2b26a816d5a8c0 (commit)
via aea36335819e189316cffc84705dc464f4ff8120 (commit)
via 5dfacb25fb61bcc6f08aaad2bd3934f2919c92ee (commit)
via ee8c1492c6b80ca971fee2778e2bc781d2e9b84f (commit)
from 1450275af30b8896373c091e5398fb942c3f1890 (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/f1ffdf88ce7f477ec55eb73a7b0f7bcf15c81fbc
commit f1ffdf88ce7f477ec55eb73a7b0f7bcf15c81fbc
Author: Oleg Broytman <ph...@ph...>
Date: Thu Apr 27 23:20:14 2017 +0300
build-all-docs: avoid overriding robots.txt and generate sitemap.xml
[skip ci]
diff --git a/devscripts/build-all-docs b/devscripts/build-all-docs
index 5e8f286..e659782 100755
--- a/devscripts/build-all-docs
+++ b/devscripts/build-all-docs
@@ -3,8 +3,16 @@
build_docs() {
git checkout "$1" &&
../build-docs &&
- rsync -ahP --del docs/html/ ../SQLObject-docs/"$2"/
+ rsync -ahP --del --exclude=/robots.txt docs/html/ ../SQLObject-docs/"$2"/
}
-cd "`dirname \"$0\"`"/SQLObject &&
-build_docs 3.2.0 && exec build_docs master devel
+PROG_DIR="`dirname \"$0\"`" &&
+cd "$PROG_DIR" &&
+PROG_DIR="`pwd`" &&
+
+cd "$PROG_DIR"/SQLObject &&
+build_docs 3.2.0 &&
+build_docs master devel &&
+
+cd ../SQLObject-docs &&
+exec sitemap_gen.py --config="$PROG_DIR"/sqlobject.org-sitemapconfig.xml
diff --git a/devscripts/sqlobject.org-sitemapconfig.xml b/devscripts/sqlobject.org-sitemapconfig.xml
new file mode 100644
index 0000000..dc37055
--- /dev/null
+++ b/devscripts/sqlobject.org-sitemapconfig.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ sitemap_gen.py configuration script for sqlobject.org
+-->
+
+ <site
+ base_url="http://sqlobject.org/"
+ store_into="sitemap.xml"
+ default_encoding="utf-8"
+ verbose="1"
+ sitemap_type="web"
+ suppress_search_engine_notify="1"
+ >
+
+ <directory
+ url="http://sqlobject.org/"
+ path="."
+ default_file="index.html"
+ />
+
+ <!-- Exclude URLs within UNIX-style hidden files or directories -->
+ <filter action="drop" type="regexp" pattern="/\.[^/]*" />
+
+</site>
http://sourceforge.net/p/sqlobject/sqlobject/ci/67d58541fc48c0e1358e1b6ecc2b26a816d5a8c0
commit 67d58541fc48c0e1358e1b6ecc2b26a816d5a8c0
Author: Oleg Broytman <ph...@ph...>
Date: Mon Apr 24 01:26:24 2017 +0300
Remove set-commit-date.py
[skip ci]
diff --git a/devscripts/release b/devscripts/release
index ee15d01..0e24a8a 100755
--- a/devscripts/release
+++ b/devscripts/release
@@ -4,8 +4,8 @@ cd "`dirname \"$0\"`"/SQLObject &&
umask 022 &&
chmod -R a+rX . &&
+set-commit-date.py &&
../build-docs &&
-../set-commit-date.py &&
python setup.py build_py &&
python setup.py build --executable '/usr/bin/env python' &&
diff --git a/devscripts/set-commit-date.py b/devscripts/set-commit-date.py
deleted file mode 100755
index dc6a5fb..0000000
--- a/devscripts/set-commit-date.py
+++ /dev/null
@@ -1,47 +0,0 @@
-#! /usr/bin/env python
-
-# Find commit date/time for every commit, list files in the commit
-# and set the file's modification time to the date/time of the latest commit.
-
-# Adapted from https://git.wiki.kernel.org/index.php/ExampleScripts#Setting_the_timestamps_of_the_files_to_the_commit_timestamp_of_the_commit_which_last_touched_them # noqa
-
-import os
-import subprocess
-
-separator = '----- GIT LOG SEPARATOR -----'
-
-git_log = subprocess.Popen(['git', 'log', '-m', '--first-parent',
- '--name-only', '--no-color',
- '--format=%s%%n%%ct' % separator],
- stdout=subprocess.PIPE, stderr=subprocess.STDOUT,
- universal_newlines=True)
-filenames = set()
-# stages: 1 - start of commit, 2 - timestamp, 3 - empty line, 4 - files
-stage = 1
-while True:
- line = git_log.stdout.readline()
- if not line: # EOF
- break
- line = line.strip()
- if (stage in (1, 4)) and (line == separator): # Start of a commit
- stage = 2
- elif stage == 2:
- stage = 3
- time = int(line)
- elif stage == 3:
- if line == separator: # Null-merge (git merge -s ours), no files
- stage = 2
- continue
- stage = 4
- assert line == '', line
- elif stage == 4:
- filename = line
- if filename not in filenames:
- filenames.add(filename)
- if os.path.exists(filename):
- os.utime(filename, (time, time))
- else:
- raise ValueError("stage: %d, line: %s" % (stage, line))
-
-git_log.wait()
-git_log.stdout.close()
http://sourceforge.net/p/sqlobject/sqlobject/ci/aea36335819e189316cffc84705dc464f4ff8120
commit aea36335819e189316cffc84705dc464f4ff8120
Author: Oleg Broytman <ph...@ph...>
Date: Thu Apr 20 21:36:31 2017 +0300
Stop running tests at AppVeyor with pymssql
Too many timeouts and problems.
diff --git a/appveyor.yml b/appveyor.yml
index 2b459a2..46c89c0 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -25,17 +25,6 @@ environment:
CMD_IN_ENV: "cmd /E:ON /V:ON /C .\\run_with_env.cmd"
matrix:
- # from https://www.appveyor.com/docs/installed-software/#python
- - PYTHON_HOME: "C:\\Python27"
- PYTHON_VERSION: "2.7"
- PYTHON_ARCH: "32"
- db: mssql2014
- TOX_ENV: "py27-pymssql-w32"
- - PYTHON_HOME: "C:\\Python34"
- PYTHON_VERSION: "3.4"
- PYTHON_ARCH: "32"
- db: mssql2014
- TOX_ENV: "py34-pymssql-w32"
- PYTHON_HOME: "C:\\Python27"
PYTHON_VERSION: "2.7"
PYTHON_ARCH: "32"
@@ -233,7 +222,6 @@ install:
- ps: Get-OdbcDriver -Platform 32-bit | Select-Object -ExpandProperty Name
- ps: Get-OdbcDriver -Platform 64-bit | Select-Object -ExpandProperty Name
# Enable TCP for mssql
- # (from appveyor documentation)
- ps: |
[reflection.assembly]::LoadWithPartialName("Microsoft.SqlServer.Smo") | Out-Null
[reflection.assembly]::LoadWithPartialName("Microsoft.SqlServer.SqlWmiManagement") | Out-Null
diff --git a/docs/News.rst b/docs/News.rst
index d9d5307..54ee2f1 100644
--- a/docs/News.rst
+++ b/docs/News.rst
@@ -38,6 +38,9 @@ Tests
* Stop running tests at Travis with Python 2.6.
+* Stop running tests at AppVeyor with pymssql - too many timeouts and
+ problems.
+
SQLObject 3.2.0
===============
diff --git a/tox.ini b/tox.ini
index 02d2d4d..e6812ea 100644
--- a/tox.ini
+++ b/tox.ini
@@ -1,6 +1,6 @@
[tox]
minversion = 1.8
-envlist = py{26,27}-{mysqldb,mysql-oursql},py{34,35,36}-{mysqlclient,pypostgresql},py{26,27,34,35,36}-{mysql-connector,pymysql,mysql-pyodbc,mysql-pypyodbc,postgres-psycopg,postgres-pygresql,postgres-pyodbc,postgres-pypyodbc,sqlite,sqlite-memory},py{27,34,35,36}-{firebird-fdb,firebirdsql},py{27,34}-flake8,py{27,34,35,36}-{pymssql,mssql-pyodbc,mysql-connector,mysql-pyodbc,mysql-pypyodbc,postgres-psycopg,postgres-pyodbc,postgres-pypyodbc,sqlite,sqlite-memory}-w32
+envlist = py{26,27}-{mysqldb,mysql-oursql},py{34,35,36}-{mysqlclient,pypostgresql},py{26,27,34,35,36}-{mysql-connector,pymysql,mysql-pyodbc,mysql-pypyodbc,postgres-psycopg,postgres-pygresql,postgres-pyodbc,postgres-pypyodbc,sqlite,sqlite-memory},py{27,34,35,36}-{firebird-fdb,firebirdsql},py{27,34}-flake8,py{27,34,35,36}-{mssql-pyodbc,mysql-connector,mysql-pyodbc,mysql-pypyodbc,postgres-psycopg,postgres-pyodbc,postgres-pypyodbc,sqlite,sqlite-memory}-w32
# Base test environment settings
[testenv]
@@ -33,7 +33,6 @@ deps =
pypyodbc: pypyodbc
firebird-fdb: fdb
firebirdsql: firebirdsql
- pymssql: pymssql
passenv = CI TRAVIS TRAVIS_* APPVEYOR DISTUTILS_USE_SDK MSSdk INCLUDE LIB PGPASSWORD WINDIR
# Don't fail or warn on uninstalled commands
whitelist_externals =
@@ -397,26 +396,6 @@ commands =
flake8 .
# Windows testing
-[pymssql-w32]
-commands =
- {[testenv]commands}
- -sqlcmd -U sa -P "Password12!" -S .\SQL2014 -Q "DROP DATABASE sqlobject_test"
- sqlcmd -U sa -P "Password12!" -S .\SQL2014 -Q "CREATE DATABASE sqlobject_test"
- pytest --cov=sqlobject -D "mssql://sa:Password12!@localhost\SQL2014/sqlobject_test?driver=pymssql&timeout=30&debug=1"
- sqlcmd -U sa -P "Password12!" -S .\SQL2014 -Q "DROP DATABASE sqlobject_test"
-
-[testenv:py27-pymssql-w32]
-commands = {[pymssql-w32]commands}
-
-[testenv:py34-pymssql-w32]
-commands = {[pymssql-w32]commands}
-
-[testenv:py35-pymssql-w32]
-commands = {[pymssql-w32]commands}
-
-[testenv:py36-pymssql-w32]
-commands = {[pymssql-w32]commands}
-
[mssql-pyodbc-w32]
commands =
{envpython} -c "import pyodbc; print(pyodbc.drivers())"
http://sourceforge.net/p/sqlobject/sqlobject/ci/5dfacb25fb61bcc6f08aaad2bd3934f2919c92ee
commit 5dfacb25fb61bcc6f08aaad2bd3934f2919c92ee
Author: Oleg Broytman <ph...@ph...>
Date: Thu Apr 20 22:06:04 2017 +0300
Add support for PyODBC and PyPyODBC for MS SQL
Run tests at AppVeyor.
diff --git a/appveyor.yml b/appveyor.yml
index e7d182c..2b459a2 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -30,12 +30,32 @@ environment:
PYTHON_VERSION: "2.7"
PYTHON_ARCH: "32"
db: mssql2014
- TOX_ENV: "py27-mssql-w32"
+ TOX_ENV: "py27-pymssql-w32"
- PYTHON_HOME: "C:\\Python34"
PYTHON_VERSION: "3.4"
PYTHON_ARCH: "32"
db: mssql2014
- TOX_ENV: "py34-mssql-w32"
+ TOX_ENV: "py34-pymssql-w32"
+ - PYTHON_HOME: "C:\\Python27"
+ PYTHON_VERSION: "2.7"
+ PYTHON_ARCH: "32"
+ db: mssql2014
+ TOX_ENV: "py27-mssql-pyodbc-w32"
+ - PYTHON_HOME: "C:\\Python34"
+ PYTHON_VERSION: "3.4"
+ PYTHON_ARCH: "32"
+ db: mssql2014
+ TOX_ENV: "py34-mssql-pyodbc-w32"
+ - PYTHON_HOME: "C:\\Python35"
+ PYTHON_VERSION: "3.5"
+ PYTHON_ARCH: "32"
+ db: mssql2014
+ TOX_ENV: "py35-mssql-pyodbc-w32"
+ - PYTHON_HOME: "C:\\Python36"
+ PYTHON_VERSION: "3.6"
+ PYTHON_ARCH: "32"
+ db: mssql2014
+ TOX_ENV: "py36-mssql-pyodbc-w32"
- PYTHON_HOME: "C:\\Python27"
PYTHON_VERSION: "2.7"
PYTHON_ARCH: "32"
diff --git a/docs/News.rst b/docs/News.rst
index dff7e8e..d9d5307 100644
--- a/docs/News.rst
+++ b/docs/News.rst
@@ -21,9 +21,9 @@ Drivers (work in progress)
--------------------------
* Add support for PyODBC and PyPyODBC (pure-python ODBC DB API driver) for
- MySQL and PostgreSQL. Driver names are ``pyodbc``, ``pypyodbc`` or
- ``odbc`` (try ``pyodbc`` and ``pypyodbc``). There are some problems with
- pyodbc and many problems with pypyodbc.
+ MySQL, PostgreSQL and MS SQL. Driver names are ``pyodbc``, ``pypyodbc``
+ or ``odbc`` (try ``pyodbc`` and ``pypyodbc``). There are some problems
+ with pyodbc and many problems with pypyodbc.
Documentation
-------------
diff --git a/sqlobject/mssql/mssqlconnection.py b/sqlobject/mssql/mssqlconnection.py
index 1350514..c154dd4 100644
--- a/sqlobject/mssql/mssqlconnection.py
+++ b/sqlobject/mssql/mssqlconnection.py
@@ -24,10 +24,23 @@ class MSSQLConnection(DBAPI):
import adodbapi as sqlmodule
elif driver == 'pymssql':
import pymssql as sqlmodule
+ elif driver == 'pyodbc':
+ import pyodbc
+ self.module = pyodbc
+ elif driver == 'pypyodbc':
+ import pypyodbc
+ self.module = pypyodbc
+ elif driver == 'odbc':
+ try:
+ import pyodbc
+ except ImportError:
+ import pypyodbc as pyodbc
+ self.module = pyodbc
else:
raise ValueError(
'Unknown MSSQL driver "%s", '
- 'expected adodb or pymssql' % driver)
+ 'expected adodb, pymssql, '
+ 'odbc, pyodbc or pypyodbc' % driver)
except ImportError:
pass
else:
@@ -35,9 +48,13 @@ class MSSQLConnection(DBAPI):
else:
raise ImportError(
'Cannot find an MSSQL driver, tried %s' % drivers)
- self.module = sqlmodule
- if sqlmodule.__name__ == 'adodbapi':
+ if driver in ('odbc', 'pyodbc', 'pypyodbc'):
+ self.make_odbc_conn_str(db, host, port, user, password,
+ kw.pop('odbcdrv', 'SQL Server'))
+
+ elif driver in ('adodb', 'adodbapi'):
+ self.module = sqlmodule
self.dbconnection = sqlmodule.connect
# ADO uses unicode only (AFAIK)
self.usingUnicodeStrings = True
@@ -64,7 +81,8 @@ class MSSQLConnection(DBAPI):
kw.pop("ncli", None)
kw.pop("sspi", None)
- else: # pymssql
+ elif driver == 'pymssql':
+ self.module = sqlmodule
self.dbconnection = sqlmodule.connect
sqlmodule.Binary = lambda st: str(st)
# don't know whether pymssql uses unicode
@@ -89,6 +107,7 @@ class MSSQLConnection(DBAPI):
keys_dict[attr] = value
return keys_dict
self.make_conn_str = _make_conn_str
+ self.driver = driver
self.autoCommit = int(autoCommit)
self.user = user
@@ -118,17 +137,22 @@ class MSSQLConnection(DBAPI):
return c.fetchone()[0]
def makeConnection(self):
- conn_descr = self.make_conn_str(self)
- if isinstance(conn_descr, dict):
- con = self.dbconnection(**conn_descr)
+ if self.driver in ('odbc', 'pyodbc', 'pypyodbc'):
+ self.debugWriter.write(
+ "ODBC connect string: " + self.odbc_conn_str)
+ conn = self.module.connect(self.odbc_conn_str)
else:
- con = self.dbconnection(conn_descr)
- cur = con.cursor()
+ conn_descr = self.make_conn_str(self)
+ if isinstance(conn_descr, dict):
+ conn = self.dbconnection(**conn_descr)
+ else:
+ conn = self.dbconnection(conn_descr)
+ cur = conn.cursor()
cur.execute('SET ANSI_NULLS ON')
cur.execute("SELECT CAST('12345.21' AS DECIMAL(10, 2))")
self.decimalSeparator = str(cur.fetchone()[0])[-3]
cur.close()
- return con
+ return conn
HAS_IDENTITY = """
select 1
@@ -302,9 +326,6 @@ class MSSQLConnection(DBAPI):
option = "OFF"
c = conn.cursor()
c.execute("SET AUTOCOMMIT " + option)
- # from mx.ODBC.Windows import SQL
- # connection.setconnectoption(
- # SQL.AUTOCOMMIT, SQL.AUTOCOMMIT_ON if auto else SQL.AUTOCOMMIT_OFF)
# precision and scale is needed for decimal columns
def guessClass(self, t, size, precision, scale):
diff --git a/tox.ini b/tox.ini
index 0dfb792..02d2d4d 100644
--- a/tox.ini
+++ b/tox.ini
@@ -1,6 +1,6 @@
[tox]
minversion = 1.8
-envlist = py{26,27}-{mysqldb,mysql-oursql},py{34,35,36}-{mysqlclient,pypostgresql},py{26,27,34,35,36}-{mysql-connector,pymysql,mysql-pyodbc,mysql-pypyodbc,postgres-psycopg,postgres-pygresql,postgres-pyodbc,postgres-pypyodbc,sqlite,sqlite-memory},py{27,34,35,36}-{firebird-fdb,firebirdsql},py{27,34}-flake8,py{27,34,35,36}-{mssql,mysql-connector,mysql-pyodbc,mysql-pypyodbc,postgres-psycopg,postgres-pyodbc,postgres-pypyodbc,sqlite,sqlite-memory}-w32
+envlist = py{26,27}-{mysqldb,mysql-oursql},py{34,35,36}-{mysqlclient,pypostgresql},py{26,27,34,35,36}-{mysql-connector,pymysql,mysql-pyodbc,mysql-pypyodbc,postgres-psycopg,postgres-pygresql,postgres-pyodbc,postgres-pypyodbc,sqlite,sqlite-memory},py{27,34,35,36}-{firebird-fdb,firebirdsql},py{27,34}-flake8,py{27,34,35,36}-{pymssql,mssql-pyodbc,mysql-connector,mysql-pyodbc,mysql-pypyodbc,postgres-psycopg,postgres-pyodbc,postgres-pypyodbc,sqlite,sqlite-memory}-w32
# Base test environment settings
[testenv]
@@ -33,7 +33,7 @@ deps =
pypyodbc: pypyodbc
firebird-fdb: fdb
firebirdsql: firebirdsql
- mssql: pymssql
+ pymssql: pymssql
passenv = CI TRAVIS TRAVIS_* APPVEYOR DISTUTILS_USE_SDK MSSdk INCLUDE LIB PGPASSWORD WINDIR
# Don't fail or warn on uninstalled commands
whitelist_externals =
@@ -397,7 +397,7 @@ commands =
flake8 .
# Windows testing
-[mssql-w32]
+[pymssql-w32]
commands =
{[testenv]commands}
-sqlcmd -U sa -P "Password12!" -S .\SQL2014 -Q "DROP DATABASE sqlobject_test"
@@ -405,17 +405,37 @@ commands =
pytest --cov=sqlobject -D "mssql://sa:Password12!@localhost\SQL2014/sqlobject_test?driver=pymssql&timeout=30&debug=1"
sqlcmd -U sa -P "Password12!" -S .\SQL2014 -Q "DROP DATABASE sqlobject_test"
-[testenv:py27-mssql-w32]
-commands = {[mssql-w32]commands}
+[testenv:py27-pymssql-w32]
+commands = {[pymssql-w32]commands}
-[testenv:py34-mssql-w32]
-commands = {[mssql-w32]commands}
+[testenv:py34-pymssql-w32]
+commands = {[pymssql-w32]commands}
-[testenv:py35-mssql-w32]
-commands = {[mssql-w32]commands}
+[testenv:py35-pymssql-w32]
+commands = {[pymssql-w32]commands}
-[testenv:py36-mssql-w32]
-commands = {[mssql-w32]commands}
+[testenv:py36-pymssql-w32]
+commands = {[pymssql-w32]commands}
+
+[mssql-pyodbc-w32]
+commands =
+ {envpython} -c "import pyodbc; print(pyodbc.drivers())"
+ -sqlcmd -U sa -P "Password12!" -S .\SQL2014 -Q "DROP DATABASE sqlobject_test"
+ sqlcmd -U sa -P "Password12!" -S .\SQL2014 -Q "CREATE DATABASE sqlobject_test"
+ pytest --cov=sqlobject -D "mssql://sa:Password12!@localhost\SQL2014/sqlobject_test?driver=pyodbc&odbcdrv=SQL%20Server&debug=1"
+ sqlcmd -U sa -P "Password12!" -S .\SQL2014 -Q "DROP DATABASE sqlobject_test"
+
+[testenv:py27-mssql-pyodbc-w32]
+commands = {[mssql-pyodbc-w32]commands}
+
+[testenv:py34-mssql-pyodbc-w32]
+commands = {[mssql-pyodbc-w32]commands}
+
+[testenv:py35-mssql-pyodbc-w32]
+commands = {[mssql-pyodbc-w32]commands}
+
+[testenv:py36-mssql-pyodbc-w32]
+commands = {[mssql-pyodbc-w32]commands}
[mysql-connector-w32]
... 41 lines suppressed ...
hooks/post-receive
--
SQLObject development repository
|