summaryrefslogtreecommitdiff
path: root/test/engine/test_parseconnect.py
Commit message (Collapse)AuthorAgeFilesLines
* Make all tests to be PEP8 compliantKhairi Hafsham2017-02-071-2/+3
| | | | | | | | tested using pycodestyle version 2.2.0 Fixes: #3885 Change-Id: I5df43adc3aefe318f9eeab72a078247a548ec566 Pull-request: https://github.com/zzzeek/sqlalchemy/pull/343
* Additions to support HAAlchemy pluginMike Bayer2016-09-161-0/+3
| | | | | | | | | | | | | | | | | | | - add a connect=True key to connection record to support pre-loading of _ConnectionRecord objects - ensure _ConnectionRecord.close() leaves the record in a good state for reopening - add _ConnectionRecord.record_info for persistent storage - add "in_use" accessor based on fairy_ref being present or not - allow for the exclusions system and SuiteRequirements to be usable without the full plugin_base setup. - move some Python-env requirements to the importable requirements.py module. - allow starttime to be queried - add additional events for engine plugins - have "dialect" be a first-class parameter to the pool, ensure the engine strategy supplies it up front Change-Id: Ibf549f7a1766e49d335cd6f5e26bacfaef9a8229
* - Added a new entrypoint system to the engine to allow "plugins" toMike Bayer2016-01-061-8/+35
| | | | | | | | | | | be stated in the query string for a URL. Custom plugins can be written which will be given the chance up front to alter and/or consume the engine's URL and keyword arguments, and then at engine create time will be given the engine itself to allow additional modifications or event registration. Plugins are written as a subclass of :class:`.CreateEnginePlugin`; see that class for details. fixes #3536
* - Fixed bug where known boolean values used byMike Bayer2015-05-261-0/+17
| | | | | | | | :func:`.engine_from_config` were not being parsed correctly; these included ``pool_threadlocal`` and the psycopg2 argument ``use_native_unicode``. fixes #3435 - add legacy_schema_aliasing config parsing for mssql - move use_native_unicode config arg to the psycopg2 dialect
* - New features added to support engine/pool plugins with advancedMike Bayer2015-04-301-1/+28
| | | | | | | | | | | | | | | | | | | | | | | | | functionality. Added a new "soft invalidate" feature to the connection pool at the level of the checked out connection wrapper as well as the :class:`._ConnectionRecord`. This works similarly to a modern pool invalidation in that connections aren't actively closed, but are recycled only on next checkout; this is essentially a per-connection version of that feature. A new event :class:`.PoolEvents.soft_invalidate` is added to complement it. fixes #3379 - Added new flag :attr:`.ExceptionContext.invalidate_pool_on_disconnect`. Allows an error handler within :meth:`.ConnectionEvents.handle_error` to maintain a "disconnect" condition, but to handle calling invalidate on individual connections in a specific manner within the event. - Added new event :class:`.DialectEvents.do_connect`, which allows interception / replacement of when the :meth:`.Dialect.connect` hook is called to create a DBAPI connection. Also added dialect plugin hooks :meth:`.Dialect.get_dialect_cls` and :meth:`.Dialect.engine_created` which allow external plugins to add events to existing dialects using entry points. fixes #3355
* - Added the string value ``"none"`` to those accepted by theMike Bayer2015-04-211-0/+15
| | | | | | | | :paramref:`.Pool.reset_on_return` parameter as a synonym for ``None``, so that string values can be used for all settings, allowing .ini file utilities like :func:`.engine_from_config` to be usable without issue. fixes #3375
* - rework the handle error on connect tests from test_parsconnect whereMike Bayer2014-12-101-236/+0
| | | | they don't really belong into a new suite in test_execute
* - identify another spot where _handle_dbapi_error() needs to do somethingMike Bayer2014-12-081-0/+28
| | | | | differently for the case where it is called in an already-invalidated state; don't call upon self.connection
* - adjust _revalidate_connection() again such that we pass a _wrap=FalseMike Bayer2014-12-051-1/+1
| | | | | | | | | | to it, so that we say we will do the wrapping just once right here in _execute_context() / _execute_default(). An adjustment is made to _handle_dbapi_error() to not assume self.__connection in case we are already in an invalidated state further adjustment to 0639c199a547343d62134d2f233225fd2862ec45, 41e7253dee168b8c26c49, #3266
* - move inner calls to _revalidate_connection() outside of existingMike Bayer2014-12-051-1/+34
| | | | | _handle_dbapi_error(); these are now handled already and the reentrant call is not needed / breaks things. Adjustment to 41e7253dee168b8c26c49 /
* - The engine-level error handling and wrapping routines will nowMike Bayer2014-12-051-1/+112
| | | | | | | | | take effect in all engine connection use cases, including when user-custom connect routines are used via the :paramref:`.create_engine.creator` parameter, as well as when the :class:`.Connection` encounters a connection error on revalidation. fixes #3266
* - pep8 cleanupMike Bayer2014-12-051-58/+77
|
* - The :func:`.engine_from_config` function has been improved so thatMike Bayer2013-12-071-60/+31
| | | | | | | | we will be able to parse dialect-specific arguments from string configuration dictionaries. Dialect classes can now provide their own list of parameter types and string-conversion routines. The feature is not yet used by the built-in dialects, however. [ticket:2875]
* - A DBAPI that raises an error on ``connect()`` which is not a subclassMike Bayer2013-12-071-7/+28
| | | | | | | | | | | | of dbapi.Error (such as ``TypeError``, ``NotImplementedError``, etc.) will propagate the exception unchanged. Previously, the error handling specific to the ``connect()`` routine would both inappropriately run the exception through the dialect's :meth:`.Dialect.is_disconnect` routine as well as wrap it in a :class:`sqlalchemy.exc.DBAPIError`. It is now propagated unchanged in the same way as occurs within the execute process. [ticket:2881] - add tests for this in test_parseconnect, but also add tests in test_execute to ensure the execute() behavior as well
* - adjustment, the spec says: "Within the user and password field, any ":",Mike Bayer2013-11-251-10/+10
| | | | | | | "@", or "/" must be encoded." - so re-apply encoding to both password and username, don't encode spaces as plus signs, don't encode any chars outside of :, @, / on stringification - but we still parse for any %XX character (is that right?)
* - The :func:`.create_engine` routine and the relatedMike Bayer2013-11-241-1/+23
| | | | | | | :func:`.make_url` function **no longer URL encode the password**. Database passwords that include characters like spaces, plus signs and anything else should now represent these characters directly, without any URL escaping. [ticket:2873]
* - The regexp used by the :func:`.url.make_url` function now parsesMike Bayer2013-10-231-12/+19
| | | | ipv6 addresses, e.g. surrounded by brackets. [ticket:2851]
* Hide password in URL and Engine __repr__pr/25Gunnlaugur Þór Briem2013-09-061-0/+4
| | | | Fixes #2821
* - replace most explicitly-named test objects called "Mock..." withMike Bayer2013-06-301-39/+25
| | | | | | | | | | | | actual mock objects from the mock library. I'd like to use mock for new tests so we might as well use it in obvious places. - use unittest.mock in py3.3 - changelog - add a note to README.unittests - add tests_require in setup.py - have tests import from sqlalchemy.testing.mock - apply usage of mock to one of the event tests. we can be using this approach all over the place.
* that's all of engineMike Bayer2013-05-041-4/+3
|
* - the raw 2to3 runMike Bayer2013-04-271-6/+6
| | | | - went through examples/ and cleaned out excess list() calls
* trying different approaches to test layout. in this one, the testing modulesMike Bayer2012-09-271-2/+3
| | | | | | | become an externally usable package but still remains within the main sqlalchemy parent package. in this system, we use kind of an ugly hack to get the noseplugin imported outside of the "sqlalchemy" package, while still making it available within sqlalchemy for usage by third party libraries.
* - break out engine/base.py into base, interfaces, result, util.Mike Bayer2012-08-071-3/+3
| | | | - remove deprecated 0.7 engine methods
* -whitespace bonanza, contdMike Bayer2012-07-281-3/+3
|
* - [feature] Added a new systemMike Bayer2012-04-241-0/+39
| | | | | | | for registration of new dialects in-process without using an entrypoint. See the docs for "Registering New Dialects". [ticket:2462]
* - [feature] Added pool_reset_on_return argumentMike Bayer2012-02-011-3/+24
| | | | | | | | to create_engine, allows control over "connection return" behavior. Also added new arguments 'rollback', 'commit', None to pool.reset_on_return to allow more control over connection return activity. [ticket:2378]
* - fix up the invalidate on connect for py3kMike Bayer2011-07-061-1/+2
| | | | - fix the test for separately installed pysqlite
* - Failures on connect which raise dbapi.ErrorMike Bayer2011-07-011-12/+43
| | | | | | | | | | | | will forward the error to dialect.is_disconnect() and set the "connection_invalidated" flag if the dialect knows this to be a potentially "retryable" condition. Only Oracle ORA-01033 implemented for now. [ticket:2201] - Added ORA-01033 to disconnect codes, which can be caught during a connection event. [ticket:2201]
* - remove test.sql._base, test.engine._base, test.orm._base, move those ↵Mike Bayer2011-03-271-5/+4
| | | | | | | classes to a new test.lib.fixtures module - move testing.TestBase to test.lib.fixtures - massive search and replace
* see #2060Diana Clarke2011-02-281-2/+2
|
* - whitespace removal bonanzaMike Bayer2011-01-021-1/+1
|
* - move sqlalchemy.test to test.libMike Bayer2010-11-151-2/+2
|
* - engine_from_config() now accepts 'debug' forMike Bayer2010-10-151-0/+16
| | | | | | 'echo', 'echo_pool', 'force' for 'convert_unicode', boolean values for 'use_native_unicode'. [ticket:1899]
* Python-tidy test/engine and test/aaa_profiling, 80% auto + 20% manual ↵Mike Bayer2010-07-111-60/+122
| | | | intervention
* another weird nose + py3k fixMike Bayer2010-02-201-1/+2
|
* add "dialect" to the __all__ of each root dialect packageMike Bayer2009-11-011-1/+9
|
* test fixesMike Bayer2009-10-261-3/+7
|
* merge 0.6 series to trunk.Mike Bayer2009-08-061-75/+52
|
* - unit tests have been migrated from unittest to nose.Mike Bayer2009-06-101-0/+230
See README.unittests for information on how to run the tests. [ticket:970]