summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* Merge "sqlite provisioning is ridiculous" into mainmike bayer2023-03-113-74/+98
|\
| * sqlite provisioning is ridiculousMike Bayer2023-03-103-74/+98
| | | | | | | | | | | | try to get file naming to be more sane for pysqlite file databases Change-Id: I68ad8c2f6c6c25930fbffdd79b8d429cd7a7dd9a
* | Merge "Fix regression when deserializing python rows into cython" into mainmike bayer2023-03-106-34/+63
|\ \
| * | Fix regression when deserializing python rows into cythonFederico Caselli2023-03-106-34/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed regression involving pickling of Python rows between the cython and pure Python implementations of :class:`.Row`, which occurred as part of refactoring code for version 2.0 with typing. A particular constant were turned into a string based ``Enum`` for the pure Python version of :class:`.Row` whereas the cython version continued to use an integer constant, leading to deserialization failures. Regression occurred in a4bb502cf95ea3523e4d383c4377e50f402d7d52 Fixes: #9423 Change-Id: Icbd85cacb2d589cef7c246de7064249926146f2e
* | | Merge "repair broken lambda patch" into mainmike bayer2023-03-105-20/+135
|\ \ \ | |_|/ |/| |
| * | repair broken lambda patchMike Bayer2023-03-105-20/+135
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | in I4e0b627bfa187f1780dc68ec81b94db1c78f846a the 1.4 version has more changes than the main version, which failed to get the entire change, yet the whole thing was merged. Restore the missing mutex related code to the main version. Fixed regression where the fix for :ticket:`8098`, which was released in the 1.4 series and provided a layer of concurrency-safe checks for the lambda SQL API, included additional fixes in the patch that failed to be applied to the main branch. These additional fixes have been applied. Change-Id: Id172e09c421dafa6ef1d40b383aa4371de343864 References: #8098 Fixes: #9461
* | Merge "implement active_history for composites" into mainmike bayer2023-03-103-2/+223
|\ \
| * | implement active_history for compositesMike Bayer2023-03-093-2/+223
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed bug where the "active history" feature was not fully implemented for composite attributes, making it impossible to receive events that included the "old" value. This seems to have been the case with older SQLAlchemy versions as well, where "active_history" would be propagated to the underlying column-based attributes, but an event handler listening to the composite attribute itself would not be given the "old" value being replaced, even if the composite() were set up with active_history=True. Additionally, fixed a regression that's local to 2.0 which disallowed active_history on composite from being assigned to the impl with ``attr.impl.active_history=True``. Fixes: #9460 Change-Id: I6d7752a01c8d3fd78de7a90de10e8c52f9b3cd4e
* | denormalize "public" schema to "PUBLIC"Mike Bayer2023-03-093-17/+173
|/ | | | | | | | | | | | | Fixed reflection bug where Oracle "name normalize" would not work correctly for reflection of symbols that are in the "PUBLIC" schema, such as synonyms, meaning the PUBLIC name could not be indicated as lower case on the Python side for the :paramref:`_schema.Table.schema` argument. Using uppercase "PUBLIC" would work, but would then lead to awkward SQL queries including a quoted ``"PUBLIC"`` name as well as indexing the table under uppercase "PUBLIC", which was inconsistent. Fixes: #9459 Change-Id: I989bd1e794a5b5ac9aae4f4a8702f14c56cd74c2
* Merge "Use independent TypeVar for ColumnElement.cast" into mainmike bayer2023-03-093-1/+19
|\
| * Use independent TypeVar for ColumnElement.castMike Bayer2023-03-083-1/+19
| | | | | | | | | | | | | | | | | | | | Fixed typing issue where :meth:`.ColumnElement.cast` did not allow a :class:`.TypeEngine` argument independent of the type of the :class:`.ColumnElement` itself, which is the purpose of :meth:`.ColumnElement.cast`. Fixes: #9451 Change-Id: I68119c6a9e8bf896715eea79be2b4f36b1c141de
* | clarify "selecting individual columns" docMike Bayer2023-03-081-10/+8
|/ | | | | | | | | Just went to refer to this and it was full of difficult terminology for no good reason. What's troubling is that this doc is like the tenth time I've rewritten this and it still was loaded with too much jargon and not clear about the behavior. Change-Id: I22745962568277eead6081a82003ac90665048e0
* update for mypy 1.1.1Mike Bayer2023-03-086-19/+38
| | | | | | | looks like mypy 1.1.1 slipped in after the last jenkins pep484 build for SQLAlchemy. update for its new issues. Change-Id: Ifca967a75d5e592c04b0138aeda9b646067fe59b
* additional consistency for ORM/Core in tutorialMike Bayer2023-03-085-13/+41
| | | | | | | | | | | * Make sure we have blue borders for all sections * rewrite "blue border" text, refer to textual means of determining subject matter for a section; "blue borders" are not a primary source of information * Add some more intro text that was missing Change-Id: I4d599e13d23bad8bb3c199a11afb53e3e9100c59 References: #9450
* resolve select to NULLTYPE if no columnsMike Bayer2023-03-074-0/+48
| | | | | | | | | | | | | | | | | Fixed regression where the :func:`_sql.select` construct would not be able to render if it were given no columns and then used in the context of an EXISTS, raising an internal exception instead. While an empty "SELECT" is not typically valid SQL, in the context of EXISTS databases such as PostgreSQL allow it, and in any case the condition now no longer raises an internal exception. For this case, also add an extra whitespace trim step for the unusual case that there are no columns to render. This is done in such a way as to not interfere with other test cases that are involving custom compilation schemes. Fixes: #9440 Change-Id: If65ba9ce15d371f09b4342ad0669143b7b082a78
* update sql server use_setinputsizes docs a bitMike Bayer2023-03-061-7/+10
| | | | | | the verbiage here was ambiguous previously. Change-Id: I452ae85bd8b5469d4103970e99cfac752b508274
* Version 2.0.6 placeholderMike Bayer2023-03-052-1/+5
|
* - 2.0.5.post1rel_2_0_5_post1Mike Bayer2023-03-052-1/+2
|
* remove release dateMike Bayer2023-03-051-1/+0
| | | | Change-Id: I8721674372673d0b242e1e07d3fc9b7ff7256c48
* comment out pickle/ process test and attempt 2.0.5.post1Mike Bayer2023-03-053-29/+21
| | | | | | | | | | | | | | if .post1 fails to work out, we'll just do 2.0.6 The test_pickle_rows_other_process test is failing during wheel builds as it seems that the "subprocess" run is not using the cython extensions, leading to a pickle mismatch between the cythonized and the pure python version of a row. comment out this test and attempt to release as 2.0.5.post1 so that wheels can build. Fixes: #9429 Change-Id: I6e1e9f2b9c4ef8fa67a88ff86ebdacbeb02b90df
* Version 2.0.6 placeholderMike Bayer2023-03-052-1/+5
|
* - 2.0.5rel_2_0_5Mike Bayer2023-03-0524-236/+258
|
* (lots of) changelog updates for 2.0.5Mike Bayer2023-03-0513-33/+60
| | | | Change-Id: Iea2ca2cd1eb44b4e9139f2bb6c3d6239f67aeb56
* Merge "KeyFuncDict regression fixes and dataclass fixes" into mainmike bayer2023-03-067-62/+555
|\
| * KeyFuncDict regression fixes and dataclass fixesMike Bayer2023-03-057-62/+555
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | adapt None-key warning for non-mapped attributes Fixed multiple regressions due to :ticket:`8372`, involving :func:`_orm.attribute_mapped_collection` (now called :func:`_orm.attribute_keyed_dict`). First, the collection was no longer usable with "key" attributes that were not themselves ordinary mapped attributes; attributes linked to descriptors and/or association proxy attributes have been fixed. Second, if an event or other operation needed access to the "key" in order to populate the dictionary from an mapped attribute that was not loaded, this also would raise an error inappropriately, rather than trying to load the attribute as was the behavior in 1.4. This is also fixed. For both cases, the behavior of :ticket:`8372` has been expanded. :ticket:`8372` introduced an error that raises when the derived key that would be used as a mapped dictionary key is effectively unassigned. In this change, a warning only is emitted if the effective value of the ".key" attribute is ``None``, where it cannot be unambiguously determined if this ``None`` was intentional or not. ``None`` will be not supported as mapped collection dictionary keys going forward (as it typically refers to NULL which means "unknown"). Setting :paramref:`_orm.attribute_keyed_dict.ignore_unpopulated_attribute` will now cause such ``None`` keys to be ignored as well. Add value constructors to dictionary collections Added constructor arguments to the built-in mapping collection types including :class:`.KeyFuncDict`, :func:`_orm.attribute_keyed_dict`, :func:`_orm.column_keyed_dict` so that these dictionary types may be constructed in place given the data up front; this provides further compatibility with tools such as Python dataclasses ``.asdict()`` which relies upon invoking these classes directly as ordinary dictionary classes. Fixes: #9418 Fixes: #9424 Change-Id: Ib16c4e690b7ac3fcc34df2f139cad61c6c4b2b19
* | Merge "Fixed bug where :meth:`_engine.Row`s could not be unpickled by other ↵mike bayer2023-03-053-63/+108
|\ \ | | | | | | | | | processes." into main
| * | Fixed bug where :meth:`_engine.Row`s could not beFederico Caselli2023-03-043-63/+108
| | | | | | | | | | | | | | | | | | | | | unpickled by other processes. Fixes: #9423 Change-Id: Ie496e31158caff5f72e0a9069dddd55f3116e0b8
* | | Merge "audition pymssql once more; retire sane_rowcount_returning" into mainmike bayer2023-03-0518-75/+287
|\ \ \
| * | | audition pymssql once more; retire sane_rowcount_returningMike Bayer2023-03-0418-75/+287
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | pymssql seems to be maintained again and seems to be working completely, so let's try re-enabling it. Fixed issue in the new :class:`.Uuid` datatype which prevented it from working with the pymssql driver. As pymssql seems to be maintained again, restored testing support for pymssql. Tweaked the pymssql dialect to take better advantage of RETURNING for INSERT statements in order to retrieve last inserted primary key values, in the same way as occurs for the mssql+pyodbc dialect right now. Identified that the ``sqlite`` and ``mssql+pyodbc`` dialects are now compatible with the SQLAlchemy ORM's "versioned rows" feature, since SQLAlchemy now computes rowcount for a RETURNING statement in this specific case by counting the rows returned, rather than relying upon ``cursor.rowcount``. In particular, the ORM versioned rows use case (documented at :ref:`mapper_version_counter`) should now be fully supported with the SQL Server pyodbc dialect. Change-Id: I38a0666587212327aecf8f98e86031ab25d1f14d References: #5321 Fixes: #9414
* | | | Merge "ensure event handlers called for all do_ping" into mainmike bayer2023-03-0511-60/+234
|\ \ \ \ | |_|/ / |/| | |
| * | | ensure event handlers called for all do_pingMike Bayer2023-03-0411-60/+234
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The support for pool ping listeners to receive exception events via the :meth:`.ConnectionEvents.handle_error` event added in 2.0.0b1 for :ticket:`5648` failed to take into account dialect-specific ping routines such as that of MySQL and PostgreSQL. The dialect feature has been reworked so that all dialects participate within event handling. Additionally, a new boolean element :attr:`.ExceptionContext.is_pre_ping` is added which identifies if this operation is occurring within the pre-ping operation. For this release, third party dialects which implement a custom :meth:`_engine.Dialect.do_ping` method can opt in to the newly improved behavior by having their method no longer catch exceptions or check exceptions for "is_disconnect", instead just propagating all exceptions outwards. Checking the exception for "is_disconnect" is now done by an enclosing method on the default dialect, which ensures that the event hook is invoked for all exception scenarios before testing the exception as a "disconnect" exception. If an existing ``do_ping()`` method continues to catch exceptions and check "is_disconnect", it will continue to work as it did previously, but ``handle_error`` hooks will not have access to the exception if it isn't propagated outwards. Fixes: #5648 Change-Id: I6535d5cb389e1a761aad8c37cfeb332c548b876d
* | | | Merge "restore old *args approach for MutableDict.pop()" into mainmike bayer2023-03-043-30/+59
|\ \ \ \
| * | | | restore old *args approach for MutableDict.pop()Nils Philippsen2023-03-043-30/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The typing change in ba0e508141206efc55cdab91df21c1 changed the semantics of pop() and possibly setdefault() in order to try working at runtime with a two-argument signature. however the implementation for this in cpython likely uses a strict `*args` approach where the lack of the second parameter is explicit, rather than matching to a constant. Restore the old implementation inside of a "not TYPE_CHECKING" block while keeping the type annotated forms intact for typing only. Fixed regression caused by typing added to ``sqlalchemy.ext.mutable`` for :ticket:`8667`, where the semantics of the ``.pop()`` method changed such that the method was non-working. Pull request courtesy Nils Philippsen. Fixes: #9380 Closes: #9381 Co-authored-by: Mike Bayer <mike_mp@zzzcomputing.com> Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/9381 Pull-request-sha: fd903ce1b949d2af26ceb6c2159ad84aab007f3d Change-Id: I213e52f51a795801aacf05307e38cc8c89b54e12
* | | | | Merge "Restore connectivity with ancient sqlite" into mainmike bayer2023-03-043-1/+51
|\ \ \ \ \ | |_|_|_|/ |/| | | |
| * | | | Restore connectivity with ancient sqliteFederico Caselli2023-03-043-1/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed bug that prevented SQLAlchemy to connect when using a very old sqlite version (before 3.9) on python 3.8+. Fixes: #9379 Change-Id: I10ca347398221c952e1a572dc6ef80e491d1f5cf
* | | | | Fix the count example in ORM migration doc (#9421)Grey Li2023-03-041-4/+4
| | | | |
* | | | | Merge "TextualSelect is ReturnsRowsRole" into mainmike bayer2023-03-045-14/+88
|\ \ \ \ \
| * | | | | TextualSelect is ReturnsRowsRoleMike Bayer2023-03-025-14/+88
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed typing bug where :meth:`_sql.Select.from_statement` would not accept :func:`_sql.text` or :class:`.TextualSelect` objects as a valid type. Additionally repaired the :class:`.TextClause.columns` method to have a return type, which was missing. Fixes: #9398 Change-Id: I627fc33bf83365e1c7f7c6ed29ea387dfd4a57d8
* | | | | | Merge "Add missing overload to Numeric" into mainmike bayer2023-03-046-22/+49
|\ \ \ \ \ \
| * | | | | | Add missing overload to NumericFederico Caselli2023-03-036-22/+49
| | |_|/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added missing init overload to :class:`_sql.Numeric` to allow type checkers to properly resolve the type var given the ``asdecimal`` parameter. this fortunately fixes a glitch in the generate_sql_functions script also Fixes: #9391 Change-Id: I9cecc40c52711489e9dbe663f110c3b81c7285e4
* | | | | | Merge "allow multiparams with scalars" into mainmike bayer2023-03-044-6/+81
|\ \ \ \ \ \
| * | | | | | allow multiparams with scalarsMike Bayer2023-03-014-6/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed bug where the :meth:`_engine.Connection.scalars` method was not typed as allowing a multiple-parameters list, which is now supported using insertmanyvalues operations. Change-Id: I65e22c3bee80fc226d484ff1424421dd78520fa5
* | | | | | | Merge "Validate metadata schema arg" into mainmike bayer2023-03-043-0/+23
|\ \ \ \ \ \ \
| * | | | | | | Validate metadata schema argFederico Caselli2023-03-013-0/+23
| | |/ / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Validate that when provided the :paramref:`_sql.MetaData.schema` argument of :class:`_sql.MetaData` is a string. Change-Id: I4237232d2ee0f5a4d0b9dbd9af5f5b57abf395b4
* | | | | | | Remove duplicate word in tutorial (#9420)Viicos2023-03-031-1/+1
| |_|_|_|_|/ |/| | | | |
* | | | | | Fixed issue when copying ExcludeConstraintFederico Caselli2023-03-013-7/+43
| |/ / / / |/| | | | | | | | | | | | | | | | | | | Fixes: #9401 Change-Id: Ie10192348749567110f53ae618fc724f37d1a6a1
* | | | | Fix Typo In Tutorial (#9399)easy_markie_tee2023-03-011-1/+1
| |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | Missing a word on the page `Working with Database Metadata`. First paragraph under section 'Setting up MetaData with Table objects'. "...the database which we query from is know [as] a table." Co-authored-by: markie tee <cassette.head@gmail.com>
* | | | Merge "Restore export for nullslast/nullfirst" into mainmike bayer2023-03-014-0/+26
|\ \ \ \
| * | | | Restore export for nullslast/nullfirstFederico Caselli2023-02-284-0/+26
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | Previously only the snake case versions nulls_last/nulls_first were exported in the toplevel namespace. Fixes: #9390 Change-Id: I9088e858ae108a5c9106b9d8d82655ad605417cc
* | | | Merge "Improve orm event docs" into mainmike bayer2023-02-282-9/+17
|\ \ \ \ | |_|/ / |/| | |