| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Found using: https://github.com/intgr/topy
|
|
|
|
|
| |
and :func:`.event.listens_for`. This is a convenience feature which
will wrap the given listener such that it is only invoked once.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
is currently being supported in addition to nose, and will likely
be preferred to nose going forward. The nose plugin system used
by SQLAlchemy has been split out so that it works under pytest as
well. There are no plans to drop support for nose at the moment
and we hope that the test suite itself can continue to remain as
agnostic of testing platform as possible. See the file
README.unittests.rst for updated information on running tests
with pytest.
The test plugin system has also been enhanced to support running
tests against mutiple database URLs at once, by specifying the ``--db``
and/or ``--dburi`` flags multiple times. This does not run the entire test
suite for each database, but instead allows test cases that are specific
to certain backends make use of that backend as the test is run.
When using pytest as the test runner, the system will also run
specific test suites multiple times, once for each database, particularly
those tests within the "dialect suite". The plan is that the enhanced
system will also be used by Alembic, and allow Alembic to run
migration operation tests against multiple backends in one run, including
third-party backends not included within Alembic itself.
Third party dialects and extensions are also encouraged to standardize
on SQLAlchemy's test suite as a basis; see the file README.dialects.rst
for background on building out from SQLAlchemy's test platform.
|
|
|
|
|
| |
methods, classes, builtins, functools.partial(), everything known so far
- use get_callable_argspec() within ColumnDefault._maybe_wrap_callable, re: #2979
|
|
|
|
|
|
| |
in particular the logic used to wrap "column default" callables
wouldn't work properly for Python built-ins.
fixes #2979
|
|
|
|
|
| |
arguments; [ticket:2866]
- add dialect specific kwarg functionality to ForeignKeyConstraint, ForeignKey
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
system would cause a recursion overflow due to usage of inspect.getargspec()
on it in order to detect a legacy calling signature for certain events,
and apparently there's no way to do this with a partial object. Instead
we skip the legacy check and assume the modern style; the check itself
now only occurs for the SessionEvents.after_bulk_update and
SessionEvents.after_bulk_delete events. Those two events will require
the new signature style if assigned to a "partial" event listener.
[ticket:2905]
|
|
|
|
|
| |
to use a named def instead of a lambda. this so that TypeError on wrong
arguments are more legible. [ticket:2884]
|
|
|
|
|
|
|
|
| |
``__repr__()``, particularly with regards to the MySQL integer/numeric/
character types which feature a wide variety of keyword arguments.
The ``__repr__()`` is important for use with Alembic autogenerate
for when Python code is rendered in a migration script.
[ticket:2893]
|
| |
|
|
|
|
|
|
|
|
|
| |
- rework the event system so that event modules load after their
targets, dependencies are reversed
- create an improved strategy lookup system for the ORM
- rework the ORM to have very few import cycles
- move out "importlater" to just util.dependency
- other tricks to cross-populate modules in as clear a way as possible
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
the import structure of many core modules.
``sqlalchemy.schema`` and ``sqlalchemy.types``
remain in the top-level package, but are now just lists of names
that pull from within ``sqlalchemy.sql``. Their implementations
are now broken out among ``sqlalchemy.sql.type_api``, ``sqlalchemy.sql.sqltypes``,
``sqlalchemy.sql.schema`` and ``sqlalchemy.sql.ddl``, the last of which was
moved from ``sqlalchemy.engine``. ``sqlalchemy.sql.expression`` is also
a namespace now which pulls implementations mostly from ``sqlalchemy.sql.elements``,
``sqlalchemy.sql.selectable``, and ``sqlalchemy.sql.dml``.
Most of the "factory" functions
used to create SQL expression objects have been moved to classmethods
or constructors, which are exposed in ``sqlalchemy.sql.expression``
using a programmatic system. Care has been taken such that all the
original import namespaces remain intact and there should be no impact
on any existing applications. The rationale here was to break out these
very large modules into smaller ones, provide more manageable lists
of function names, to greatly reduce "import cycles" and clarify the
up-front importing of names, and to remove the need for redundant
functions and documentation throughout the expression package.
|
|
|
|
| |
we are pretty much back to the beginning, nothing to see here
|
|
|
|
| |
since we are dealing with cycles in any case.
|
| |
|
|
|
|
|
|
| |
is recreated, due to a disconnect error. This fixes a particular
issue in the Oracle 8 dialect, but in general the dialect.initialize()
phase should only be once per dialect. Also in 0.8.3. [ticket:2776]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
with @_legacy_signature, will inspect incoming listener functions
to see if they match an older signature, will wrap into a newer sig
- add an event listen argument named=True, will send all args as
kw args so that event listeners can be written with **kw, any combination
of names
- add a doc system to events that writes out the various calling styles
for a given event, produces deprecation messages automatically.
a little concerned that it's a bit verbose but will look at it up
on RTD for awhile to get a feel.
- change the calling signature for bulk update/delete events - we have
the BulkUD object right there, and there's at least six or seven things
people might want to see, so just send the whole BulkUD in
[ticket:2775]
|
| |
|
|\ |
|
| |
| |
| |
| |
| |
| | |
being sent to :func:`.create_engine` would fail in some cases,
such as with the Sybase dialect.
[ticket:2732]
|
| | |
|
| | |
|
| | |
|
|/
|
|
| |
- went through examples/ and cleaned out excess list() calls
|
| |
|
|
|
|
|
|
|
|
|
| |
a rollback() before re-raising, so that the stack
trace is preserved from sys.exc_info() before entering
the rollback. This so that the traceback is preserved
when using coroutine frameworks which may have switched
contexts before the rollback function returns.
[ticket:2703]
|
|
|
|
|
|
| |
- other cleanup
- don't need compat.decimal, that approach never panned out. hopefully
outside libs aren't pulling it in, they shouldn't be
|
| |
|
|
|
|
|
|
|
|
|
| |
:class:`.CheckConstraint` would apply itself back to the
original table during a :meth:`.Table.tometadata` operation, as
it would parse the SQL expression for a parent table. The
operation now copies the given expression to correspond to the
new table.
[ticket:2633]
|
| |
|
|
|
|
|
|
|
|
|
| |
that works in terms of the "impl" type by default.
This is a behavioral change for those TypeDecorator
classes that specify a custom __init__ method; those
types will need to re-define __repr__() if they need
__repr__() to provide a faithful constructor representation.
[ticket:2594]
|
| |
|
|
|
|
|
|
| |
__dict__.pop(),
remove reset_memoized
|
|
|
|
|
|
|
|
| |
is replaced, such as via extend_existing,
the "auto increment" column used by insert()
constructs is reset. Previously it would
remain referring to the previous primary
key column. [ticket:2525]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
the `getitem` operator, i.e. the bracket
operator in Python. This is used at first
to provide index and slice behavior to the
Postgresql ARRAY type, and also provides a hook
for end-user definition of custom __getitem__
schemes which can be applied at the type
level as well as within ORM-level custom
operator schemes.
Note that this change has the effect that
descriptor-based __getitem__ schemes used by
the ORM in conjunction with synonym() or other
"descriptor-wrapped" schemes will need
to start using a custom comparator in order
to maintain this behavior.
- [feature] postgresql.ARRAY now supports
indexing and slicing. The Python [] operator
is available on all SQL expressions that are
of type ARRAY; integer or simple slices can be
passed. The slices can also be used on the
assignment side in the SET clause of an UPDATE
statement by passing them into Update.values();
see the docs for examples.
- [feature] Added new "array literal" construct
postgresql.array(). Basically a "tuple" that
renders as ARRAY[1,2,3].
|
|
|
|
|
| |
the "name" and "native_enum" flags. Helps
Alembic autogenerate.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
and the entire related system of alternate
class implementation is now moved out
to sqlalchemy.ext.instrumentation. This is
a seldom used system that adds significant
complexity and overhead to the mechanics of
class instrumentation. The new architecture
allows it to remain unused until
InstrumentationManager is actually imported,
at which point it is bootstrapped into
the core.
|
|
|
|
|
|
|
| |
for registration of new dialects in-process
without using an entrypoint. See the
docs for "Registering New Dialects".
[ticket:2462]
|
| |
|
| |
|
|
|
|
| |
no longer compatible with docutils 0.8
|
|
|
|
|
|
|
| |
flag and renamed it to util.py3k_warning, since
this flag is intended to detect the -3 flag
series of import restrictions only.
[ticket:2348]
|
|
|
|
|
|
|
|
| |
Py3K's new argument style of "required kw arguments",
i.e. fn(a, b, *, c, d), fn(a, b, *args, c, d).
Argument signatures of mapped object's __init__
method will be preserved, including required kw rules.
[ticket:2237]
|
|
|
|
|
|
|
|
|
| |
used internally to resolve import cycles,
such that the usage of __import__ is completed
when the import of sqlalchemy or sqlalchemy.orm
is done, thereby avoiding any usage of __import__
after the application starts new threads,
fixes [ticket:2279]. Also in 0.6.9.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
for a select() element. The "from" calc is now
delayed, so that if the construct uses a Column
object that is not yet attached to a Table,
but is later associated with a Table, it generates
SQL using the table as a FROM. This change
impacted fairly deeply the mechanics of how
the FROM list as well as the "correlates" collection
is calculated, as some "clause adaption" schemes
(these are used very heavily in the ORM)
were relying upon the fact that the "froms"
collection would typically be cached before the
adaption completed. The rework allows it
such that the "froms" collection can be cleared
and re-generated at any time. [ticket:2261]
- RelationshipProperty.Comparator._criterion_exists()
adds an "_orm_adapt" annotation to the correlates target,
to work with the change in [ticket:2261]. It's not clear
if the change to correlation+adaption mechanics will affect end user
code yet.
- FromClause now uses group_expirable_memoized_property for
late-generated values like primary key, _columns, etc.
The Select class adds some tokens to this object and has the
nice effect that FromClause doesn't need to know about
Select's names anymore. An additional change might be to
have Select use a different group_expirable_memoized_property
so that it's collection of attribute names are specific to
Select though this isn't really necessary right now.
|
|
|
|
|
|
|
|
| |
classes. Note the repr here can't fully support
the "repr is the constructor" idea since schema
items can be very deeply nested/cyclical, have
late initialization of some things, etc.
[ticket:2223]
|
| |
|