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 0a64735fbb27adf82156346674f3143db9fd4c0c (commit)
via 8e2b506965a7c3794eccf079217f936442c04a5a (commit)
via 80aa5d16805e0145daf9f41449abe35ea87a4069 (commit)
via e50bdd0d0ad4cb65c39424aca62c666926b7d3ac (commit)
via 96d3aba0e0ad0606a17b74f231ccc851e8e225a0 (commit)
via d6e5e0c1a628fa6c66b60f477539a8ff3646d7c6 (commit)
via 706c7207981ae97b673588602db3817a3095bc03 (commit)
via 5aee23fd9ad431d490f246e1ff801a08b401182b (commit)
via ccb2c23e4fc9f316d923377fd2b0c7d7fbc683a5 (commit)
via d2a7d7f46de9e7f42ff86a2063aea8bae30ce8e7 (commit)
via 667de45be78e3691c3157c05248a62fea6459fce (commit)
via 30e79370b363a83e24c19b520110cdcf8f6b1bbb (commit)
via 33020a8beafd64eb666e479897f9bab8606a463e (commit)
via fd6e67c14a79a18f8e2a817789b686715cafbf85 (commit)
from 6eabc0948f86083039f55c752a28022d7584f3f0 (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/0a64735fbb27adf82156346674f3143db9fd4c0c
commit 0a64735fbb27adf82156346674f3143db9fd4c0c
Merge: 6eabc09 8e2b506
Author: Oleg Broytman <ph...@ph...>
Date: Thu Feb 5 21:38:52 2015 +0300
Merge branch 'flake8-fixes'
http://sourceforge.net/p/sqlobject/sqlobject/ci/8e2b506965a7c3794eccf079217f936442c04a5a
commit 8e2b506965a7c3794eccf079217f936442c04a5a
Author: Neil <ne...@di...>
Date: Tue Feb 3 14:32:01 2015 +0200
Don't import new on python 3
diff --git a/sqlobject/dbconnection.py b/sqlobject/dbconnection.py
index 5891342..d13db60 100644
--- a/sqlobject/dbconnection.py
+++ b/sqlobject/dbconnection.py
@@ -1,7 +1,11 @@
import atexit
from cgi import parse_qsl
import inspect
-import new
+import sys
+if sys.version_info[0] < 3:
+ # Temporary workaround - will need more attention to fix
+ # usage of new in the code
+ import new
import os
import threading
import types
http://sourceforge.net/p/sqlobject/sqlobject/ci/80aa5d16805e0145daf9f41449abe35ea87a4069
commit 80aa5d16805e0145daf9f41449abe35ea87a4069
Author: Neil <ne...@di...>
Date: Tue Feb 3 14:29:11 2015 +0200
Avoid dictionary changed crashes on import
diff --git a/sqlobject/col.py b/sqlobject/col.py
index 5c7aada..690f273 100644
--- a/sqlobject/col.py
+++ b/sqlobject/col.py
@@ -1779,7 +1779,8 @@ def pushKey(kw, name, value):
kw[name] = value
all = []
-for key, value in globals().items():
+# Use copy() to avoid 'dictionary changed' issues on python 3
+for key, value in globals().copy().items():
if isinstance(value, type) and (issubclass(value, (Col, SOCol))):
all.append(key)
__all__.extend(all)
diff --git a/sqlobject/events.py b/sqlobject/events.py
index aadf5bb..cb4b971 100644
--- a/sqlobject/events.py
+++ b/sqlobject/events.py
@@ -345,6 +345,7 @@ def nice_repr(v):
__all__ = ['listen', 'send']
-for name, value in globals().items():
+# Use copy() to avoid 'dictionary changed' issues on python 3
+for name, value in globals().copy().items():
if isinstance(value, type) and issubclass(value, Signal):
__all__.append(name)
http://sourceforge.net/p/sqlobject/sqlobject/ci/e50bdd0d0ad4cb65c39424aca62c666926b7d3ac
commit e50bdd0d0ad4cb65c39424aca62c666926b7d3ac
Author: Neil <ne...@di...>
Date: Tue Feb 3 14:28:40 2015 +0200
Add operator.div alias for python 3
diff --git a/sqlobject/sqlbuilder.py b/sqlobject/sqlbuilder.py
index d76e928..60472a3 100644
--- a/sqlobject/sqlbuilder.py
+++ b/sqlobject/sqlbuilder.py
@@ -66,6 +66,7 @@ import re
import threading
import types
import weakref
+import sys
from . import classregistry
from .converters import registerConverter, sqlrepr, quote_str, unquote_str
@@ -262,9 +263,15 @@ def tablesUsedSet(obj, db):
return {}
+if sys.version_info[0] < 3:
+ div = operator.div
+else:
+ div = operator.truediv
+
+
operatorMap = {
"+": operator.add,
- "/": operator.div,
+ "/": div,
"-": operator.sub,
"*": operator.mul,
"<": operator.lt,
http://sourceforge.net/p/sqlobject/sqlobject/ci/96d3aba0e0ad0606a17b74f231ccc851e8e225a0
commit 96d3aba0e0ad0606a17b74f231ccc851e8e225a0
Author: Neil <ne...@di...>
Date: Tue Feb 3 14:27:14 2015 +0200
Add python3 alias
diff --git a/sqlobject/dberrors.py b/sqlobject/dberrors.py
index c14a86b..986c80d 100644
--- a/sqlobject/dberrors.py
+++ b/sqlobject/dberrors.py
@@ -5,6 +5,9 @@
http://www.python.org/topics/database/DatabaseAPI-2.0.html
"""
+import sys
+if sys.version_info[0] >= 3:
+ StandardError = Exception
class Error(StandardError):
pass
http://sourceforge.net/p/sqlobject/sqlobject/ci/d6e5e0c1a628fa6c66b60f477539a8ff3646d7c6
commit d6e5e0c1a628fa6c66b60f477539a8ff3646d7c6
Author: Neil <ne...@di...>
Date: Tue Feb 3 14:26:55 2015 +0200
Alias types and add some python 3 protections
diff --git a/sqlobject/converters.py b/sqlobject/converters.py
index b4c3862..efae0c5 100644
--- a/sqlobject/converters.py
+++ b/sqlobject/converters.py
@@ -2,7 +2,15 @@ from array import array
import datetime
from decimal import Decimal
import time
-from types import ClassType, InstanceType, NoneType
+import sys
+if sys.version_info[0] < 3:
+ from types import ClassType, InstanceType, NoneType
+else:
+ # Use suitable aliases for now
+ ClassType = type
+ NoneType = type(None)
+ # This is may not be what we want in all cases, but will do for now
+ InstanceType = object
try:
@@ -80,9 +88,13 @@ def StringLikeConverter(value, db):
return "'%s'" % value
registerConverter(str, StringLikeConverter)
-registerConverter(unicode, StringLikeConverter)
+if sys.version_info[0] < 3:
+ registerConverter(unicode, StringLikeConverter)
registerConverter(array, StringLikeConverter)
-registerConverter(buffer, StringLikeConverter)
+if sys.version_info[0] < 3:
+ registerConverter(buffer, StringLikeConverter)
+else:
+ registerConverter(memoryview, StringLikeConverter)
def IntConverter(value, db):
@@ -94,7 +106,8 @@ registerConverter(int, IntConverter)
def LongConverter(value, db):
return str(value)
-registerConverter(long, LongConverter)
+if sys.version_info[0] < 3:
+ registerConverter(long, LongConverter)
if NumericType:
registerConverter(NumericType, IntConverter)
http://sourceforge.net/p/sqlobject/sqlobject/ci/706c7207981ae97b673588602db3817a3095bc03
commit 706c7207981ae97b673588602db3817a3095bc03
Author: Neil <ne...@di...>
Date: Tue Feb 3 14:33:34 2015 +0200
Avoid circular import issues in main.py
diff --git a/sqlobject/dbconnection.py b/sqlobject/dbconnection.py
index c5f121b..5891342 100644
--- a/sqlobject/dbconnection.py
+++ b/sqlobject/dbconnection.py
@@ -13,7 +13,6 @@ from .cache import CacheSet
from . import classregistry
from . import col
from .converters import sqlrepr
-import main
from . import sqlbuilder
from .util.threadinglocal import local as threading_local
@@ -667,6 +666,7 @@ class DBAPI(DBConnection):
self.sqlrepr(secondValue)))
def _SO_columnClause(self, soClass, kw):
+ from . import main
ops = {None: "IS"}
data = []
if 'id' in kw:
diff --git a/sqlobject/sresults.py b/sqlobject/sresults.py
index bbad18a..b740996 100644
--- a/sqlobject/sresults.py
+++ b/sqlobject/sresults.py
@@ -1,5 +1,4 @@
from . import dbconnection
-import main
from . import sqlbuilder
@@ -285,6 +284,7 @@ class SelectResults(object):
If more than one result is returned,
``SQLObjectIntegrityError`` will be raised.
"""
+ from . import main
results = list(self)
if not results:
if default is sqlbuilder.NoDefault:
http://sourceforge.net/p/sqlobject/sqlobject/ci/5aee23fd9ad431d490f246e1ff801a08b401182b
commit 5aee23fd9ad431d490f246e1ff801a08b401182b
Author: Neil <ne...@di...>
Date: Tue Feb 3 14:32:37 2015 +0200
Change to relative imports
diff --git a/sqlobject/sresults.py b/sqlobject/sresults.py
index 71f880d..bbad18a 100644
--- a/sqlobject/sresults.py
+++ b/sqlobject/sresults.py
@@ -1,6 +1,6 @@
-import dbconnection
+from . import dbconnection
import main
-import sqlbuilder
+from . import sqlbuilder
__all__ = ['SelectResults']
http://sourceforge.net/p/sqlobject/sqlobject/ci/ccb2c23e4fc9f316d923377fd2b0c7d7fbc683a5
commit ccb2c23e4fc9f316d923377fd2b0c7d7fbc683a5
Author: Neil <ne...@di...>
Date: Tue Feb 3 14:30:56 2015 +0200
Change to relative imports
diff --git a/sqlobject/dbconnection.py b/sqlobject/dbconnection.py
index 225cbb2..c5f121b 100644
--- a/sqlobject/dbconnection.py
+++ b/sqlobject/dbconnection.py
@@ -3,20 +3,19 @@ from cgi import parse_qsl
import inspect
import new
import os
-import sys
import threading
import types
import urllib
import warnings
import weakref
-from cache import CacheSet
-import classregistry
-import col
-from converters import sqlrepr
+from .cache import CacheSet
+from . import classregistry
+from . import col
+from .converters import sqlrepr
import main
-import sqlbuilder
-from util.threadinglocal import local as threading_local
+from . import sqlbuilder
+from .util.threadinglocal import local as threading_local
warnings.filterwarnings("ignore", "DB-API extension cursor.lastrowid used")
@@ -335,7 +334,6 @@ class DBAPI(DBConnection):
``queryInsertID`` must also be defined.
"""
-
dbName = None
def __init__(self, **kw):
@@ -1086,11 +1084,11 @@ dbConnectionForScheme = TheURIOpener.dbConnectionForScheme
# Register DB URI schemas -- do import for side effects
# noqa is a directive for flake8 to ignore seemingly unused imports
-import firebird # noqa
-import maxdb # noqa
-import mssql # noqa
-import mysql # noqa
-import postgres # noqa
-import rdbhost # noqa
-import sqlite # noqa
-import sybase # noqa
+from . import firebird # noqa
+from . import maxdb # noqa
+from . import mssql # noqa
+from . import mysql # noqa
+from . import postgres # noqa
+from . import rdbhost # noqa
+from . import sqlite # noqa
+from . import sybase # noqa
http://sourceforge.net/p/sqlobject/sqlobject/ci/d2a7d7f46de9e7f42ff86a2063aea8bae30ce8e7
commit d2a7d7f46de9e7f42ff86a2063aea8bae30ce8e7
Author: Neil <ne...@di...>
Date: Tue Feb 3 14:28:12 2015 +0200
Change to relative imports
diff --git a/sqlobject/sqlbuilder.py b/sqlobject/sqlbuilder.py
index 583e821..d76e928 100644
--- a/sqlobject/sqlbuilder.py
+++ b/sqlobject/sqlbuilder.py
@@ -67,8 +67,8 @@ import threading
import types
import weakref
-import classregistry
-from converters import registerConverter, sqlrepr, quote_str, unquote_str
+from . import classregistry
+from .converters import registerConverter, sqlrepr, quote_str, unquote_str
class VersionError(Exception):
http://sourceforge.net/p/sqlobject/sqlobject/ci/667de45be78e3691c3157c05248a62fea6459fce
commit 667de45be78e3691c3157c05248a62fea6459fce
Author: Neil <ne...@di...>
Date: Tue Feb 3 14:26:12 2015 +0200
Change to relative imports
diff --git a/sqlobject/col.py b/sqlobject/col.py
index daa970c..5c7aada 100644
--- a/sqlobject/col.py
+++ b/sqlobject/col.py
@@ -27,12 +27,12 @@ except ImportError:
import pickle
import weakref
from formencode import compound, validators
-from classregistry import findClass
+from .classregistry import findClass
# Sadly the name "constraints" conflicts with many of the function
# arguments in this module, so we rename it:
-import constraints as constrs
-import sqlbuilder
-from styles import capword
+from . import constraints as constrs
+from . import sqlbuilder
+from .styles import capword
NoDefault = sqlbuilder.NoDefault
http://sourceforge.net/p/sqlobject/sqlobject/ci/30e79370b363a83e24c19b520110cdcf8f6b1bbb
commit 30e79370b363a83e24c19b520110cdcf8f6b1bbb
Author: Neil <ne...@di...>
Date: Tue Feb 3 14:25:21 2015 +0200
Change to relative imports
diff --git a/sqlobject/boundattributes.py b/sqlobject/boundattributes.py
index 72d1c5d..9b04b2e 100644
--- a/sqlobject/boundattributes.py
+++ b/sqlobject/boundattributes.py
@@ -26,8 +26,8 @@ attributes.
__all__ = ['BoundAttribute', 'BoundFactory', 'bind_attributes',
'bind_attributes_local']
-import declarative
-import events
+from . import declarative
+from . import events
class BoundAttribute(declarative.Declarative):
diff --git a/sqlobject/declarative.py b/sqlobject/declarative.py
index 04fbe5c..e825cfa 100644
--- a/sqlobject/declarative.py
+++ b/sqlobject/declarative.py
@@ -33,7 +33,7 @@ or an instance method depending on where it is called.
"""
import copy
-import events
+from . import events
import itertools
counter = itertools.count()
diff --git a/sqlobject/joins.py b/sqlobject/joins.py
index 4da0b97..02280a0 100644
--- a/sqlobject/joins.py
+++ b/sqlobject/joins.py
@@ -1,9 +1,9 @@
from itertools import count
-import classregistry
-import events
-import styles
-import sqlbuilder
-from styles import capword
+from . import classregistry
+from . import events
+from . import styles
+from . import sqlbuilder
+from .styles import capword
__all__ = ['MultipleJoin', 'SQLMultipleJoin', 'RelatedJoin', 'SQLRelatedJoin',
'SingleJoin', 'ManyToMany', 'OneToMany']
@@ -373,7 +373,7 @@ class SingleJoin(Join):
-import boundattributes
+from . import boundattributes
class SOManyToMany(object):
diff --git a/sqlobject/main.py b/sqlobject/main.py
index 7ad2267..e1ff1fa 100644
--- a/sqlobject/main.py
+++ b/sqlobject/main.py
@@ -28,19 +28,19 @@ USA.
import threading
import weakref
-import sqlbuilder
-import dbconnection
-import col
-import styles
import types
import warnings
-import joins
-import index
-import classregistry
-import declarative
-import events
-from sresults import SelectResults
-from util.threadinglocal import local
+from . import sqlbuilder
+from . import dbconnection
+from . import col
+from . import styles
+from . import joins
+from . import index
+from . import classregistry
+from . import declarative
+from . import events
+from .sresults import SelectResults
+from .util.threadinglocal import local
import sys
if ((sys.version_info[0] == 2) and (sys.version_info[:3] < (2, 6, 0))) \
... 61 lines suppressed ...
hooks/post-receive
--
SQLObject development repository
|