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 3656877ae44c7b48b98baf0c7c9b9ae0f5ce924c (commit)
via f4ccb2cd80dc1dc84280290c560401ba5cc1d8f6 (commit)
via e6ea796bc9358e657f58f59f24f1465c80ba41ab (commit)
via 4967eaeab451a18a678c095863f38c313f9830ec (commit)
via c8cb1ff4434770078e828bac86e705b3918a37b2 (commit)
via 8d873ac856a1b32a29821fab5d6e388ced7efafd (commit)
via c8b19c40ed39a4f6bc8719928c44708484ea8519 (commit)
from 4b241b911877afce0f1625fc321faade2d8cfcf1 (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/3656877ae44c7b48b98baf0c7c9b9ae0f5ce924c
commit 3656877ae44c7b48b98baf0c7c9b9ae0f5ce924c
Merge: 4b241b9 f4ccb2c
Author: Oleg Broytman <ph...@ph...>
Date: Mon Mar 2 21:26:44 2015 +0300
Merge pull request #103 from drnlm/fix_scripts
Fix scripts
http://sourceforge.net/p/sqlobject/sqlobject/ci/f4ccb2cd80dc1dc84280290c560401ba5cc1d8f6
commit f4ccb2cd80dc1dc84280290c560401ba5cc1d8f6
Author: Neil <drn...@gm...>
Date: Mon Mar 2 11:42:05 2015 +0200
Fix config call
diff --git a/sqlobject/manager/command.py b/sqlobject/manager/command.py
index 067c09c..9ae271d 100755
--- a/sqlobject/manager/command.py
+++ b/sqlobject/manager/command.py
@@ -1102,7 +1102,11 @@ class CommandRecord(Command):
def base_dir(self):
base = self.options.output_dir
if base is None:
- base = CONFIG.get('sqlobject_history_dir', '.') # noqa
+ config = self.config()
+ if config is not None:
+ base = config.get('sqlobject_history_dir', '.')
+ else:
+ base = '.'
if not os.path.exists(base):
print('Creating history directory %s' %
self.shorten_filename(base))
http://sourceforge.net/p/sqlobject/sqlobject/ci/e6ea796bc9358e657f58f59f24f1465c80ba41ab
commit e6ea796bc9358e657f58f59f24f1465c80ba41ab
Author: Neil <drn...@gm...>
Date: Mon Mar 2 11:17:35 2015 +0200
Rewrite to use os.walk
diff --git a/sqlobject/manager/command.py b/sqlobject/manager/command.py
index 3502879..067c09c 100755
--- a/sqlobject/manager/command.py
+++ b/sqlobject/manager/command.py
@@ -495,7 +495,8 @@ class Command(with_metaclass(DeclarativeMeta, object)):
classes = self.classes_from_module(module)
all.extend(classes)
- os.path.walk(package_dir, find_classes_in_file, None)
+ for dirpath, dirnames, filenames in os.walk(package_dir):
+ find_classes_in_file(None, dirpath, dirnames + filenames)
return all
def classes_from_egg(self, egg_spec):
http://sourceforge.net/p/sqlobject/sqlobject/ci/4967eaeab451a18a678c095863f38c313f9830ec
commit 4967eaeab451a18a678c095863f38c313f9830ec
Author: Neil <drn...@gm...>
Date: Mon Mar 2 11:04:53 2015 +0200
Python3 compatibility fix
diff --git a/sqlobject/manager/command.py b/sqlobject/manager/command.py
index ea8c230..3502879 100755
--- a/sqlobject/manager/command.py
+++ b/sqlobject/manager/command.py
@@ -427,7 +427,10 @@ class Command(with_metaclass(DeclarativeMeta, object)):
if '#' in conf_fn:
conf_fn, conf_section = conf_fn.split('#', 1)
- from ConfigParser import ConfigParser
+ try:
+ from ConfigParser import ConfigParser
+ except ImportError:
+ from configparser import ConfigParser
p = ConfigParser()
# Case-sensitive:
p.optionxform = str
http://sourceforge.net/p/sqlobject/sqlobject/ci/c8cb1ff4434770078e828bac86e705b3918a37b2
commit c8cb1ff4434770078e828bac86e705b3918a37b2
Author: Neil <drn...@gm...>
Date: Mon Mar 2 11:01:29 2015 +0200
Fix sort issues
diff --git a/sqlobject/manager/command.py b/sqlobject/manager/command.py
index e7e32b8..ea8c230 100755
--- a/sqlobject/manager/command.py
+++ b/sqlobject/manager/command.py
@@ -260,7 +260,7 @@ class Command(with_metaclass(DeclarativeMeta, object)):
for cls in classes:
level = calculateDependencyLevel(cls)
sorter.append((level, cls))
- sorter.sort()
+ sorter.sort(key=lambda x: x[0])
ordered_classes = [cls for _, cls in sorter]
except SQLObjectCircularReferenceError as msg:
# Failsafe: return the classes as-is if a circular reference
@@ -828,8 +828,7 @@ class CommandHelp(Command):
print(' (use "%s help COMMAND" or "%s COMMAND -h" ' % (
self.prog_name, self.prog_name))
print(' for more information)')
- items = the_runner.commands.items()
- items.sort()
+ items = sorted(the_runner.commands.items())
max_len = max([len(cn) for cn, c in items])
for command_name, command in items:
print('%s:%s %s' % (command_name,
@@ -1028,8 +1027,7 @@ class CommandRecord(Command):
os.mkdir(output_dir)
if v:
print('Making directory %s' % self.shorten_filename(output_dir))
- files = files.items()
- files.sort()
+ files = sorted(files.items())
for fn, content in files:
if v:
print(' Writing %s' % self.shorten_filename(fn))
http://sourceforge.net/p/sqlobject/sqlobject/ci/8d873ac856a1b32a29821fab5d6e388ced7efafd
commit 8d873ac856a1b32a29821fab5d6e388ced7efafd
Author: Neil <drn...@gm...>
Date: Mon Mar 2 11:00:18 2015 +0200
Fix raw_input usage
diff --git a/sqlobject/manager/command.py b/sqlobject/manager/command.py
index 7b8a9de..e7e32b8 100755
--- a/sqlobject/manager/command.py
+++ b/sqlobject/manager/command.py
@@ -28,6 +28,11 @@ warnings.filterwarnings(
RuntimeWarning, '.*command', 28)
+if sys.version_info[0] == 2:
+ # noqa for flake8 and python 3
+ input = raw_input # noqa
+
+
def nowarning_tempnam(*args, **kw):
return os.tempnam(*args, **kw)
@@ -546,7 +551,7 @@ class Command(with_metaclass(DeclarativeMeta, object)):
else:
prompt += ' [y/N]? '
while 1:
- response = raw_input(prompt).strip()
+ response = input(prompt).strip()
if not response.strip():
return default
if response and response[0].lower() in ('y', 'n'):
http://sourceforge.net/p/sqlobject/sqlobject/ci/c8b19c40ed39a4f6bc8719928c44708484ea8519
commit c8b19c40ed39a4f6bc8719928c44708484ea8519
Author: Neil <drn...@gm...>
Date: Mon Mar 2 10:58:24 2015 +0200
Update scripts to user print function
diff --git a/scripts/sqlobject-admin b/scripts/sqlobject-admin
index 69b3e94..59d4b4b 100755
--- a/scripts/sqlobject-admin
+++ b/scripts/sqlobject-admin
@@ -1,4 +1,5 @@
#!/usr/bin/env python
+from __future__ import print_function
import sys
import os
@@ -22,8 +23,8 @@ except ImportError:
if os.path.exists(updir):
sys.path.insert(0, os.path.dirname(updir))
else:
- print 'I cannot find the sqlobject module'
- print 'If SQLObject is installed, you may need to set $PYTHONPATH'
+ print('I cannot find the sqlobject module')
+ print('If SQLObject is installed, you may need to set $PYTHONPATH')
sys.exit(3)
# Now we have to get rid of possibly stale modules from that import
# up there
diff --git a/scripts/sqlobject-convertOldURI b/scripts/sqlobject-convertOldURI
index f807180..e1c4c47 100755
--- a/scripts/sqlobject-convertOldURI
+++ b/scripts/sqlobject-convertOldURI
@@ -1,4 +1,5 @@
#!/usr/bin/env python
+from __future__ import print_function
import sys
@@ -15,4 +16,4 @@ except (ImportError, pkg_resources.DistributionNotFound):
from sqlobject import connectionForURI
conn = connectionForURI(uri, oldUri=True)
-print conn.uri()
+print(conn.uri())
-----------------------------------------------------------------------
Summary of changes:
scripts/sqlobject-admin | 5 +++--
scripts/sqlobject-convertOldURI | 3 ++-
sqlobject/manager/command.py | 29 ++++++++++++++++++++---------
3 files changed, 25 insertions(+), 12 deletions(-)
hooks/post-receive
--
SQLObject development repository
|