diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2010-12-05 12:51:24 -0500 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2010-12-05 12:51:24 -0500 |
| commit | 1f9029597caf3d9d9e64e5a326508babfca60ebb (patch) | |
| tree | d61b888173b7a0a6b6d4f061a3afad734812e1da /lib | |
| parent | 49145a6940062486a6eec66bfe5c9d95c5f76c7a (diff) | |
| download | sqlalchemy-1f9029597caf3d9d9e64e5a326508babfca60ebb.tar.gz | |
- move topological, queue into util
- move function_named into test.lib.util
- use @decorator for all decorators in test/
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/sqlalchemy/orm/unitofwork.py | 3 | ||||
| -rw-r--r-- | lib/sqlalchemy/pool.py | 2 | ||||
| -rw-r--r-- | lib/sqlalchemy/sql/util.py | 3 | ||||
| -rw-r--r-- | lib/sqlalchemy/util/__init__.py | 3 | ||||
| -rw-r--r-- | lib/sqlalchemy/util/compat.py | 1 | ||||
| -rw-r--r-- | lib/sqlalchemy/util/langhelpers.py | 14 | ||||
| -rw-r--r-- | lib/sqlalchemy/util/queue.py (renamed from lib/sqlalchemy/queue.py) | 0 | ||||
| -rw-r--r-- | lib/sqlalchemy/util/topological.py (renamed from lib/sqlalchemy/topological.py) | 0 |
8 files changed, 7 insertions, 19 deletions
diff --git a/lib/sqlalchemy/orm/unitofwork.py b/lib/sqlalchemy/orm/unitofwork.py index db20acb90..7ee633f3e 100644 --- a/lib/sqlalchemy/orm/unitofwork.py +++ b/lib/sqlalchemy/orm/unitofwork.py @@ -12,7 +12,8 @@ organizes them in order of dependency, and executes. """ -from sqlalchemy import util, topological +from sqlalchemy import util +from sqlalchemy.util import topological from sqlalchemy.orm import attributes, interfaces from sqlalchemy.orm import util as mapperutil from sqlalchemy.orm.util import _state_mapper diff --git a/lib/sqlalchemy/pool.py b/lib/sqlalchemy/pool.py index 58b3a39c1..4ae6ec022 100644 --- a/lib/sqlalchemy/pool.py +++ b/lib/sqlalchemy/pool.py @@ -20,7 +20,7 @@ SQLAlchemy connection pool. import weakref, time, threading from sqlalchemy import exc, log, event, events, interfaces, util -from sqlalchemy import queue as sqla_queue +from sqlalchemy.util import queue as sqla_queue from sqlalchemy.util import threading, pickle, memoized_property proxies = {} diff --git a/lib/sqlalchemy/sql/util.py b/lib/sqlalchemy/sql/util.py index 638549e12..757de37c4 100644 --- a/lib/sqlalchemy/sql/util.py +++ b/lib/sqlalchemy/sql/util.py @@ -1,4 +1,5 @@ -from sqlalchemy import exc, schema, topological, util, sql, types as sqltypes +from sqlalchemy import exc, schema, util, sql, types as sqltypes +from sqlalchemy.util import topological from sqlalchemy.sql import expression, operators, visitors from itertools import chain diff --git a/lib/sqlalchemy/util/__init__.py b/lib/sqlalchemy/util/__init__.py index 4aaf41205..aa150874f 100644 --- a/lib/sqlalchemy/util/__init__.py +++ b/lib/sqlalchemy/util/__init__.py @@ -20,7 +20,7 @@ from langhelpers import iterate_attributes, class_hierarchy, \ portable_instancemethod, unbound_method_to_callable, \ getargspec_init, format_argspec_init, format_argspec_plus, \ get_func_kwargs, get_cls_kwargs, decorator, as_interface, \ - function_named, memoized_property, memoized_instancemethod, \ + memoized_property, memoized_instancemethod, \ reset_memoized, group_expirable_memoized_property, importlater, \ monkeypatch_proxied_specials, asbool, bool_or_str, coerce_kw_type,\ duck_type_collection, assert_arg_type, symbol, dictlike_iteritems,\ @@ -29,4 +29,3 @@ from langhelpers import iterate_attributes, class_hierarchy, \ from deprecations import warn_deprecated, warn_pending_deprecation, \ deprecated, pending_deprecation - diff --git a/lib/sqlalchemy/util/compat.py b/lib/sqlalchemy/util/compat.py index 5f00102c1..090f45212 100644 --- a/lib/sqlalchemy/util/compat.py +++ b/lib/sqlalchemy/util/compat.py @@ -1,4 +1,5 @@ """Handle Python version/platform incompatibilities.""" + import sys # Py2K diff --git a/lib/sqlalchemy/util/langhelpers.py b/lib/sqlalchemy/util/langhelpers.py index 68d9709f8..aac22ba30 100644 --- a/lib/sqlalchemy/util/langhelpers.py +++ b/lib/sqlalchemy/util/langhelpers.py @@ -371,20 +371,6 @@ def as_interface(obj, cls=None, methods=None, required=None): raise TypeError("dictionary does not contain required keys %s" % ', '.join(required - found)) -def function_named(fn, name): - """Return a function with a given __name__. - - Will assign to __name__ and return the original function if possible on - the Python implementation, otherwise a new function will be constructed. - - """ - try: - fn.__name__ = name - except TypeError: - fn = types.FunctionType(fn.func_code, fn.func_globals, name, - fn.func_defaults, fn.func_closure) - return fn - class memoized_property(object): """A read-only @property that is only evaluated once.""" diff --git a/lib/sqlalchemy/queue.py b/lib/sqlalchemy/util/queue.py index 74435ea38..74435ea38 100644 --- a/lib/sqlalchemy/queue.py +++ b/lib/sqlalchemy/util/queue.py diff --git a/lib/sqlalchemy/topological.py b/lib/sqlalchemy/util/topological.py index 0f4f32461..0f4f32461 100644 --- a/lib/sqlalchemy/topological.py +++ b/lib/sqlalchemy/util/topological.py |
